diff options
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hub.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 79a58c3a2e2a..90ae1753dda1 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -339,7 +339,8 @@ static int get_hub_status(struct usb_device *hdev, | |||
339 | { | 339 | { |
340 | int i, status = -ETIMEDOUT; | 340 | int i, status = -ETIMEDOUT; |
341 | 341 | ||
342 | for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) { | 342 | for (i = 0; i < USB_STS_RETRIES && |
343 | (status == -ETIMEDOUT || status == -EPIPE); i++) { | ||
343 | status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), | 344 | status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), |
344 | USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0, | 345 | USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0, |
345 | data, sizeof(*data), USB_STS_TIMEOUT); | 346 | data, sizeof(*data), USB_STS_TIMEOUT); |
@@ -355,7 +356,8 @@ static int get_port_status(struct usb_device *hdev, int port1, | |||
355 | { | 356 | { |
356 | int i, status = -ETIMEDOUT; | 357 | int i, status = -ETIMEDOUT; |
357 | 358 | ||
358 | for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) { | 359 | for (i = 0; i < USB_STS_RETRIES && |
360 | (status == -ETIMEDOUT || status == -EPIPE); i++) { | ||
359 | status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), | 361 | status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), |
360 | USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port1, | 362 | USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port1, |
361 | data, sizeof(*data), USB_STS_TIMEOUT); | 363 | data, sizeof(*data), USB_STS_TIMEOUT); |