[PATCH] xhci: Limit TD fragments to 1.0 xHCI hosts only.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Walt reports that the PCI add-in card for his 0.96 ASMedia host dies in
a particular machine.  This symptom goes away when commit
35773dac5f862cb1c82ea151eba3e2f6de51ec3e "usb: xhci: Link TRB must not
occur within a USB payload burst" is reverted.

Only 1.0 xHCI hosts actually need TD fragments, so limit that patch to
only work on 1.0 hosts.  Leave the scatter-gather entry length
limitation in tact, to ensure consistent buffer limitation lengths
across host controller versions.  Otherwise we'll have some very
confused driver writers.

Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
Reported-by: walt <w41ter@xxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx # 3.12
Cc: David Laight <David.Laight@xxxxxxxxxx>
---

Walt, will you please put your ASMedia host into the system it failed
on, and test this patch on 3.13 (or the last vanilla kernel it failed
on)?

Thanks,
Sarah Sharp

 drivers/usb/host/xhci-ring.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index a0b248c34526..bdda69fd1651 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2971,6 +2971,8 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
 					TRBS_PER_SEGMENT - 1 - trb;
 			u32 nop_cmd;
 
+			if (xhci->hci_version < 0x100)
+				break;
 			/*
 			 * Section 4.11.7.1 TD Fragments states that a link
 			 * TRB must only occur at the boundary between
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux