diff options
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 210e3597091..3776ddf0c75 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -705,10 +705,26 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | |||
705 | if (type == HUB_INIT3) | 705 | if (type == HUB_INIT3) |
706 | goto init3; | 706 | goto init3; |
707 | 707 | ||
708 | /* After a resume, port power should still be on. | 708 | /* The superspeed hub except for root hub has to use Hub Depth |
709 | * value as an offset into the route string to locate the bits | ||
710 | * it uses to determine the downstream port number. So hub driver | ||
711 | * should send a set hub depth request to superspeed hub after | ||
712 | * the superspeed hub is set configuration in initialization or | ||
713 | * reset procedure. | ||
714 | * | ||
715 | * After a resume, port power should still be on. | ||
709 | * For any other type of activation, turn it on. | 716 | * For any other type of activation, turn it on. |
710 | */ | 717 | */ |
711 | if (type != HUB_RESUME) { | 718 | if (type != HUB_RESUME) { |
719 | if (hdev->parent && hub_is_superspeed(hdev)) { | ||
720 | ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
721 | HUB_SET_DEPTH, USB_RT_HUB, | ||
722 | hdev->level - 1, 0, NULL, 0, | ||
723 | USB_CTRL_SET_TIMEOUT); | ||
724 | if (ret < 0) | ||
725 | dev_err(hub->intfdev, | ||
726 | "set hub depth failed\n"); | ||
727 | } | ||
712 | 728 | ||
713 | /* Speed up system boot by using a delayed_work for the | 729 | /* Speed up system boot by using a delayed_work for the |
714 | * hub's initial power-up delays. This is pretty awkward | 730 | * hub's initial power-up delays. This is pretty awkward |
@@ -987,18 +1003,6 @@ static int hub_configure(struct usb_hub *hub, | |||
987 | goto fail; | 1003 | goto fail; |
988 | } | 1004 | } |
989 | 1005 | ||
990 | if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) { | ||
991 | ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
992 | HUB_SET_DEPTH, USB_RT_HUB, | ||
993 | hdev->level - 1, 0, NULL, 0, | ||
994 | USB_CTRL_SET_TIMEOUT); | ||
995 | |||
996 | if (ret < 0) { | ||
997 | message = "can't set hub depth"; | ||
998 | goto fail; | ||
999 | } | ||
1000 | } | ||
1001 | |||
1002 | /* Request the entire hub descriptor. | 1006 | /* Request the entire hub descriptor. |
1003 | * hub->descriptor can handle USB_MAXCHILDREN ports, | 1007 | * hub->descriptor can handle USB_MAXCHILDREN ports, |
1004 | * but the hub can/will return fewer bytes here. | 1008 | * but the hub can/will return fewer bytes here. |