Signed-off-by: Jules Maselbas <[email protected]>
---
 drivers/usb/core/hub.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 91a938567..910a87021 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -158,7 +158,8 @@ int hub_port_reset(struct usb_device *hub, int port, struct 
usb_device *usb)
                return -1;
        }
 
-       usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_RESET);
+       if (portstatus & USB_PORT_STAT_C_RESET)
+               usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_RESET);
 
        if (portstatus & USB_PORT_STAT_HIGH_SPEED)
                usb->speed = USB_SPEED_HIGH;
-- 
2.21.0.196.g041f5ea


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to