summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/usb_hub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c
index ba11a188ca..d0f4b8c2a7 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -376,6 +376,9 @@ int usb_hub_port_connect_change(struct usb_device *dev, int port)
return ret;
}
+ if (le16_to_cpu(portsts->wPortChange) & USB_PORT_STAT_C_OVERCURRENT)
+ return -EIO;
+
switch (portstatus & USB_PORT_STAT_SPEED_MASK) {
case USB_PORT_STAT_SUPER_SPEED:
speed = USB_SPEED_SUPER;