aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-hub.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-05-21 17:07:21 -0300
committerJason Gunthorpe <jgg@mellanox.com>2020-05-21 17:08:27 -0300
commiteafd47fc200ee759c0e8d205b9cc7342bd0f4199 (patch)
tree1cbbe6c983c6d00a08270a68ac69a1fa8ce4de8a /drivers/usb/host/xhci-hub.c
parentIB/hfi1: Enable the transmit side of the datagram ipoib netdev (diff)
parentLinux 5.7-rc6 (diff)
downloadlinux-dev-eafd47fc200ee759c0e8d205b9cc7342bd0f4199.tar.xz
linux-dev-eafd47fc200ee759c0e8d205b9cc7342bd0f4199.zip
Merge tag 'v5.7-rc6' into rdma.git for-next
Linux 5.7-rc6 Conflict in drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c resolved by deleting dr_cq_event, matching how netdev resolved it. Required for dependencies in the following patches. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/usb/host/xhci-hub.c')
-rw-r--r--drivers/usb/host/xhci-hub.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 9eca1fe81061..f37316d2c8fa 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -1571,6 +1571,8 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
}
if ((temp & PORT_RC))
reset_change = true;
+ if (temp & PORT_OC)
+ status = 1;
}
if (!status && !reset_change) {
xhci_dbg(xhci, "%s: stopping port polling.\n", __func__);
@@ -1636,6 +1638,13 @@ retry:
port_index);
goto retry;
}
+ /* bail out if port detected a over-current condition */
+ if (t1 & PORT_OC) {
+ bus_state->bus_suspended = 0;
+ spin_unlock_irqrestore(&xhci->lock, flags);
+ xhci_dbg(xhci, "Bus suspend bailout, port over-current detected\n");
+ return -EBUSY;
+ }
/* suspend ports in U0, or bail out for new connect changes */
if ((t1 & PORT_PE) && (t1 & PORT_PLS_MASK) == XDEV_U0) {
if ((t1 & PORT_CSC) && wake_enabled) {