summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-05-10 14:10:16 +0200
committerSimon Glass <sjg@chromium.org>2015-05-14 18:49:31 -0600
commit45b9ea1da2f9e5110ced2fe2808aee224183aa54 (patch)
tree80cd993c0f86e575fbfd22276861a9435211d8b8 /drivers/usb
parentad84a42fc5143ef66a75550d7465b86cbc787f25 (diff)
downloadu-boot-imx-45b9ea1da2f9e5110ced2fe2808aee224183aa54.zip
u-boot-imx-45b9ea1da2f9e5110ced2fe2808aee224183aa54.tar.gz
u-boot-imx-45b9ea1da2f9e5110ced2fe2808aee224183aa54.tar.bz2
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 <hdegoede@redhat.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-hcd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index ce760d0..e4c462f 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -875,7 +875,7 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
port - 1);
reg |= EHCI_PS_PO;
ehci_writel(status_reg, reg);
- break;
+ return -ENXIO;
} else {
int ret;
@@ -905,6 +905,7 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe,
reg &= ~EHCI_PS_CLEAR;
reg |= EHCI_PS_PO;
ehci_writel(status_reg, reg);
+ return -ENXIO;
} else {
ctrl->portreset |= 1 << port;
}