|
@@ -339,7 +339,8 @@ static int get_hub_status(struct usb_device *hdev,
|
|
|
{
|
|
|
int i, status = -ETIMEDOUT;
|
|
|
|
|
|
- for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) {
|
|
|
+ for (i = 0; i < USB_STS_RETRIES &&
|
|
|
+ (status == -ETIMEDOUT || status == -EPIPE); i++) {
|
|
|
status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
|
|
|
USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0,
|
|
|
data, sizeof(*data), USB_STS_TIMEOUT);
|
|
@@ -355,7 +356,8 @@ static int get_port_status(struct usb_device *hdev, int port1,
|
|
|
{
|
|
|
int i, status = -ETIMEDOUT;
|
|
|
|
|
|
- for (i = 0; i < USB_STS_RETRIES && status == -ETIMEDOUT; i++) {
|
|
|
+ for (i = 0; i < USB_STS_RETRIES &&
|
|
|
+ (status == -ETIMEDOUT || status == -EPIPE); i++) {
|
|
|
status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
|
|
|
USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port1,
|
|
|
data, sizeof(*data), USB_STS_TIMEOUT);
|