PPP over ttyUSB (visor.o, Treo)
Subsystems (2)
Hello @subscribers,
does anybody have working PPP over ttyUSB device in 2.6 kernels? When I connect the Handspring Treo to the 2.6.0-test11 machine, I am able to synchronize it, but not to run PPP to it (it can work as modem). I am able to dial the modem connection using AT commands, but I am not able to run PPP over it. Firstly the chat(1) program complains about not being able to get terminal attributes (TCGETATTR, from strace output), and then pppd(8) complains about not being able to set terminal attributes (TCSETATTR from the strace output). In 2.4 the same setup works OK.
Any hints? (Kernel config and other details are available
on request). Thanks,
-Yenya
Signature · 5 lines
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
| I actually have a lot of admiration and respect for the PATA knowledge |
| embedded in drivers/ide. But I would never call it pretty:) -Jeff Garzik |ons, 10.12.2003 kl. 16.55 skrev Jan Kasprzak:
Quoted 12 lines
Hello @subscribers,
does anybody have working PPP over ttyUSB device in 2.6 kernels? When I connect the Handspring Treo to the 2.6.0-test11 machine, I am able to synchronize it, but not to run PPP to it (it can work as modem). I am able to dial the modem connection using AT commands, but I am not able to run PPP over it. Firstly the chat(1) program complains about not being able to get terminal attributes (TCGETATTR, from strace output), and then pppd(8) complains about not being able to set terminal attributes (TCSETATTR from the strace output). In 2.4 the same setup works OK.
Quoted 2 lines
Any hints? (Kernel config and other details are available
on request). Thanks,
Try to run pppd with "nodetach". Don't ask me why, but it works for me.
Best regards,
Stian
Quoted 12 lines · Jan Kasprzak
Hello @subscribers,
does anybody have working PPP over ttyUSB device in 2.6 kernels? When I connect the Handspring Treo to the 2.6.0-test11 machine, I am able to synchronize it, but not to run PPP to it (it can work as modem). I am able to dial the modem connection using AT commands, but I am not able to run PPP over it. Firstly the chat(1) program complains about not being able to get terminal attributes (TCGETATTR, from strace output), and then pppd(8) complains about not being able to set terminal attributes (TCSETATTR from the strace output). In 2.4 the same setup works OK.
Quoted 2 lines
Any hints? (Kernel config and other details are available
on request). Thanks,
Can you try the patch below? I think it will fix the problem.
thanks,
greg k-h
drivers/usb/serial/usb-serial.c +14 -36
@@ -493,12 +493,15 @@return retval; } -static void __serial_close (struct usb_serial_port *port,struct file *filp) +static void serial_close (struct tty_struct *tty,struct file * filp) { -if (!port->open_count) { -dbg ("%s - port not opened" , __FUNCTION__); +struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; +struct usb_serial *serial =get_usb_serial (port, __FUNCTION__); + +if (!serial)return ; - } + +dbg ("%s - port %d" , __FUNCTION__, port->number); --port->open_count;if (port->open_count <=0 ) {
@@ -506,30 +509,18 @@* port is being closed by the last owner */ port->serial->type->close (port, filp); port->open_count =0 ; + +if (port->tty) { +if (port->tty->driver_data) + port->tty->driver_data =NULL ; + port->tty =NULL ; + } }module_put (port->serial->type->owner);kobject_put (&port->serial->kobj); } -static void serial_close (struct tty_struct *tty,struct file * filp) -{ -struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; -struct usb_serial *serial =get_usb_serial (port, __FUNCTION__); - -if (!serial) -return ; - -dbg ("%s - port %d" , __FUNCTION__, port->number); - -/* if disconnect beat us to the punch here, there's nothing to do */ -if (tty && tty->driver_data) { -__serial_close (port, filp); - tty->driver_data =NULL ; - } - port->tty =NULL ; -} -static int serial_write (struct tty_struct * tty,int from_user,const unsigned char *buf,int count) {struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
@@ -848,19 +839,6 @@dbg ("%s - %s" , __FUNCTION__, kobj->name); serial =to_usb_serial (kobj); - -/* fail all future close/read/write/ioctl/etc calls */ -for (i =0 ; i < serial->num_ports; ++i) { - port = serial->port[i]; -if (port->tty !=NULL ) { - port->tty->driver_data =NULL ; -while (port->open_count >0 ) { -__serial_close (port,NULL ); - } - port->tty =NULL ; - } - } -serial_shutdown (serial);/* return the minor range that this device had */
@@ -1242,7 +1220,7 @@/* register all of the individual ports with the driver core */ for (i =0 ; i < num_ports; ++i) { port = serial->port[i]; - port->dev.parent = &serial->dev->dev; + port->dev.parent = &interface->dev; port->dev.driver =NULL ; port->dev.bus = &usb_serial_bus_type; port->dev.release = &port_release;
ons, 10.12.2003 kl. 22.28 skrev Greg KH:
Quoted 1 line
Can you try the patch below? I think it will fix the problem.
Fixes it for me. Thanks :)
Best regards,
Stian
tor, 11.12.2003 kl. 02.22 skrev Stian Jordet:
Quoted 5 lines
ons, 10.12.2003 kl. 22.28 skrev Greg KH:
Quoted 1 line
Can you try the patch below? I think it will fix the problem.
Fixes it for me. Thanks :)
Uhm.. I was a bit too fast. It fixed the problem, okay, but it makes the kernel spit out a lot of these messages:
Dec 11 02:29:40 chevrolet kernel: usb 1-1: USB disconnect, address 7 Dec 11 02:29:40 chevrolet kernel: hub 1-0:1.0: new USB device on port 1, assigned address 8 Dec 11 02:29:40 chevrolet kernel: input: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:11.2-1 Dec 11 02:29:40 chevrolet kernel: input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:11.2-1 Dec 11 02:33:59 chevrolet kernel: usb 1-1: USB disconnect, address 8 Dec 11 02:33:59 chevrolet kernel: hub 1-0:1.0: new USB device on port 1, assigned address 9 Dec 11 02:33:59 chevrolet kernel: input: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:11.2-1 Dec 11 02:33:59 chevrolet kernel: input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:11.2-1 Dec 11 02:34:15 chevrolet kernel: usb 1-1: USB disconnect, address 9 Dec 11 02:34:16 chevrolet kernel: hub 1-0:1.0: new USB device on port 1, assigned address 10 Dec 11 02:34:16 chevrolet kernel: input: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:11.2-1 Dec 11 02:34:16 chevrolet kernel: input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:11.2-1 Dec 11 02:35:15 chevrolet kernel: usb 1-1: USB disconnect, address 10 Dec 11 02:35:15 chevrolet kernel: hub 1-0:1.0: new USB device on port 1, assigned address 11 Dec 11 02:35:20 chevrolet kernel: usb 1-1: control timeout on ep0out
Untill finally this last line makes my mouse stop working :( Won't help unplug/replug, have to restart to make it work again.. I'm using the ftdi_sio driver. It might be a problem with that, but since pppd won't work without the patch, I don't know...
Best regards,
Stian
Quoted 6 lines · Stian Jordet
tor, 11.12.2003 kl. 02.22 skrev Stian Jordet:
Quoted 5 lines
ons, 10.12.2003 kl. 22.28 skrev Greg KH:
Quoted 1 line
Can you try the patch below? I think it will fix the problem.
Fixes it for me. Thanks :)
Quoted 7 lines
Uhm.. I was a bit too fast. It fixed the problem, okay, but it makes the kernel spit out a lot of these messages:
Dec 11 02:29:40 chevrolet kernel: usb 1-1: USB disconnect, address 7 Dec 11 02:29:40 chevrolet kernel: hub 1-0:1.0: new USB device on port 1,assigned address 8
This has nothing to do with the visor or other usb-serial drivers. It looks like you have either a flaky USB connection, or a power issue on your USB hub. Either way, the device keeps disconnecting itself electronically (nothing Linux can do about that) and then reconnecting itself. Not good.
Is this connected to a powered hub? If not, I'd recommend using one, or getting a new keyboard/mouse as this is on the fritz.
thanks,
greg k-h
tor, 11.12.2003 kl. 07.44 skrev Greg KH:
Quoted 15 lines · Stian Jordet
Quoted 6 lines
tor, 11.12.2003 kl. 02.22 skrev Stian Jordet:
Quoted 5 lines
ons, 10.12.2003 kl. 22.28 skrev Greg KH:
Quoted 1 line
Can you try the patch below? I think it will fix the problem.
Fixes it for me. Thanks :)
Quoted 7 lines
Uhm.. I was a bit too fast. It fixed the problem, okay, but it makes the kernel spit out a lot of these messages:
Dec 11 02:29:40 chevrolet kernel: usb 1-1: USB disconnect, address 7 Dec 11 02:29:40 chevrolet kernel: hub 1-0:1.0: new USB device on port 1,assigned address 8
Quoted 8 lines
This has nothing to do with the visor or other usb-serial drivers. It looks like you have either a flaky USB connection, or a power issue on your USB hub. Either way, the device keeps disconnecting itself electronically (nothing Linux can do about that) and then reconnecting itself. Not good.
Is this connected to a powered hub? If not, I'd recommend using one, or getting a new keyboard/mouse as this is on the fritz.
It isn't connected to a hub at all. I have never had any usb problems, before I tried this patch. Now it's unusable :( What ever is the cause, the patch triggers it.
Best regards,
Stian
tor, 11.12.2003 kl. 15.23 skrev Stian Jordet:
Quoted 22 lines
tor, 11.12.2003 kl. 07.44 skrev Greg KH:
Quoted 21 lines · Stian Jordet
Quoted 6 lines
tor, 11.12.2003 kl. 02.22 skrev Stian Jordet:
Quoted 5 lines
ons, 10.12.2003 kl. 22.28 skrev Greg KH:
Quoted 1 line
Can you try the patch below? I think it will fix the problem.
Fixes it for me. Thanks :)
Quoted 7 lines
Uhm.. I was a bit too fast. It fixed the problem, okay, but it makes the kernel spit out a lot of these messages:
Dec 11 02:29:40 chevrolet kernel: usb 1-1: USB disconnect, address 7 Dec 11 02:29:40 chevrolet kernel: hub 1-0:1.0: new USB device on port 1,assigned address 8
This has nothing to do with the visor or other usb-serial drivers. It looks like you have either a flaky USB connection, or a power issue on your USB hub. Either way, the device keeps disconnecting itself electronically (nothing Linux can do about that) and then reconnecting itself. Not good.
Quoted 6 lines
Quoted 2 lines
Is this connected to a powered hub? If not, I'd recommend using one, or getting a new keyboard/mouse as this is on the fritz.
It isn't connected to a hub at all. I have never had any usb problems, before I tried this patch. Now it's unusable :( What ever is the cause, the patch triggers it.
I just tried 2.4.24-pre1, and I have the same behaviour, so I guess either the ftdi_sio or my mouse is b0rked. Weird, though, since they are connected on two different buses, and I have four other usb devices connected as well, without problem.
Best regards,
Stian
Quoted 5 lines · Stian Jordet
I just tried 2.4.24-pre1, and I have the same behaviour, so I guess either the
ftdi_sioor my mouse is b0rked. Weird, though, since they are connected on two different buses, and I have four other usb devices connected as well, without problem.
I really think you are exceeding the power limits for this hub, or you have a flaky device.
thanks,
greg k-h
fre, 12.12.2003 kl. 22.15 skrev Greg KH:
Quoted 8 lines · Stian Jordet
Quoted 5 lines
I just tried 2.4.24-pre1, and I have the same behaviour, so I guess either the
ftdi_sioor my mouse is b0rked. Weird, though, since they are connected on two different buses, and I have four other usb devices connected as well, without problem.I really think you are exceeding the power limits for this hub, or you have a flaky device.
I really understand if you are too busy answering stupid questions from me. But I still hope someone can answer my one question.
I have six usb-devices: 3com Bluetooth, HP printer, Epson scanner, Logitech keyboard/mouse, Kodak digital camera and a no-name memory card reader. My motherboard have six onboard usb-ports.
The problem _only_ occur when I have a ppp-connection through the ftdi_sio adapter. I tried disconnecting everything except the usb-serial adapter and the Logitech. Same problem. Without an active ppp-connection. No problems what-so-ever.
If I use a PS/2 keyboard and mouse, no problems with the rest of the usb devices, even with a ppp connection.
Can my usb-serial converter be the flaky device, even though it's the Logitech that is complaining, or can it be the motherboard? Since I never-ever saw any error messages untill I recently switched my pl2303 against the ftdi_sio.
Best regards,
Stian
Quoted 5 lines · Stian Jordet
Can my usb-serial converter be the flaky device, even though it's the Logitech that is complaining, or can it be the motherboard? Since I never-ever saw any error messages untill I recently switched my pl2303 against the
ftdi_sio.
The ftdi_sio device could be sucking more power than the pl2303 device from the USB bus. That's what I would guess is happening.
greg k-h
Greg KH wrote:
:
: Can you try the patch below? I think it will fix the problem. :
Well, it fixes the problem (pppd connects, and works OK),
but the kernel complains about badness in local_bh_enable.
Full syslog is at http://www.fi.muni.cz/~kas/tmp/visor-mesages.txt,
kernel config is at http://www.fi.muni.cz/~kas/tmp/visor-kconfig.txt.
Any other info I should add?
Thanks?
-Yenya
Dec 11 13:04:21 nisus kernel: PPP generic driver version 2.4.2 Dec 11 13:04:21 nisus pppd[1943]: pppd 2.4.1 started by root, uid 0 Dec 11 13:04:21 nisus pppd[1943]: Using interface ppp0 Dec 11 13:04:21 nisus pppd[1943]: Connect: ppp0 <--> /dev/ttyUSB1 Dec 11 13:04:21 nisus kernel: Badness in local_bh_enable at kernel/softirq.c:121Dec 11 13:04:21 nisus kernel: Call Trace: Dec 11 13:04:21 nisus kernel: [<c011e8b4>] local_bh_enable+0x70/0x72 Dec 11 13:04:21 nisus kernel: [<de9e9ee2>] ppp_async_input+0x2de/0x583 [ppp_async] Dec 11 13:04:21 nisus kernel: [<de9e9396>] ppp_asynctty_receive+0x4b/0x8a [ppp_async] Dec 11 13:04:21 nisus kernel: [<c01c1924>] flush_to_ldisc+0x7d/0xce Dec 11 13:04:21 nisus kernel: [<de9dd7f5>] visor_read_bulk_callback+0x131/0x2a7 [visor] Dec 11 13:04:21 nisus kernel: [<c021e785>] usb_hcd_giveback_urb+0x25/0x39 Dec 11 13:04:21 nisus kernel: [<de9d08a3>] uhci_finish_completion+0x48/0x5f [uhci_hcd] Dec 11 13:04:21 nisus kernel: [<c021e7cf>] usb_hcd_irq+0x36/0x5f Dec 11 13:04:21 nisus kernel: [<c010a6be>] handle_IRQ_event+0x3a/0x64 Dec 11 13:04:21 nisus kernel: [<c010a97e>] do_IRQ+0x6f/0xdf Dec 11 13:04:21 nisus kernel: [<c0105000>] rest_init+0x0/0x27 Dec 11 13:04:21 nisus kernel: [<c0109140>] common_interrupt+0x18/0x20 Dec 11 13:04:21 nisus kernel: [<c0105000>] rest_init+0x0/0x27 Dec 11 13:04:21 nisus kernel: [<de89d23e>] acpi_processor_idle+0xd5/0x1c7 [processor] Dec 11 13:04:21 nisus kernel: [<c0105000>] rest_init+0x0/0x27 Dec 11 13:04:21 nisus kernel: [<c010709f>] cpu_idle+0x2c/0x35 Dec 11 13:04:21 nisus kernel: [<c036a64d>] start_kernel+0x13f/0x14a Dec 11 13:04:21 nisus kernel: [<c036a3ea>] unknown_bootoption+0x0/0xfd Dec 11 13:04:21 nisus kernel:
Signature · 5 lines
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
| I actually have a lot of admiration and respect for the PATA knowledge |
| embedded in drivers/ide. But I would never call it pretty:) -Jeff Garzik |Quoted 10 lines · Jan Kasprzak
Greg KH wrote:
:
: Can you try the patch below? I think it will fix the problem. :
Well, it fixes the problem (pppd connects, and works OK),
but the kernel complains about badness inlocal_bh_enable.Full syslog is at http://www.fi.muni.cz/~kas/tmp/visor-mesages.txt,
kernel config is at http://www.fi.muni.cz/~kas/tmp/visor-kconfig.txt.
Any other info I should add?
Nah, this is a known problem, sorry. The usb-serial core needs to have the same kind of patch that the cdc-acm driver just had (change to use a tasklet). It's on my TODO list...
thanks,
greg k-h