aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 822f8c50e423..41eaf0b52518 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2614,7 +2614,7 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
2614#define SET_CONFIG_TRIES (2 * (use_both_schemes + 1)) 2614#define SET_CONFIG_TRIES (2 * (use_both_schemes + 1))
2615#define USE_NEW_SCHEME(i) ((i) / 2 == (int)old_scheme_first) 2615#define USE_NEW_SCHEME(i) ((i) / 2 == (int)old_scheme_first)
2616 2616
2617#define HUB_ROOT_RESET_TIME 50 /* times are in msec */ 2617#define HUB_ROOT_RESET_TIME 60 /* times are in msec */
2618#define HUB_SHORT_RESET_TIME 10 2618#define HUB_SHORT_RESET_TIME 10
2619#define HUB_BH_RESET_TIME 50 2619#define HUB_BH_RESET_TIME 50
2620#define HUB_LONG_RESET_TIME 200 2620#define HUB_LONG_RESET_TIME 200
@@ -4342,6 +4342,7 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
4342 enum usb_device_speed oldspeed = udev->speed; 4342 enum usb_device_speed oldspeed = udev->speed;
4343 const char *speed; 4343 const char *speed;
4344 int devnum = udev->devnum; 4344 int devnum = udev->devnum;
4345 const char *driver_name;
4345 4346
4346 /* root hub ports have a slightly longer reset period 4347 /* root hub ports have a slightly longer reset period
4347 * (from USB 2.0 spec, section 7.1.7.5) 4348 * (from USB 2.0 spec, section 7.1.7.5)
@@ -4409,11 +4410,23 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
4409 else 4410 else
4410 speed = usb_speed_string(udev->speed); 4411 speed = usb_speed_string(udev->speed);
4411 4412
4413 /*
4414 * The controller driver may be NULL if the controller device
4415 * is the middle device between platform device and roothub.
4416 * This middle device may not need a device driver due to
4417 * all hardware control can be at platform device driver, this
4418 * platform device is usually a dual-role USB controller device.
4419 */
4420 if (udev->bus->controller->driver)
4421 driver_name = udev->bus->controller->driver->name;
4422 else
4423 driver_name = udev->bus->sysdev->driver->name;
4424
4412 if (udev->speed < USB_SPEED_SUPER) 4425 if (udev->speed < USB_SPEED_SUPER)
4413 dev_info(&udev->dev, 4426 dev_info(&udev->dev,
4414 "%s %s USB device number %d using %s\n", 4427 "%s %s USB device number %d using %s\n",
4415 (udev->config) ? "reset" : "new", speed, 4428 (udev->config) ? "reset" : "new", speed,
4416 devnum, udev->bus->controller->driver->name); 4429 devnum, driver_name);
4417 4430
4418 /* Set up TT records, if needed */ 4431 /* Set up TT records, if needed */
4419 if (hdev->tt) { 4432 if (hdev->tt) {
@@ -4545,7 +4558,7 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
4545 "%s SuperSpeed%s USB device number %d using %s\n", 4558 "%s SuperSpeed%s USB device number %d using %s\n",
4546 (udev->config) ? "reset" : "new", 4559 (udev->config) ? "reset" : "new",
4547 (udev->speed == USB_SPEED_SUPER_PLUS) ? "Plus" : "", 4560 (udev->speed == USB_SPEED_SUPER_PLUS) ? "Plus" : "",
4548 devnum, udev->bus->controller->driver->name); 4561 devnum, driver_name);
4549 } 4562 }
4550 4563
4551 /* cope with hardware quirkiness: 4564 /* cope with hardware quirkiness: