[PATCH 2/6] usb: hub: Only clear port reset status if set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jules Maselbas <jmaselbas@xxxxxxxxx>
---
 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
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux