summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Hu <andy.hu@starfivetech.com>2023-10-12 14:02:49 +0300
committerAndy Hu <andy.hu@starfivetech.com>2023-10-12 14:02:49 +0300
commit17e00aaa325480c71765822555779bbad40aa5a2 (patch)
treebb0893d7dae7805004c51d9075fcf7eb3d6c11f1
parent3292692063d96dd74dd536cca943efda72ab81b7 (diff)
parent6f58ddddafb8069201d9d237c42ee22b02b1365a (diff)
downloadu-boot-17e00aaa325480c71765822555779bbad40aa5a2.tar.xz
Merge tag 'JH7110_515_SDK_v5.8.0' into vf2-devel
-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;