On Mon, Sep 07, 2009 at 04:34:48PM +0200, Oliver Neukum wrote: > Am Montag, 7. September 2009 15:46:20 schrieb Paul Martin: > > > OK, please apply the included debugging patch, change "#undef DEBUG" > > > in cdc-acm.c to "#define DEBUG", recompile and post dmesg. > > > > You might be interested to know that I get exactly the same errors with a > > Nokia mobile phone in "default" mode. > > This is extremely interesting, as it points to a general failure. > But I cannot see how the return value comes about. To double check > could you commented out those lines in cdc-acm.c and try again? > > rv = tty_port_block_til_ready(&acm->port, tty, filp); > if (rv < 0) > dbg("tty_port_block_til_ready returned %d", rv); This works. I'm on Linus 2.6.31-rc9 with the following modifiacation: diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 2bfc41e..4761a2d 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -51,7 +51,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#undef DEBUG +#define DEBUG #undef VERBOSE_DEBUG #include <linux/kernel.h> @@ -609,7 +609,11 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) acm->throttle = 0; tasklet_schedule(&acm->urb_task); +/* rv = tty_port_block_til_ready(&acm->port, tty, filp); + if (rv < 0) + dbg("tty_port_block_til_ready returned %d", rv); +*/ done: mutex_unlock(&acm->mutex); err_out: dmesg output: usb 3-1: new full speed USB device using uhci_hcd and address 3 usb 3-1: New USB device found, idVendor=0421, idProduct=0491 usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 3-1: Product: Nokia 6233 usb 3-1: Manufacturer: Nokia usb 3-1: configuration #1 chosen from 1 choice cdc_acm 3-1:1.1: Ignoring descriptor: type fd, length 4 drivers/usb/class/cdc-acm.c: interfaces are valid cdc_acm 3-1:1.1: ttyACM0: USB ACM device drivers/usb/class/cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x0 len: 0x0 result: 0 drivers/usb/class/cdc-acm.c: acm_control_msg: rq: 0x20 val: 0x0 len: 0x7 result: 7 usbcore: registered new interface driver cdc_acm cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters usbcore: registered new interface driver cdc_ether usb 3-1: bad CDC descriptors usbcore: registered new interface driver rndis_host usb 3-1: bad CDC descriptors usbcore: registered new interface driver rndis_wlan drivers/usb/class/cdc-acm.c: Entering acm_tty_open. drivers/usb/class/cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x3 len: 0x0 result: 0 drivers/usb/class/cdc-acm.c: Entering acm_rx_tasklet drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528b80, rcv 0xf5706310, buf 0xf5706450 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528d00, rcv 0xf57062fc, buf 0xf570643c drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528980, rcv 0xf57062e8, buf 0xf5706428 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528600, rcv 0xf57062d4, buf 0xf5706414 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528900, rcv 0xf57062c0, buf 0xf5706400 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528680, rcv 0xf57062ac, buf 0xf57063ec drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528200, rcv 0xf5706298, buf 0xf57063d8 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528c80, rcv 0xf5706284, buf 0xf57063c4 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528000, rcv 0xf5706270, buf 0xf57063b0 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528f80, rcv 0xf570625c, buf 0xf570639c drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528f00, rcv 0xf5706248, buf 0xf5706388 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528280, rcv 0xf5706234, buf 0xf5706374 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528a00, rcv 0xf5706220, buf 0xf5706360 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528e00, rcv 0xf570620c, buf 0xf570634c drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe4528780, rcv 0xf57061f8, buf 0xf5706338 drivers/usb/class/cdc-acm.c: acm_rx_tasklet: sending urb 0xe44f4f80, rcv 0xf57061e4, buf 0xf5706324 drivers/usb/class/cdc-acm.c: input control lines: dcd- dsr+ break- ring- framing- parity- overrun- drivers/usb/class/cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x0 len: 0x0 result: 0 drivers/usb/class/cdc-acm.c: acm_ctrl_irq - urb shutting down with status: -2 drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready drivers/usb/class/cdc-acm.c: Entering acm_read_bulk with status -2 cdc_acm 3-1:1.2: Aborting, acm not ready usb 3-1: USB disconnect, address 3 drivers/usb/class/cdc-acm.c: Entering stop_data_traffic -- Paul Martin <pm@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html