Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Alan Stern
On Tue, 4 Mar 2014, Sarah Sharp wrote: > > David is right; this problem can't be fixed simply by reverting > > patches. The real problem is that the block layer has handed the USB > > stack an SG list that xhci-hcd cannot handle at all, in its current > > form. > > We do not know if the driver n

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Sarah Sharp
On Tue, Mar 04, 2014 at 10:00:16AM -0500, Alan Stern wrote: > On Tue, 4 Mar 2014, David Laight wrote: > > > > > Notice the request length: 1536. That's three 512-byte sectors. A > > > > little unusual, since most I/O is done in units of pages, which are > > > > 4096 bytes. > > > > Ok, we can't

RE: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread David Laight
From: Sarah Sharp ... > The block layer may submit scatter-gather lists with entries that > are multiples of 512-byte blocks. That's fine for USB 2.0 devices, > where the bulk endpoint max packet size is 512 bytes. But USB 3.0 > devices have bulk endpoints with a 1024 byte max packet size. > > T

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Alan Stern
On Tue, 4 Mar 2014, Sarah Sharp wrote: > Scatter-gather under xHCI seems to work fine on mass storage, but it > fails with that particular ASIX device, because of how the xHCI driver > sets up the buffers on the endpoint rings. We need to implement the TD > fragment rules to avoid breaking this p

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Sarah Sharp
On Tue, Mar 04, 2014 at 10:45:34AM +0800, Ming Lei wrote: > On Tue, Mar 4, 2014 at 5:47 AM, Sarah Sharp > wrote: > > Ok, we can't have SuperSpeed mass storage devices broken, so it looks > > like we'll have to revert the last patch to add scatter-gather to the > > ASIX driver to avoid that breaka

RE: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Alan Stern
On Tue, 4 Mar 2014, David Laight wrote: > > An alternative is to work around this particular problem by identifying > > the code that submits the 3-sector SG element, and changing it to use > > an even number of sectors. But obviously that doesn't solve the > > underlying issue. > > Actually mos

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Ming Lei
On Tue, Mar 4, 2014 at 11:21 PM, David Laight wrote: > > Actually most of the block layer code could be taught to split requests > into multiple URBs. Or even resubmit bounced requests split in two. > Although splitting requests won't help the network code. It might not help storage too since the

RE: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread David Laight
From: Alan Stern > There are only two reasonable ways to fix this: Add appropriate TRB > fragment handling into xhci-hcd, or use bounce buffers for non-aligned > requests. > > In theory the block layer could be taught about the need for these > bounce buffers, but that would be only a partial solu

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Ming Lei
On Tue, Mar 4, 2014 at 10:56 PM, David Laight wrote: > From: Bjørn Mork >> > If xHCI won't plan to support arbitrary-length scatter-gather any more, >> > that >> > is fine to revert the commit forever. Otherwise, it should be better to >> > just >> > clear no_sg_constraint in xhcd, shouldn't it

RE: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Alan Stern
On Tue, 4 Mar 2014, David Laight wrote: > > > Notice the request length: 1536. That's three 512-byte sectors. A > > > little unusual, since most I/O is done in units of pages, which are > > > 4096 bytes. > > Ok, we can't have SuperSpeed mass storage devices broken, so it looks > > like we'll ha

RE: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread David Laight
From: Bjørn Mork > > If xHCI won't plan to support arbitrary-length scatter-gather any more, that > > is fine to revert the commit forever. Otherwise, it should be better to > > just > > clear no_sg_constraint in xhcd, shouldn't it? > > No, that's what's currently causing bugs with the storage d

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread Bjørn Mork
Ming Lei writes: >>> The SG entries don't come from usb-storage; they come from the block >>> layer. As far as I know, there is no way to tell the block layer that >>> each element in an SG list (except the last) must be a multiple of >>> some specific size. >>> >>> > revert commit 3804fad45411

RE: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-04 Thread David Laight
From: Sarah Sharp > Greg, Dave, Freddy, question about cross-subsystem reverts below: > > On Fri, Feb 28, 2014 at 04:15:12PM -0500, Alan Stern wrote: > > On Fri, 28 Feb 2014, Sarah Sharp wrote: > > > > > When testing 3.14-rc1 with a USB 3.0 Lexar flash drive, the drive fails > > > to be mounted.

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-03 Thread Ming Lei
On Tue, Mar 4, 2014 at 5:47 AM, Sarah Sharp wrote: > Greg, Dave, Freddy, question about cross-subsystem reverts below: > > On Fri, Feb 28, 2014 at 04:15:12PM -0500, Alan Stern wrote: >> On Fri, 28 Feb 2014, Sarah Sharp wrote: >> >> > When testing 3.14-rc1 with a USB 3.0 Lexar flash drive, the driv

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-03 Thread Sarah Sharp
Greg, Dave, Freddy, question about cross-subsystem reverts below: On Fri, Feb 28, 2014 at 04:15:12PM -0500, Alan Stern wrote: > On Fri, 28 Feb 2014, Sarah Sharp wrote: > > > When testing 3.14-rc1 with a USB 3.0 Lexar flash drive, the drive fails > > to be mounted. I added a bit of debugging to t

RE: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-03-03 Thread David Laight
From: Alan Stern > > When testing 3.14-rc1 with a USB 3.0 Lexar flash drive, the drive fails > > to be mounted. ... > > That revealed the SCSI request fails because the USB core is rejecting a > > scatter-gather list with an entry that isn't aligned to the max packet size: > > > Feb 28 09:45:30 xa

Re: 3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-02-28 Thread Alan Stern
On Fri, 28 Feb 2014, Sarah Sharp wrote: > When testing 3.14-rc1 with a USB 3.0 Lexar flash drive, the drive fails > to be mounted. I added a bit of debugging to the USB core: > > diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c > index 9ff665f1322f..eff59ac37865 100644 > --- a/driver

3.13-rc1 regression: Scatter-gather list issues at SuperSpeed only

2014-02-28 Thread Sarah Sharp
When testing 3.14-rc1 with a USB 3.0 Lexar flash drive, the drive fails to be mounted. I added a bit of debugging to the USB core: diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 9ff665f1322f..eff59ac37865 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -430