diff options
-rw-r--r-- | drivers/usb/core/usb.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 30dd2636f26..b1b85abb9a2 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -413,8 +413,13 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, | |||
413 | } else { | 413 | } else { |
414 | snprintf(dev->devpath, sizeof dev->devpath, | 414 | snprintf(dev->devpath, sizeof dev->devpath, |
415 | "%s.%d", parent->devpath, port1); | 415 | "%s.%d", parent->devpath, port1); |
416 | dev->route = parent->route + | 416 | /* Route string assumes hubs have less than 16 ports */ |
417 | (port1 << ((parent->level - 1)*4)); | 417 | if (port1 < 15) |
418 | dev->route = parent->route + | ||
419 | (port1 << ((parent->level - 1)*4)); | ||
420 | else | ||
421 | dev->route = parent->route + | ||
422 | (15 << ((parent->level - 1)*4)); | ||
418 | } | 423 | } |
419 | 424 | ||
420 | dev->dev.parent = &parent->dev; | 425 | dev->dev.parent = &parent->dev; |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 6e6797a3878..e046f0f6ee6 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -360,9 +360,9 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud | |||
360 | /* 3) Only the control endpoint is valid - one endpoint context */ | 360 | /* 3) Only the control endpoint is valid - one endpoint context */ |
361 | slot_ctx->dev_info |= LAST_CTX(1); | 361 | slot_ctx->dev_info |= LAST_CTX(1); |
362 | 362 | ||
363 | slot_ctx->dev_info |= (u32) udev->route; | ||
363 | switch (udev->speed) { | 364 | switch (udev->speed) { |
364 | case USB_SPEED_SUPER: | 365 | case USB_SPEED_SUPER: |
365 | slot_ctx->dev_info |= (u32) udev->route; | ||
366 | slot_ctx->dev_info |= (u32) SLOT_SPEED_SS; | 366 | slot_ctx->dev_info |= (u32) SLOT_SPEED_SS; |
367 | break; | 367 | break; |
368 | case USB_SPEED_HIGH: | 368 | case USB_SPEED_HIGH: |