summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2013-07-29 13:27:39 +0300
committerMarek Vasut <marex@denx.de>2013-07-29 23:01:33 +0200
commit0adc331b37b71093a047607faf1ed1b60e572017 (patch)
treefe538ea26cad2ce0bf3be5e1e4d959b51b9095a3
parentbb1f327d0a6ec9236c172fdc0912ace7c8e2ea83 (diff)
downloadu-boot-imx-0adc331b37b71093a047607faf1ed1b60e572017.zip
u-boot-imx-0adc331b37b71093a047607faf1ed1b60e572017.tar.gz
u-boot-imx-0adc331b37b71093a047607faf1ed1b60e572017.tar.bz2
usb_hub: fix power cycling logic
When power cycling the hub ports, a misbehaving port will prevent all ports from being powered on because we quit at the first sign of trouble. Skip problematic ports instead of failing the entire power on. Cc: Marek Vasut <marex@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
-rw-r--r--common/usb_hub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 754d436..a11b401 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -110,7 +110,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
ret = usb_get_port_status(dev, i + 1, portsts);
if (ret < 0) {
debug("port %d: get_port_status failed\n", i + 1);
- return;
+ continue;
}
/*
@@ -125,7 +125,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
portstatus = le16_to_cpu(portsts->wPortStatus);
if (portstatus & (USB_PORT_STAT_POWER << 1)) {
debug("port %d: Port power change failed\n", i + 1);
- return;
+ continue;
}
}