hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/usb/host/ehci-hub.c
....@@ -1174,7 +1174,7 @@
11741174 goto error;
11751175 wIndex--;
11761176 temp = ehci_readl(ehci, status_reg);
1177
- if (temp & PORT_OWNER)
1177
+ if ((temp & PORT_OWNER) && (!HCD_POWER_ON(hcd)))
11781178 break;
11791179
11801180 temp &= ~PORT_RWC_BITS;
....@@ -1217,6 +1217,7 @@
12171217 if (HCS_PPC(ehci->hcs_params)) {
12181218 spin_unlock_irqrestore(&ehci->lock, flags);
12191219 ehci_port_power(ehci, wIndex, true);
1220
+ clear_bit(HCD_FLAG_POWER_ON, &hcd->flags);
12201221 spin_lock_irqsave(&ehci->lock, flags);
12211222 }
12221223 break;