Bug 9095

Summary: (Patch queued) cdc_acm to support additional quirky device
Product: Drivers Reporter: Lubos Stanek (lubek)
Component: USBAssignee: Alan (alan)
Status: RESOLVED CODE_FIX    
Severity: low CC: alan, protasnb
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.22 Subsystem:
Regression: No Bisected commit-id:
Bug Depends on:    
Bug Blocks: 5089    

Description Lubos Stanek 2007-09-28 04:03:23 UTC
Most recent kernel where this bug did not occur: -
Distribution: Fedora
Hardware Environment: A8N-E (nVidia), Athlon 64 X2 3800, 2 GB RAM, sata and D1370 (FSC), Celeron 1300, 512 MB RAM, pata
Software Environment: Fedora 7
Problem Description: cdc_acm to support Zyxel Omni 56k USB (another version)

Steps to reproduce:
connect the device, the device is recognized as an USB ACM device, the cdc_acm driver is loaded, the /dev/devttyACM? is created, the communication with the device fails

After adding an exception handling for the device of the same producer, the communication with the device works:
diff -urN kernel-2.6.22.old/vanilla/drivers/usb/class/cdc-acm.c kernel-2.6.22/vanilla/drivers/usb/class/cdc-acm.c
--- kernel-2.6.22.old/vanilla/drivers/usb/class/cdc-acm.c	2007-07-09 01:32:17.000000000 +0200
+++ kernel-2.6.22/vanilla/drivers/usb/class/cdc-acm.c	2007-09-27 19:34:45.000000000 +0200
@@ -1163,6 +1163,9 @@
 	{ USB_DEVICE(0x079b, 0x000f), /* BT On-Air USB MODEM */
 	.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
 	},
+	{ USB_DEVICE(0x0ace, 0x1602), /* ZyDAS 56K USB MODEM */
+	.driver_info = SINGLE_RX_URB, /* firmware bug */
+	},
 	{ USB_DEVICE(0x0ace, 0x1608), /* ZyDAS 56K USB MODEM */
 	.driver_info = SINGLE_RX_URB, /* firmware bug */
 	},

/proc/bus/usb/devices:
T:  Bus=05 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 10 Spd=12  MxCh= 0
D:  Ver= 1.01 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0ace ProdID=1602 Rev= 0.01
S:  Manufacturer=ZyDAS 
S:  Product=56K USB Modem
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=300mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=128ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

lsusb -v
Bus 005 Device 010: ID 0ace:1602 ZyDAS 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.01
  bDeviceClass            2 Communications
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0ace ZyDAS
  idProduct          0x1602 
  bcdDevice            0.01
  iManufacturer           1 ZyDAS 
  iProduct                2 56K USB Modem
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 ZyDAS 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              300mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              5 ZyDAS 
      CDC Header:
        bcdCDC               1.01
      CDC Call Management:
        bmCapabilities       0x03
          call management
          use DataInterface
        bDataInterface          1
      CDC ACM:
        bmCapabilities       0x06
          sends break
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval             128
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

AT commands:
ati                                                                          
1602
ati1                                      
02093                                     
Omni 56K USB  1.03                        
2002 12 27 15:27                          
ati3
ZyXEL V.90 1.03
ati4
V.90 Fax Modem
ati9
($ZYX70F6\00000000\MODEM\\ZyXEL Omni 56K USB15)
ati18
CPU: 49.152MHz
ati25
ZyDAS

Thanks for your work,
lubek
Comment 1 Andrew Morton 2007-09-28 10:50:44 UTC
Could you please send the patch via email to

Andrew Morton <akpm@linux-foundation.org>
Greg KH <greg@kroah.com>
linux-usb-devel@lists.sourceforge.net
linux-kernel@vger.kernel.org

formatted as per http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt

Thanks!
Comment 2 Natalie Protasevich 2007-12-12 17:13:46 UTC
Any update please. I don't see this fix in the latest git - are you planning to send it in Lubos?
Comment 3 Alan 2009-03-25 13:44:21 UTC
He never bothered,  but checked and will queue an update