On Tue, 17 Feb 2004, Dominik Kuhlen wrote:
> I'm sorry but this doesn't work. Same messages.
> Here's a hexdump of buffer probably this helps to see what's happening:
> offset: data
> 0000: 09 04 00 00 02 ff 21 ff
> 0008: 00 07 05 81 03 08 00 01
> 0010: 07 05 82 02 40 00 00 07
> 0018: 05 03 02 40 00 00
> size = 30
> If you need any other data I'll try to extract
> Dominik
Thanks, this helps a lot. It's an interface descriptor that says the
interface has 2 endpoints, but it's followed by _3_ endpoint descriptors:
ep1 (interrupt in), ep2 (bulk in), and ep3 (bulk out). The configuration
parsing code reads the interface descriptor and the first two endpoint
descriptors, but then sees the third endpoint where it expects to find
another interface (or the end of the buffer, as the case may be).
Linux 2.6 is a lot more careful about detecting invalid descriptors
than 2.4 was, and this is a good example. In general it's unclear how to
handle a device that presents invalid information like yours, so we just
refuse to accept it.
For now, here's a quick patch you can use to ignore the problem.
Alan Stern
===== config.c 1.28 vs edited =====
--- 1.28/drivers/usb/core/config.c Fri Sep 26 12:37:44 2003
+++ edited/drivers/usb/core/config.c Tue Feb 17 12:06:25 2004
@@ -106,7 +106,7 @@
if (d->bDescriptorType != USB_DT_INTERFACE) {
warn("unexpected descriptor 0x%X, expecting interface, 0x%X",
d->bDescriptorType, USB_DT_INTERFACE);
- return -EINVAL;
+ return d->bLength;
}
inum = d->bInterfaceNumber;
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel