diff options
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/usb.c | 9 |
1 files changed, 7 insertions, 2 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; |