Messages in this thread Patch in this message |  | | | Subject | Re: [PATCH] USB and Driver Core patches for 2.6.10 | | Date | Fri, 7 Jan 2005 21:47:38 -0800 | | From | Greg KH <> |
| |
ChangeSet 1.1938.439.51, 2005/01/06 17:29:21-08:00, oliver@neukum.org
[PATCH] USB: another workaround for cdc-acm
there are a lot of buggy modems.
Signed-Off-By: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/usb/class/cdc-acm.c | 15 +++++++++++++++ drivers/usb/class/cdc-acm.h | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-)
diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c 2005-01-07 15:37:12 -08:00 +++ b/drivers/usb/class/cdc-acm.c 2005-01-07 15:37:12 -08:00 @@ -532,7 +532,17 @@ u8 call_management_function = 0; int call_interface_num = -1; int data_interface_num; + unsigned long quirks; + /* handle quirks deadly to normal probing*/ + quirks = (unsigned long)id->driver_info; + if (quirks == NO_UNION_NORMAL) { + data_interface = usb_ifnum_to_if(usb_dev, 1); + control_interface = usb_ifnum_to_if(usb_dev, 0); + goto skip_normal_probe; + } + + /* normal probing*/ if (!buffer) { err("Wierd descriptor references"); return -EINVAL; @@ -607,6 +617,7 @@ if (data_interface_num != call_interface_num) dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported."); +skip_normal_probe: if (usb_interface_claimed(data_interface)) { /* valid in this context */ dev_dbg(&intf->dev,"The data interface isn't available\n"); return -EBUSY; @@ -805,6 +816,10 @@ */ static struct usb_device_id acm_ids[] = { + /* quirky and broken devices */ + { USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */ + .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ + }, /* control interfaces with various AT-command sets */ { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 1) }, { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 2) }, diff -Nru a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h --- a/drivers/usb/class/cdc-acm.h 2005-01-07 15:37:12 -08:00 +++ b/drivers/usb/class/cdc-acm.h 2005-01-07 15:37:12 -08:00 @@ -125,4 +125,5 @@ #define CDC_DATA_INTERFACE_TYPE 0x0a - +/* constants describing various quirks and errors */ +#define NO_UNION_NORMAL 1 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |