diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2014-01-31 11:51:59 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-22 13:34:56 -0800 |
commit | 3144d9dda4654f52bab3396eaae3221b068e1c71 (patch) | |
tree | db6466538137912c9bd9450ea1cac4bf746dcdc8 | |
parent | 47f467ac740ebf0475a5176ddb1741acba6aad4e (diff) | |
download | lwn-3144d9dda4654f52bab3396eaae3221b068e1c71.tar.gz lwn-3144d9dda4654f52bab3396eaae3221b068e1c71.zip |
Revert "xhci: Avoid infinite loop when sg urb requires too many trbs"
commit 9cf00d91708221ff2d8a11143315f7ebab8d5da8 upstream.
This reverts commit d6c9ea9069af684358efedcaf2f2f687f51c58ee.
We are ripping out commit 35773dac5f862cb1c82ea151eba3e2f6de51ec3e "usb:
xhci: Link TRB must not occur within a USB payload burst" because it's a
hack that caused regressions in the usb-storage and userspace USB
drivers that use usbfs and libusb. This commit attempted to fix the
issues with that patch.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 64c36fe1ea6a..53c2e296467f 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -3008,7 +3008,7 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, if (num_trbs >= TRBS_PER_SEGMENT) { xhci_err(xhci, "Too many fragments %d, max %d\n", num_trbs, TRBS_PER_SEGMENT - 1); - return -EINVAL; + return -ENOMEM; } nop_cmd = cpu_to_le32(TRB_TYPE(TRB_TR_NOOP) | |