From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: walt <w41ter@gmail.com>, Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
David Laight <david.laight@aculab.com>,
Mark Lord <mlord@pobox.com>,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst
Date: Thu, 2 Jan 2014 11:15:10 -0800 [thread overview]
Message-ID: <20140102191510.GA9621@xanatos> (raw)
In-Reply-To: <52C32BB0.90600@gmail.com>
On Tue, Dec 31, 2013 at 12:40:16PM -0800, walt wrote:
> On 12/18/2013 01:11 PM, Greg Kroah-Hartman wrote:
> > 3.12-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: David Laight <David.Laight@ACULAB.COM>
> >
> > commit 35773dac5f862cb1c82ea151eba3e2f6de51ec3e upstream.
> >
> > Section 4.11.7.1 of rev 1.0 of the xhci specification states that a link TRB
> > can only occur at a boundary between underlying USB frames (512 bytes for
> > high speed devices).
> >
> > If this isn't done the USB frames aren't formatted correctly and, for example,
> > the USB3 ethernet ax88179_178a card will stop sending...
>
>
> Unfortunately this patch causes a regression when copying large files to my
> outboard USB3 drive. (Nothing at all to do with networking.)
>
> When I try to copy a large (20GB) file to the USB3 drive, the copy dies after
> about 7GB, the ext4 journal aborts and the drive is remounted read-only.
>
> This bug is 100% reproducible (always pretty close to 7GB) and reverting this
> patch completely fixes the problem.
Ok, I had feared that would be a consequence of this patch. I think the
problem is that the usb-storage driver submitted an URB with more
scatter-gather entries than would fit on the ring segment, the xHCI
driver rejected the URB with -ENOMEM, and the SCSI core eventually gave
up on the SCSI command.
Do you have CONFIG_USB_DEBUG turned on for 3.13? If so, you should see
dmesg output from this statement shortly before your drive fails:
if (num_trbs >= TRBS_PER_SEGMENT) {
xhci_err(xhci, "Too many fragments %d, max %d\n",
num_trbs, TRBS_PER_SEGMENT - 1);
return -ENOMEM;
}
> (Note to Sarah: I recently emailed you about this problem, and I *wrongly*
> said that reverting the patch doesn't help. That was a mistake, sorry.)
>
> I'm happy to try any debugging suggestions/tricks.
Unfortunately a real fix for this is going to take a bit. I have a
couple different solutions to the bug the patch solved, but they're much
more invasive than the original patch and will take a couple weeks to
implement and thoroughly test.
If David's patch is just reverted, USB ethernet on 3.12 and later breaks
under xHCI. The networking folks added scatter-gather support in 3.12.
Those patches could be reverted, but I suspect David Miller will not be
happy with that solution, since the real problem is the xHCI driver
itself, and EHCI scatter-gather works fine.
I think the short term solution is to simply turn off scatter-gather all
together under xHCI until this gets fixed. It could mean a big
performance hit for USB storage devices, but that means we get correct
behavior for both USB ethernet and USB storage.
> BTW, please tell me if I've cc'd too many people.
Nope, you're fine. I've Cc'ed the USB and SCSI mailing lists as well.
Sarah Sharp
next parent reply other threads:[~2014-01-02 19:15 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20131218211219.461663463@linuxfoundation.org>
[not found] ` <20131218211220.412278148@linuxfoundation.org>
[not found] ` <52C32BB0.90600@gmail.com>
2014-01-02 19:15 ` Sarah Sharp [this message]
2014-01-02 21:01 ` [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst Mark Lord
[not found] ` <52C5D3A9.60708-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2014-01-02 21:19 ` James Bottomley
2014-01-02 21:33 ` Sarah Sharp
2014-01-03 15:40 ` walt
2014-01-03 19:54 ` Sarah Sharp
2014-01-03 21:21 ` walt
2014-01-03 23:29 ` Sarah Sharp
2014-01-07 0:31 ` Sarah Sharp
2014-01-07 13:29 ` walt
2014-01-07 13:51 ` David Laight
2014-01-07 13:58 ` David Laight
2014-01-07 19:15 ` walt
2014-01-07 20:00 ` walt
2014-01-07 23:31 ` Sarah Sharp
[not found] ` <063D6719AE5E284EB5DD2968C1650D6D453E1A-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-01-07 21:27 ` Sarah Sharp
[not found] ` <52CC014C.5060604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-07 21:21 ` Sarah Sharp
2014-01-08 0:47 ` Sarah Sharp
2014-01-08 1:35 ` walt
2014-01-08 16:09 ` David Laight
[not found] ` <52CCA94D.5090700@gmail.com>
2014-01-09 23:50 ` Sarah Sharp
2014-01-10 14:40 ` walt
2014-01-10 14:58 ` David Laight
2014-01-10 15:12 ` Alan Stern
2014-01-13 23:39 ` [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst [NEW HARDWARE] walt
2014-01-14 9:43 ` David Laight
[not found] ` <52D4791B.3030309-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-14 17:20 ` Sarah Sharp
2014-01-14 21:27 ` walt
2014-01-16 20:46 ` Sarah Sharp
2014-01-17 14:34 ` David Laight
[not found] ` <063D6719AE5E284EB5DD2968C1650D6D45EDA3-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-01-18 18:34 ` walt
2014-01-18 20:23 ` walt
2014-01-20 10:40 ` David Laight
2014-01-20 11:21 ` David Laight
2014-01-20 18:14 ` Sarah Sharp
2014-01-21 9:51 ` David Laight
2014-01-21 22:07 ` walt
2014-01-22 9:17 ` David Laight
2014-01-08 16:39 ` [PATCH 3.12 033/118] usb: xhci: Link TRB must not occur within a USB payload burst Alan Stern
[not found] ` <Pine.LNX.4.44L0.1401081130410.1659-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-01-08 16:51 ` David Laight
[not found] ` <063D6719AE5E284EB5DD2968C1650D6D455602-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-01-08 17:14 ` Alan Stern
2014-01-08 17:24 ` David Laight
2014-01-09 1:22 ` walt
2014-01-09 10:05 ` David Laight
[not found] ` <063D6719AE5E284EB5DD2968C1650D6D455F92-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-01-09 15:10 ` walt
2014-01-04 14:03 ` Mark Lord
2014-01-06 10:35 ` David Laight
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=20140102191510.GA9621@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=david.laight@aculab.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mlord@pobox.com \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=w41ter@gmail.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