Hello,
there is regression in changes from 2.6.7 to 2.6.8.1 in cdc-acm module.
I have Gtran USB CDMA modem[1] and it stops responding in 2.6.8.1. It
worked just fine in 2.6.7. Also using usbserial module under 2.6.8.1
works also fine.
Modem is detected, /dev/ttyACM0 is created (using udev), but it doesn't
respond to commands.
Next bug is in modem itself. It does report bad wMaxPacketSize (64), so
it's limited to 256kbit max speed. There are many workarounds (original
credits goes to David Peroutka) and I have modified patch from Petr
Pisar[2] to hard code 1024 packet size when this modem is detected.
I have modified cdc-acm and usbserial, see attached patches.
1. Bus 001 Device 003: ID 05c6:3196 Qualcomm, Inc. CDMA Wireless Modem
2. http://aisa.fi.muni.cz/~xpisar/cdma/
Please Cc: me as I am not subscribed, thanks.
O.
--
Ondrej Sury <[EMAIL PROTECTED]>
diff -urN linux-2.6.8.1/drivers/usb/class/cdc-acm.c linux-2.6.8.1-cdc-acm/drivers/usb/class/cdc-acm.c
--- linux-2.6.8.1/drivers/usb/class/cdc-acm.c 2004-08-14 12:55:35.000000000 +0200
+++ linux-2.6.8.1-cdc-acm/drivers/usb/class/cdc-acm.c 2004-09-09 10:00:28.000000000 +0200
@@ -647,9 +647,15 @@
}
memset(acm, 0, sizeof(struct acm));
- ctrlsize = epctrl->wMaxPacketSize;
- readsize = epread->wMaxPacketSize;
- acm->writesize = epwrite->wMaxPacketSize;
+ if (usb_dev->descriptor.idVendor==QUALCOMM_VENDOR_ID &&
+ usb_dev->descriptor.idProduct==QUALCOMM_GTRAN_6420) {
+ ctrlsize = readsize = acm->writesize = 1024;
+ printk("forcing new wMaxPacketSize for Qualcomm device: %d\n", ctrlsize);
+ } else {
+ ctrlsize = epctrl->wMaxPacketSize;
+ readsize = epread->wMaxPacketSize;
+ acm->writesize = epwrite->wMaxPacketSize;
+ }
acm->control = control_interface;
acm->data = data_interface;
acm->minor = minor;
diff -urN linux-2.6.8.1/drivers/usb/class/cdc-acm.h linux-2.6.8.1-cdc-acm/drivers/usb/class/cdc-acm.h
--- linux-2.6.8.1/drivers/usb/class/cdc-acm.h 2004-08-14 12:56:23.000000000 +0200
+++ linux-2.6.8.1-cdc-acm/drivers/usb/class/cdc-acm.h 2004-09-09 09:59:02.000000000 +0200
@@ -124,4 +124,5 @@
#define CDC_DATA_INTERFACE_TYPE 0x0a
-
+#define QUALCOMM_VENDOR_ID 0x05c6
+#define QUALCOMM_GTRAN_6420 0x3196
diff -urN linux-2.6.8.1/drivers/usb/serial/usb-serial.c linux-2.6.8.1-cdc-acm/drivers/usb/serial/usb-serial.c
--- linux-2.6.8.1/drivers/usb/serial/usb-serial.c 2004-08-14 12:56:26.000000000 +0200
+++ linux-2.6.8.1-cdc-acm/drivers/usb/serial/usb-serial.c 2004-09-09 10:50:17.000000000 +0200
@@ -1063,7 +1063,12 @@
dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
- buffer_size = endpoint->wMaxPacketSize;
+ if (dev->descriptor.idVendor==QUALCOMM_VENDOR_ID &&
+ dev->descriptor.idProduct==QUALCOMM_GTRAN_6420) {
+ buffer_size = 1024;
+ } else {
+ buffer_size = endpoint->wMaxPacketSize;
+ }
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->bulk_in_buffer) {
@@ -1086,7 +1091,12 @@
dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
- buffer_size = endpoint->wMaxPacketSize;
+ if (dev->descriptor.idVendor==QUALCOMM_VENDOR_ID &&
+ dev->descriptor.idProduct==QUALCOMM_GTRAN_6420) {
+ buffer_size = 1024;
+ } else {
+ buffer_size = endpoint->wMaxPacketSize;
+ }
port->bulk_out_size = buffer_size;
port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
port->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
@@ -1110,7 +1120,12 @@
dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
- buffer_size = endpoint->wMaxPacketSize;
+ if (dev->descriptor.idVendor==QUALCOMM_VENDOR_ID &&
+ dev->descriptor.idProduct==QUALCOMM_GTRAN_6420) {
+ buffer_size = 1024;
+ } else {
+ buffer_size = endpoint->wMaxPacketSize;
+ }
port->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->interrupt_in_buffer) {
diff -urN linux-2.6.8.1/drivers/usb/serial/usb-serial.h linux-2.6.8.1-cdc-acm/drivers/usb/serial/usb-serial.h
--- linux-2.6.8.1/drivers/usb/serial/usb-serial.h 2004-08-14 12:56:25.000000000 +0200
+++ linux-2.6.8.1-cdc-acm/drivers/usb/serial/usb-serial.h 2004-09-09 10:01:02.000000000 +0200
@@ -313,7 +313,8 @@
#undef dbg
#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0)
-
+#define QUALCOMM_VENDOR_ID 0x05c6
+#define QUALCOMM_GTRAN_6420 0x3196
#endif /* ifdef __LINUX_USB_SERIAL_H */