forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-04 8a67202f814bbd808484ed00f93ede0531f51506
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;