summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/hub.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 9954c0568f..2ac4184969 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -339,8 +339,9 @@ static void usb_scan_port(struct usb_device_scan *usb_scan)
dev_dbg(&dev->dev, "port%d: Status 0x%04x Change 0x%04x\n",
port + 1, portstatus, portchange);
- if (!(portchange & USB_PORT_STAT_C_CONNECTION)) {
- if(get_time_ns() >= hub->connect_timeout) {
+ if (!(portchange & USB_PORT_STAT_C_CONNECTION) ||
+ !(portstatus & USB_PORT_STAT_CONNECTION)) {
+ if (get_time_ns() >= hub->connect_timeout) {
dev_dbg(&dev->dev, "port%d: timeout\n", port + 1);
/* Remove this device from scanning list */
goto remove;
@@ -348,10 +349,6 @@ static void usb_scan_port(struct usb_device_scan *usb_scan)
return;
}
- /* Test if the connection came up, and if not exit */
- if(!(portstatus & USB_PORT_STAT_CONNECTION))
- return;
-
if (portchange & USB_PORT_STAT_C_RESET) {
dev_dbg(&dev->dev, "port%d: reset change\n", port + 1);
usb_clear_port_feature(dev, port + 1,