From 45b9ea1da2f9e5110ced2fe2808aee224183aa54 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 10 May 2015 14:10:16 +0200 Subject: usb: Stop reset procedure when a dev is handed over to a companion hcd Short circuit the retry loop in legacy_hub_port_reset() by returning an error from usb_control_msg() when a device was handed over to a companion by the ehci code. This avoids trying to reset low / fullspeed devices 5 times needlessly. Also do not print an error when a device has been handed over. Signed-off-by: Hans de Goede --- common/usb_hub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/usb_hub.c b/common/usb_hub.c index 7aac220..af39c76 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -271,7 +271,8 @@ int usb_hub_port_connect_change(struct usb_device *dev, int port) /* Reset the port */ ret = legacy_hub_port_reset(dev, port, &portstatus); if (ret < 0) { - printf("cannot reset port %i!?\n", port + 1); + if (ret != -ENXIO) + printf("cannot reset port %i!?\n", port + 1); return ret; } -- cgit v1.1