aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/hub.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 42566d774d18..9641e9c1dec5 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2597,6 +2597,11 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
2597 return 0; 2597 return 0;
2598 } 2598 }
2599 } else { 2599 } else {
2600 if (!(portstatus & USB_PORT_STAT_CONNECTION) ||
2601 hub_port_warm_reset_required(hub,
2602 portstatus))
2603 return -ENOTCONN;
2604
2600 return 0; 2605 return 0;
2601 } 2606 }
2602 2607
@@ -4694,9 +4699,14 @@ static void hub_events(void)
4694 * SS.Inactive state. 4699 * SS.Inactive state.
4695 */ 4700 */
4696 if (hub_port_warm_reset_required(hub, portstatus)) { 4701 if (hub_port_warm_reset_required(hub, portstatus)) {
4702 int status;
4703
4697 dev_dbg(hub_dev, "warm reset port %d\n", i); 4704 dev_dbg(hub_dev, "warm reset port %d\n", i);
4698 hub_port_reset(hub, i, NULL, 4705 status = hub_port_reset(hub, i, NULL,
4699 HUB_BH_RESET_TIME, true); 4706 HUB_BH_RESET_TIME, true);
4707 if (status < 0)
4708 hub_port_disable(hub, i, 1);
4709 connect_change = 0;
4700 } 4710 }
4701 4711
4702 if (connect_change) 4712 if (connect_change)