diff options
author | Oliver Neukum <oneukum@suse.de> | 2007-01-26 08:26:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 18:03:46 -0500 |
commit | 7ceec1f1d26f966c0816b86a1aab1e0b3b208757 (patch) | |
tree | 3b444fb3eedff17366a7aa01106ee7eed50e051a /drivers/usb/core/message.c | |
parent | bb417020ba8c559eb52f57379ba17f669f8f72cd (diff) |
USB: add a blacklist for devices that can't handle some things we throw at them.
This adds a blacklist to the USB core to handle some autosuspend and
string issues that devices have.
Originally written by Oliver, but hacked up a lot by Greg.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r-- | drivers/usb/core/message.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 74edaea5665d..2f17468b5c1e 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/timer.h> | 11 | #include <linux/timer.h> |
12 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/usb/quirks.h> | ||
14 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
15 | #include <asm/scatterlist.h> | 16 | #include <asm/scatterlist.h> |
16 | 17 | ||
@@ -685,7 +686,10 @@ static int usb_string_sub(struct usb_device *dev, unsigned int langid, | |||
685 | 686 | ||
686 | /* Try to read the string descriptor by asking for the maximum | 687 | /* Try to read the string descriptor by asking for the maximum |
687 | * possible number of bytes */ | 688 | * possible number of bytes */ |
688 | rc = usb_get_string(dev, langid, index, buf, 255); | 689 | if (dev->quirks & USB_QUIRK_STRING_FETCH_255) |
690 | rc = -EIO; | ||
691 | else | ||
692 | rc = usb_get_string(dev, langid, index, buf, 255); | ||
689 | 693 | ||
690 | /* If that failed try to read the descriptor length, then | 694 | /* If that failed try to read the descriptor length, then |
691 | * ask for just that many bytes */ | 695 | * ask for just that many bytes */ |