I've got a piece of hardware (this one:
http://masterkit.ru/main/set.php?num=3D1153) which acts like an USB ACM
device and is handeled by the cdc-acm module. /dev/ttyACM0 does appear
but any attempt to write something to the device with a simple
"echo something >/dev/ttyACM0" fails with "Invalid argument" error.
The reason is that the driver calls usb-submit-urb in acm-start-wb()
but doesn't set interval in the urb structure, so it remains zero and
causes usb-submit-urb to return -EINVAL. Reading from device also does
not work due to the same problem in acm-rx-tasklet().
After setting urb interval to 128, this particular device works fine
for me (though I'm not sure that it's a right solution in general).
Corresponding patch (against 2.6.30) is:
=2D=20
if ((rc =3D usb-submit-urb(wb->urb, GFP-ATOMIC)) < 0) {
dbg("usb-submit-urb(write bulk) failed: %d", rc);
@@ -453,6 +454,7 @@ urbs:
acm-read-bulk, rcv);
rcv->urb->transfer-dma =3D buf->dma;
rcv->urb->transfer-flags |=3D URB-NO-TRANSFER-DMA-MAP;
+ rcv->urb->interval =3D 128;
=20
/* This shouldn't kill the driver as unsuccessful URBs are returned to t=
he
free-urbs-pool and resubmited ASAP */
Re: PROBLEM: USB ACM device does not work by Oliver Neukum on
2009-06-28T20:21:01+00:00
Am Sonntag, 28. Juni 2009 20:29:26 schrieb Arseniy Lartsev:
> I've got a piece of hardware (this one:
> http://masterkit.ru/main/set.php?num=1153) which acts like an USB ACM
> device and is handeled by the cdc-acm module. /dev/ttyACM0 does appear
> but any attempt to write something to the device with a simple
> "echo something >/dev/ttyACM0" fails with "Invalid argument" error.
>
> The reason is that the driver calls usb-submit-urb in acm-start-wb()
> but doesn't set interval in the urb structure, so it remains zero and
> causes usb-submit-urb to return -EINVAL. Reading from device also does
> not work due to the same problem in acm-rx-tasklet().
This is supposed to write to bulk endpoints. There's no reason interval
would need to be specified. Something is very odd. Please post "lsusb -v".
Regards
Oliver
Re: PROBLEM: USB ACM device does not work by Arseniy Lartsev on
2009-06-28T20:38:01+00:00
On Monday 29 June 2009 00:20:49 Oliver Neukum wrote:
> This is supposed to write to bulk endpoints. There's no reason interval
> would need to be specified. Something is very odd. Please post "lsusb -v".
lsusb output follows. The device in question comes first.
Bus 002 Device 005: ID 16c0:05e1 VOTI=20
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0=20
bDeviceProtocol 0=20
bMaxPacketSize0 8
idVendor 0x16c0 VOTI
idProduct 0x05e1=20
bcdDevice 2.00
iManufacturer 1 PROTTOSS
iProduct 2 AVR910 USB Programmer
iSerial 0=20
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0=20
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
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 0=20
CDC Header:
bcdCDC 1.10
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1=20
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 100
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0=20
iInterface 0=20
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0001 1.1 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.27.23-0.1-default ohci-hcd
iProduct 2 OHCI Host Controller
iSerial 1 0000:00:03.1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0=20
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0=20
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 3
wHubCharacteristic 0x0002
No power switching (usb 1.0)
Ganged overcurrent protection
bPwrOn2PwrGood 0 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0001 1.1 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.27.23-0.1-default ohci-hcd
iProduct 2 OHCI Host Controller
iSerial 1 0000:00:03.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0=20
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0=20
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 3
wHubCharacteristic 0x0002
No power switching (usb 1.0)
Ganged overcurrent protection
bPwrOn2PwrGood 3 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0300 lowspeed power
Port 3: 0000.0303 lowspeed power enable connect
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.27.23-0.1-default ehci-hcd
iProduct 2 EHCI Host Controller
iSerial 1 0000:00:03.3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0=20
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0=20
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 6
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Port 5: 0000.0100 power
Port 6: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
Re: PROBLEM: USB ACM device does not work by Oliver Neukum on
2009-06-28T20:58:19+00:00
Am Sonntag, 28. Juni 2009 20:29:26 schrieb Arseniy Lartsev:
> The reason is that the driver calls usb-submit-urb in acm-start-wb()
> but doesn't set interval in the urb structure, so it remains zero and
> causes usb-submit-urb to return -EINVAL. Reading from device also does
That simply does not make sense. Have you confirmed that this check:
switch (xfertype) {
case USB-ENDPOINT-XFER-ISOC:
case USB-ENDPOINT-XFER-INT:
/* too small? */
if (urb->interval <= 0)
return -EINVAL;
really triggers?
Regards
Oliver
Re: PROBLEM: USB ACM device does not work by Arseniy Lartsev on
2009-06-29T11:44:17+00:00
Just the same with 2.6.31-rc1-git3.
Any ideas?
Re: PROBLEM: USB ACM device does not work by Oliver Neukum on
2009-06-29T13:07:54+00:00
Am Montag, 29. Juni 2009 13:43:45 schrieb Arseniy Lartsev:
> Just the same with 2.6.31-rc1-git3.
>
> Any ideas?
Please printk xfertype in the error case of usb-submit-urb()
Regards
Oliver
Re: PROBLEM: USB ACM device does not work by Arseniy Lartsev on
2009-06-29T13:35:52+00:00
On Monday 29 June 2009 17:07:44 Oliver Neukum wrote:
> Please printk xfertype in the error case of usb-submit-urb()
It equals USB-ENDPOINT-XFER-INT.
Re: PROBLEM: USB ACM device does not work by Oliver Neukum on
2009-06-30T07:22:15+00:00
Am Montag, 29. Juni 2009 15:35:15 schrieb Arseniy Lartsev:
> On Monday 29 June 2009 17:07:44 Oliver Neukum wrote:
> > Please printk xfertype in the error case of usb-submit-urb()
>
> It equals USB-ENDPOINT-XFER-INT.
Yet, your device shows bulk endpoints. Please enable DEBUG in cdc-acm.c
and recompile with CONFIG-USB-DEBUG.
Regards
Oliver
Re: PROBLEM: USB ACM device does not work by Arseniy Lartsev on
2009-06-30T20:10:27+00:00
On Tuesday 30 June 2009 11:22:04 Oliver Neukum wrote:
> Yet, your device shows bulk endpoints. Please enable DEBUG in cdc-acm.c
> and recompile with CONFIG-USB-DEBUG.
I've recompiled four modules usbcore, ehci-hcd, ohci-hcd and cdc-acm with -=
DDEBUG.
Here is kernel log:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D De=
vice plugged in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Jun 30 23:58:34 noteb00k kernel: usb usb1: usb resume
Jun 30 23:58:34 noteb00k kernel: ehci-hcd 0000:00:03.3: resume root hub
Jun 30 23:58:35 noteb00k kernel: ehci-hcd 0000:00:03.3: port 5 low speed =20
Jun 30 23:58:35 noteb00k kernel: hub 1-0:1.0: state 7 ports 6 chg 0000 evt =
0000 =20
Jun 30 23:58:35 noteb00k kernel: ohci-hcd 0000:00:03.0: wakeup root hub =
=20
Jun 30 23:58:35 noteb00k kernel: hub 2-0:1.0: hub-resume =
=20
Jun 30 23:58:35 noteb00k kernel: ohci-hcd 0000:00:03.0: GetStatus roothub.p=
ortstatus [2] =3D 0x00010301 CSC LSDA PPS=20
CCS
Jun 30 23:58:35 noteb00k kernel: hub 2-0:1.0: port 3: status 0301 change 00=
01 =20
Jun 30 23:58:35 noteb00k kernel: hub 2-0:1.0: state 7 ports 3 chg 0008 evt =
0000 =20
Jun 30 23:58:35 noteb00k kernel: hub 2-0:1.0: port 3, status 0301, change 0=
000, 1.5 Mb/s =20
Jun 30 23:58:35 noteb00k kernel: ohci-hcd 0000:00:03.0: GetStatus roothub.p=
ortstatus [2] =3D 0x00100303 PRSC LSDA PPS=20
PES CCS =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: new low speed USB device using oh=
ci-hcd and address 5 =20
Jun 30 23:58:35 noteb00k kernel: ohci-hcd 0000:00:03.0: GetStatus roothub.p=
ortstatus [2] =3D 0x00100303 PRSC LSDA PPS=20
PES CCS =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: skipped 4 descriptors after inter=
face =20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: config 1 interface 1 altsetting 0=
endpoint 0x1 is Bulk; changing to=20
Interrupt
Jun 30 23:58:35 noteb00k kernel: usb 2-3: config 1 interface 1 altsetting 0=
endpoint 0x81 is Bulk; changing to=20
Interrupt =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: default language 0x0409 =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: udev 5, busnum 2, minor =3D 132 =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: New USB device found, idVendor=3D=
16c0, idProduct=3D05e1 =20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: New USB device strings: Mfr=3D1, =
Product=3D2, SerialNumber=3D0 =20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: Product: AVR910 USB Programmer =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: Manufacturer: PROTTOSS =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: uevent =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: usb-probe-device =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: configuration #1 chosen from 1 ch=
oice =20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: adding 2-3:1.0 (config #1, interf=
ace 0) =20
Jun 30 23:58:35 noteb00k kernel: usb 2-3:1.0: uevent =
=20
Jun 30 23:58:35 noteb00k kernel: cdc-acm 2-3:1.0: usb-probe-interface =
=20
Jun 30 23:58:35 noteb00k kernel: cdc-acm 2-3:1.0: usb-probe-interface - got=
id =20
Jun 30 23:58:35 noteb00k kernel: cdc-acm 2-3:1.0: The data interface has sw=
itched endpoints =20
Jun 30 23:58:35 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: in=
terfaces are valid =20
Jun 30 23:58:35 noteb00k kernel: cdc-acm 2-3:1.0: ttyACM0: USB ACM device =
=20
Jun 30 23:58:35 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-control-msg: rq: 0x22 val: 0x0 len: 0x0=20
result: 0 =
=20
Jun 30 23:58:35 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-control-msg: rq: 0x20 val: 0x0 len: 0x7=20
result: 7 =
=20
Jun 30 23:58:35 noteb00k kernel: usb 2-3: adding 2-3:1.1 (config #1, interf=
ace 1) =20
Jun 30 23:58:35 noteb00k kernel: usb 2-3:1.1: uevent =
=20
Jun 30 23:58:35 noteb00k kernel: hub 2-0:1.0: state 7 ports 3 chg 0000 evt =
0008 =20
Jun 30 23:58:38 noteb00k kernel: hub 1-0:1.0: hub-suspend =
=20
Jun 30 23:58:38 noteb00k kernel: usb usb1: bus auto-suspend =
=20
Jun 30 23:58:38 noteb00k kernel: ehci-hcd 0000:00:03.3: suspend root hub =
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ec=
ho -n S >/dev/ttyACM0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: En=
tering acm-tty-open.
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-control-msg: rq: 0x22 val: 0x3 len: 0x0=20
result: 0 =
=20
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: En=
tering acm-tty-write to write 1 bytes, =20
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: Ge=
t 1 bytes... =20
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-write-start susp-count: 0 =20
Jun 30 23:58:44 noteb00k kernel: usb-sumbit-urb: failing due to non-positiv=
e interval //
Jun 30 23:58:44 noteb00k kernel: usb-submit-urb: xfertype =3D 3 of 1/3 =
// these were added by me
Jun 30 23:58:44 noteb00k kernel: xfertype is USB-ENDPOINT-XFER-INT =
//
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: us=
b-submit-urb(write bulk) failed: -22 =20
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: En=
tering acm-rx-tasklet =20
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-rx-tasklet: ACM not ready =20
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-control-msg: rq: 0x22 val: 0x0 len: 0x0=20
result: 0 =
=20
Jun 30 23:58:44 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-ctrl-irq - urb shutting down with=20
status: -2 =
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ca=
t /dev/ttyACM0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Jun 30 23:58:54 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: En=
tering acm-tty-open.
Jun 30 23:58:54 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-control-msg: rq: 0x22 val: 0x3 len: 0x0=20
result: 0 =
=20
Jun 30 23:58:54 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: En=
tering acm-rx-tasklet =20
Jun 30 23:58:54 noteb00k kernel: usb-sumbit-urb: failing due to non-positiv=
e interval =20
Jun 30 23:58:54 noteb00k kernel: usb-submit-urb: xfertype =3D 3 of 1/3 =
=20
Jun 30 23:58:54 noteb00k kernel: xfertype is USB-ENDPOINT-XFER-INT =
=20
Jun 30 23:58:54 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: in=
put control lines: dcd- dsr- break- ring-=20
framing- parity- overrun-
Jun 30 23:58:54 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: di=
sconnected from network
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Te=
rminate cat with Ctrl+C =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
Jun 30 23:58:58 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-control-msg: rq: 0x22 val: 0x0 len: 0x0=20
result: 0
Jun 30 23:58:58 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: ac=
m-ctrl-irq - urb shutting down with=20
status:-2
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D De=
vice unplugged =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Jun 30 23:59:08 noteb00k kernel: hub 2-0:1.0: state 7 ports 3 chg 0000 evt =
0008
Jun 30 23:59:08 noteb00k kernel: ohci-hcd 0000:00:03.0: GetStatus roothub.p=
ortstatus [2] =3D 0x00030300 PESC CSC LSDA=20
PPS
Jun 30 23:59:08 noteb00k kernel: hub 2-0:1.0: port 3, status 0300, change 0=
003, 1.5 Mb/s
Jun 30 23:59:08 noteb00k kernel: usb 2-3: USB disconnect, address 5
Jun 30 23:59:08 noteb00k kernel: usb 2-3: unregistering device
Jun 30 23:59:08 noteb00k kernel: usb 2-3: usb-disable-device nuking all URBs
Jun 30 23:59:08 noteb00k kernel: usb 2-3: unregistering interface 2-3:1.0
Jun 30 23:59:08 noteb00k kernel: /w/work/lesh/research/driver/cdc-acm.c: En=
tering stop-data-traffic
Jun 30 23:59:08 noteb00k kernel: usb 2-3:1.0: uevent
Jun 30 23:59:08 noteb00k kernel: usb 2-3: unregistering interface 2-3:1.1
Jun 30 23:59:08 noteb00k kernel: usb 2-3:1.1: uevent
Jun 30 23:59:08 noteb00k kernel: usb 2-3: uevent
Jun 30 23:59:08 noteb00k kernel: hub 2-0:1.0: debounce: port 3: total 100ms=
stable 100ms status 0x300
Jun 30 23:59:09 noteb00k kernel: ohci-hcd 0000:00:03.0: auto-stop root hub
Jun 30 23:59:11 noteb00k kernel: hub 2-0:1.0: hub-suspend
Jun 30 23:59:11 noteb00k kernel: usb usb2: bus auto-suspend
Jun 30 23:59:11 noteb00k kernel: ohci-hcd 0000:00:03.0: suspend root hub
Re: PROBLEM: USB ACM device does not work by Alan Stern on
2009-06-30T21:01:44+00:00
On Wed, 1 Jul 2009, Arseniy Lartsev wrote:
> On Tuesday 30 June 2009 11:22:04 Oliver Neukum wrote:
> > Yet, your device shows bulk endpoints. Please enable DEBUG in cdc-acm.c
> > and recompile with CONFIG-USB-DEBUG.
>
> I've recompiled four modules usbcore, ehci-hcd, ohci-hcd and cdc-acm with -DDEBUG.
> Here is kernel log:
>
> ======================== Device plugged in ========================
...
> Jun 30 23:58:35 noteb00k kernel: usb 2-3: new low speed USB device using ohci-hcd and address 5
...
> Jun 30 23:58:35 noteb00k kernel: usb 2-3: config 1 interface 1 altsetting 0 endpoint 0x1 is Bulk; changing to
> Interrupt
> Jun 30 23:58:35 noteb00k kernel: usb 2-3: config 1 interface 1 altsetting 0 endpoint 0x81 is Bulk; changing to
> Interrupt
This looks like your problem. Low-speed devices are not allowed to
have bulk endpoints. Linux internally changes them to interrupt
endpoints with interval = 1 and maxpacket size no larger than 8.
Alan Stern