Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287815
b: refs/heads/master
c: a45aa3b
h: refs/heads/master
i:
  287813: 9ef5428
  287811: 44636e3
  287807: eca173c
v: v3
  • Loading branch information
Elric Fu authored and Sarah Sharp committed Feb 21, 2012
1 parent b669e6a commit dc6937c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cab928ee1f221c9cc48d6615070fefe2e444384a
refs/heads/master: a45aa3b30583e7d54e7cf4fbcd0aa699348a6e5c
30 changes: 17 additions & 13 deletions trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,26 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
if (type == HUB_INIT3)
goto init3;

/* After a resume, port power should still be on.
/* The superspeed hub except for root hub has to use Hub Depth
* value as an offset into the route string to locate the bits
* it uses to determine the downstream port number. So hub driver
* should send a set hub depth request to superspeed hub after
* the superspeed hub is set configuration in initialization or
* reset procedure.
*
* After a resume, port power should still be on.
* For any other type of activation, turn it on.
*/
if (type != HUB_RESUME) {
if (hdev->parent && hub_is_superspeed(hdev)) {
ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
HUB_SET_DEPTH, USB_RT_HUB,
hdev->level - 1, 0, NULL, 0,
USB_CTRL_SET_TIMEOUT);
if (ret < 0)
dev_err(hub->intfdev,
"set hub depth failed\n");
}

/* Speed up system boot by using a delayed_work for the
* hub's initial power-up delays. This is pretty awkward
Expand Down Expand Up @@ -987,18 +1003,6 @@ static int hub_configure(struct usb_hub *hub,
goto fail;
}

if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) {
ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
HUB_SET_DEPTH, USB_RT_HUB,
hdev->level - 1, 0, NULL, 0,
USB_CTRL_SET_TIMEOUT);

if (ret < 0) {
message = "can't set hub depth";
goto fail;
}
}

/* Request the entire hub descriptor.
* hub->descriptor can handle USB_MAXCHILDREN ports,
* but the hub can/will return fewer bytes here.
Expand Down

0 comments on commit dc6937c

Please sign in to comment.