[RFC 3/7] xhci: Fix check for LS/FS device attached to roothub.

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

 



Once the xHCI host controller has a USB 2.0 roothub and a USB 3.0 roothub,
the TT field of the USB 2.0 roothub usb device will no longer be null.  To
check whether a LS/FS device is plugged into the HS roothub, see if the
parent's parent is NULL.  We don't need the TT information if the LS/FS
device is plugged into a roothub port.

This bug would only show up after the split roothub code is added.

Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
---
 drivers/usb/host/xhci-mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 1d0f45f..76a9f1c 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -870,9 +870,9 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
 	dev->port = top_dev->portnum;
 	xhci_dbg(xhci, "Set root hub portnum to %d\n", top_dev->portnum);
 
-	/* Is this a LS/FS device under a HS hub? */
+	/* Is this a LS/FS device under an external HS hub? */
 	if ((udev->speed == USB_SPEED_LOW || udev->speed == USB_SPEED_FULL) &&
-			udev->tt) {
+			udev->parent->parent && udev->tt) {
 		slot_ctx->tt_info = udev->tt->hub->slot_id;
 		slot_ctx->tt_info |= udev->ttport << 8;
 		if (udev->tt->multi)
-- 
1.6.3.3

--
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