|
@@ -2597,6 +2597,11 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
|
|
|
return 0;
|
|
|
}
|
|
|
} else {
|
|
|
+ if (!(portstatus & USB_PORT_STAT_CONNECTION) ||
|
|
|
+ hub_port_warm_reset_required(hub,
|
|
|
+ portstatus))
|
|
|
+ return -ENOTCONN;
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -4694,9 +4699,14 @@ static void hub_events(void)
|
|
|
* SS.Inactive state.
|
|
|
*/
|
|
|
if (hub_port_warm_reset_required(hub, portstatus)) {
|
|
|
+ int status;
|
|
|
+
|
|
|
dev_dbg(hub_dev, "warm reset port %d\n", i);
|
|
|
- hub_port_reset(hub, i, NULL,
|
|
|
+ status = hub_port_reset(hub, i, NULL,
|
|
|
HUB_BH_RESET_TIME, true);
|
|
|
+ if (status < 0)
|
|
|
+ hub_port_disable(hub, i, 1);
|
|
|
+ connect_change = 0;
|
|
|
}
|
|
|
|
|
|
if (connect_change)
|