Commit 73c85813 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: acm work around for misplaced

this implements a work around for some devices which have correct
extra descriptors, but misplace them.
Signed-Off-By: default avatarOliver Neukum <oliver@neukum.name>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent b51f163d
...@@ -547,6 +547,17 @@ static int acm_probe (struct usb_interface *intf, ...@@ -547,6 +547,17 @@ static int acm_probe (struct usb_interface *intf,
return -EINVAL; return -EINVAL;
} }
if (!buflen) {
if (intf->cur_altsetting->endpoint->extralen && intf->cur_altsetting->endpoint->extra) {
dev_dbg(&intf->dev,"Seeking extra descriptors on endpoint");
buflen = intf->cur_altsetting->endpoint->extralen;
buffer = intf->cur_altsetting->endpoint->extra;
} else {
err("Zero length descriptor references");
return -EINVAL;
}
}
while (buflen > 0) { while (buflen > 0) {
if (buffer [1] != USB_DT_CS_INTERFACE) { if (buffer [1] != USB_DT_CS_INTERFACE) {
err("skipping garbage"); err("skipping garbage");
......
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