USB: Retry GetPortStatus if HUB returns 2 bytes instead of 4
Internal HUB present in ISP1763A sometimes returns 2 bytes of data in response to GetPortStatus request. This is observed during mutiple iterations of suspend/resume with ISP1763A. As part of workaround retry GetPortStatus request if HUB returns 2 bytes. Change-Id: Iae28abe0d9e082e4741e585e085d9fb9e6e7594a Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
This commit is contained in:
parent
1716ce8004
commit
7ea3ab4ec2
|
@ -563,8 +563,11 @@ static int get_port_status(struct usb_device *hdev, int port1,
|
|||
{
|
||||
int i, status = -ETIMEDOUT;
|
||||
|
||||
/* ISP1763A HUB sometimes returns 2 bytes instead of 4 bytes, retry
|
||||
* if this happens
|
||||
*/
|
||||
for (i = 0; i < USB_STS_RETRIES &&
|
||||
(status == -ETIMEDOUT || status == -EPIPE); i++) {
|
||||
(status == -ETIMEDOUT || status == -EPIPE || status == 2); 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);
|
||||
|
|
Loading…
Reference in New Issue