Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348683
b: refs/heads/master
c: 4f43447
h: refs/heads/master
i:
  348681: 31dc5a9
  348679: 43aaa29
v: v3
  • Loading branch information
Sarah Sharp committed Jan 3, 2013
1 parent 6c0e3fa commit 6dc3f61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 77c7f072c87fa951e9a74805febf26466f31170c
refs/heads/master: 4f43447e62b37ee19c82a13f72f35b1ca60a74d3
14 changes: 7 additions & 7 deletions trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2534,6 +2534,10 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
if (ret < 0)
return ret;

/* The port state is unknown until the reset completes. */
if ((portstatus & USB_PORT_STAT_RESET))
goto delay;

/*
* Some buggy devices require a warm reset to be issued even
* when the port appears not to be connected.
Expand Down Expand Up @@ -2579,11 +2583,7 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
if ((portchange & USB_PORT_STAT_C_CONNECTION))
return -ENOTCONN;

/* if we`ve finished resetting, then break out of
* the loop
*/
if (!(portstatus & USB_PORT_STAT_RESET) &&
(portstatus & USB_PORT_STAT_ENABLE)) {
if ((portstatus & USB_PORT_STAT_ENABLE)) {
if (hub_is_wusb(hub))
udev->speed = USB_SPEED_WIRELESS;
else if (hub_is_superspeed(hub->hdev))
Expand All @@ -2597,10 +2597,10 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
return 0;
}
} else {
if (portchange & USB_PORT_STAT_C_BH_RESET)
return 0;
return 0;
}

delay:
/* switch to the long delay after two short delay failures */
if (delay_time >= 2 * HUB_SHORT_RESET_TIME)
delay = HUB_LONG_RESET_TIME;
Expand Down

0 comments on commit 6dc3f61

Please sign in to comment.