summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy.hu <andy.hu@starfivetech.com>2023-10-11 11:31:36 +0300
committerandy.hu <andy.hu@starfivetech.com>2023-10-11 11:31:36 +0300
commit6f58ddddafb8069201d9d237c42ee22b02b1365a (patch)
treeaa4f2b5a25be36e84a2835ea3d1fee99c5687f65
parent5a6195d02812c3fb8629276cea63a95ae79e8afa (diff)
parent25ce4e7598e5ed6bdc268b8444a0ea88000eeb1b (diff)
downloadu-boot-6f58ddddafb8069201d9d237c42ee22b02b1365a.tar.xz
Merge branch 'usb_fix_duplicate_device_minda' into 'jh7110-master'
CR7345 usb: hub: Do NOT add device if portchanged over current bit is set See merge request sdk/u-boot!72
-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;