Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8671
b: refs/heads/master
c: b789696
h: refs/heads/master
i:
  8669: aec0bb1
  8667: b0eda10
  8663: da774e4
  8655: 733d2bd
  8639: 98ac315
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Sep 12, 2005
1 parent aedaf54 commit 6fbbaa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 5f9809487bf035b49ff470709a65fbce3b345f51
refs/heads/master: b789696af8b4102b7cc26dec30c2c51ce51ee18b
9 changes: 5 additions & 4 deletions trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ void usb_hub_tt_clear_buffer (struct usb_device *udev, int pipe)
static void hub_power_on(struct usb_hub *hub)
{
int port1;
unsigned pgood_delay = hub->descriptor->bPwrOn2PwrGood * 2;

/* if hub supports power switching, enable power on each port */
if ((hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) < 2) {
Expand All @@ -444,8 +445,8 @@ static void hub_power_on(struct usb_hub *hub)
USB_PORT_FEAT_POWER);
}

/* Wait for power to be enabled */
msleep(hub->descriptor->bPwrOn2PwrGood * 2);
/* Wait at least 100 msec for power to become stable */
msleep(max(pgood_delay, (unsigned) 100));
}

static void hub_quiesce(struct usb_hub *hub)
Expand Down Expand Up @@ -1469,8 +1470,8 @@ static int hub_port_reset(struct usb_hub *hub, int port1,
/* return on disconnect or reset */
switch (status) {
case 0:
/* TRSTRCY = 10 ms */
msleep(10);
/* TRSTRCY = 10 ms; plus some extra */
msleep(10 + 40);
/* FALL THROUGH */
case -ENOTCONN:
case -ENODEV:
Expand Down

0 comments on commit 6fbbaa4

Please sign in to comment.