On Sun, 2003-12-28 at 10:38, Alan Stern wrote:
> It certainly sounds like your device puts some extra garbage in its
> descriptors.
I think you're right. After the USB_DT_DEVICE descriptor is the
descriptor of length 1. Then there is nothing else.
> Try this patch. Instead of returning an error when it encounters one of
> these unexpected descriptor types, it will merely log a warning and skip
> any remaining descriptors (that's if I didn't make any mistakes -- I
> haven't tested it myself). Maybe this will be enough to get your device
> to work again.
Your patch works great, and I think it is a little safer than the hack I
was using. I changed it just a little to only break when there is an
extra USB_DT_DEVICE descriptor. Here's the patch if you care.
I wonder how many other devices don't work b/c of the reason my game pad
doesn't work? Maybe something like this should go into an FAQ or a
/proc option for relaxed descriptor checking.
Thanks,
Ashley
--- linux-2.6.0-3/drivers/usb/core/config.c.orig 2003-12-28
12:37:52.594663600 -0600
+++ linux-2.6.0-3/drivers/usb/core/config.c 2003-12-28
13:06:54.428864552 -0600
@@ -271,6 +271,12 @@
} else if ((header->bDescriptorType == USB_DT_DEVICE ||
header->bDescriptorType == USB_DT_CONFIG) && j) {
warn("unexpected descriptor type 0x%X",
header->bDescriptorType);
+ if(header->bDescriptorType == USB_DT_DEVICE) {
+ warn("skipping rest of the device descriptor");
+ size = buffer2 - buffer;
+ break;
+ }
+
return -EINVAL;
}
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel