File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1571,6 +1571,8 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
1571
1571
}
1572
1572
if ((temp & PORT_RC ))
1573
1573
reset_change = true;
1574
+ if (temp & PORT_OC )
1575
+ status = 1 ;
1574
1576
}
1575
1577
if (!status && !reset_change ) {
1576
1578
xhci_dbg (xhci , "%s: stopping port polling.\n" , __func__ );
@@ -1636,6 +1638,13 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
1636
1638
port_index );
1637
1639
goto retry ;
1638
1640
}
1641
+ /* bail out if port detected a over-current condition */
1642
+ if (t1 & PORT_OC ) {
1643
+ bus_state -> bus_suspended = 0 ;
1644
+ spin_unlock_irqrestore (& xhci -> lock , flags );
1645
+ xhci_dbg (xhci , "Bus suspend bailout, port over-current detected\n" );
1646
+ return - EBUSY ;
1647
+ }
1639
1648
/* suspend ports in U0, or bail out for new connect changes */
1640
1649
if ((t1 & PORT_PE ) && (t1 & PORT_PLS_MASK ) == XDEV_U0 ) {
1641
1650
if ((t1 & PORT_CSC ) && wake_enabled ) {
You can’t perform that action at this time.
0 commit comments