Hi, Because of the new method of looking for a union descriptor to detect an ACM device detection of several modems I have fails.
I have found out the problem is that the usb_parse_configuration
routine does not take account of descriptors which lie after the last
interface descriptor so the extralen parameters are set to 0 even though there *is*
extra information.
The ACM probe routine however looks for the extra descriptors in the interface
structure not in the configuration structure (where I think they should be). It is after
all the configuration descriptor which is the container for all other descriptors.
Perhaps the solution (which I have hacked together to a patch) is to parse the raw
configuration descriptor in acm_probe which then finds the union descriptor and
all is well..
It seems that there is another dangerous bug in which any descriptors not parsed by
usb_parse_configuration are assumed to be sequential instead of doing what 2.4
does and allocating a seperate buffer to hold everything not parsed by
usb_parse_configuration.
This code in usb_parse_configuration seems deeply flawed:
/* Skip over any Class Specific or Vendor Specific descriptors;
* find the first interface descriptor */
config->extra = buffer;
i = find_next_descriptor(buffer, size, USB_DT_INTERFACE,
USB_DT_INTERFACE, &n);
config->extralen = i;
if (n > 0)
dev_dbg(ddev, "skipped %d descriptor%s after %s\n",
n, plural(n), "configuration");
buffer += i;
size -= i;extra just points to some place in the raw configuration descriptor instead to an
allocated buffer which then contains a copy of any non-standard descriptors.
I will be happy to rustle together a patch if this is agreed on to be the solution.
/Brian
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
