Linux USB
 help / color / mirror / Atom feed
From: Andreas Hartmann <andihartmann@01019freenet.de>
To: Mathias Nyman <mathias.nyman@linux.intel.com>, linux-usb@vger.kernel.org
Subject: Re: USB2 / USB3 compatibility problems: xhci_hcd 0000:00:06.0: WARN Wrong bounce buffer write length: 0 != 512
Date: Mon, 25 Jan 2021 19:48:39 +0100	[thread overview]
Message-ID: <f3f85222-0d9d-2f31-0a3e-d1d60ea9d153@01019freenet.de> (raw)
In-Reply-To: <f83677b5-e3d1-afdb-c8d4-f9969fa3fe84@linux.intel.com>

Hello Mathias!

On 25.01.21 at 19:28 Mathias Nyman wrote:
> Hi
> 
> On 25.1.2021 12.18, Andreas Hartmann wrote:
>>
>> Hello!
>>
>> Meanwhile I found the culprit:
>>
>> https://www.spinics.net/lists/linux-usb/msg141467.html
>> and
>> https://www.spinics.net/lists/linux-usb/msg141468.html
>>
>> Especially the last change breaks things here completely. After removing them
>> by the attached patch, problems are gone and device works again as expected
>> (I tested with the original 24 kB bulk size which was horribly broken w/o the
>> attached patch). This means: the additional repair steps are not just breaking
>> things but are even unnecessary (it's working perfectly without those changes)
>> here.
> 
> Unfortunately this isn't enough to remove the alignment code for those
> controllers. This is just once specific usecase. We need to figure out what
> really goes wrong.
> 
> Looks like 0 bytes is copied from sg list to bounce buffer when we want 512
> bytes copied.

I don't have only 512 bytes cases, but also 100, 136, 424, 396, 144,
292. It's working anyway w/o any modifications. Why does it work w/o any
modification? Do those chips really need any alignment?

> Just noticed the alignment code assumes sg lists are used without
> checking it first.
> 
> Could you add the below code and test again, it should print more debugging info.

Is there a way to compile this code external - w/o recompiling the whole
kernel?


Thanks
Andreas

  reply	other threads:[~2021-01-26 19:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22  8:06 USB2 / USB3 compatibility problems: xhci_hcd 0000:00:06.0: WARN Wrong bounce buffer write length: 0 != 512 Andreas Hartmann
2021-01-22  8:09 ` Andreas Hartmann
2021-01-24 17:28   ` Andreas Hartmann
2021-01-25 10:18     ` Andreas Hartmann
2021-01-25 18:28       ` Mathias Nyman
2021-01-25 18:48         ` Andreas Hartmann [this message]
2021-01-25 20:06         ` Andreas Hartmann
2021-01-26  7:26           ` Andreas Hartmann
2021-01-26 14:11             ` Mathias Nyman
2021-01-26 17:29               ` Mathias Nyman
2021-01-26 17:48                 ` Andreas Hartmann
2021-01-26 21:16                 ` Andreas Hartmann
2021-01-27  6:43                   ` Andreas Hartmann
2021-01-28 14:14                     ` Mathias Nyman
2021-01-28 17:01                       ` Andreas Hartmann
2021-01-28 17:36                       ` Andreas Hartmann
2021-01-28 18:27                       ` Andreas Hartmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f3f85222-0d9d-2f31-0a3e-d1d60ea9d153@01019freenet.de \
    --to=andihartmann@01019freenet.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox