Commit 8ad4a036 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: usb retry cleanups

This patch stops changing the reported fault mode in cases where retries of
GET_DESCRIPTOR fail because the device just doesn't have such a descriptor.
Plus, it stops printing messages when retrying.

It also reduces the number of retries; the first retry seems to resolve most
of these firmware problems.
Signed-Off-By: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 2d01552f
...@@ -566,7 +566,7 @@ void usb_sg_cancel (struct usb_sg_request *io) ...@@ -566,7 +566,7 @@ void usb_sg_cancel (struct usb_sg_request *io)
*/ */
int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size) int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size)
{ {
int i = 5; int i = 3;
int result; int result;
memset(buf,0,size); // Make sure we parse really received data memset(buf,0,size); // Make sure we parse really received data
...@@ -579,9 +579,6 @@ int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char ...@@ -579,9 +579,6 @@ int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char
HZ * USB_CTRL_GET_TIMEOUT)) > 0 HZ * USB_CTRL_GET_TIMEOUT)) > 0
|| result != -EPIPE) || result != -EPIPE)
break; break;
dev_dbg (&dev->dev, "RETRY descriptor, result %d\n", result);
result = -ENOMSG;
} }
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment