Greg KH wrote:
On Tue, Feb 08, 2011 at 05:32:50PM +0100, Arvid Brodin wrote:
Hi!
I get weird problems when I use a null modem cable between the two ports
on a FT232BM (2-port FTDI USB-to-serial converter) with an isp1761 host
controller. The same thing does not happen with an EHCI host controller.
Lengthy details follows:
With the EHCI host controller:
=============================
[Terminal 1]
$ cat /dev/ttyUSB1
[Terminal 2]
$ echo "Something seems wrong here" > /dev/ttyUSB0
$ echo "Something seems wrong here" > /dev/ttyUSB0
Ick, stop right there, that's your problem. Do not rely on 'cat' and
'echo' to get the line settings correct at all. Use a serial program
like minicom to test usb to serial ports properly.
Yes, sometimes you can get cat and echo to work right, if you use stty
to set up everything properly but note that some usb to serial drivers
like to reset some of these settings when you close and open the
connection, making stty pretty much useless for stuff like 'cat' and
'echo'.
It looks like all of your issues are with the line settings for the
serial port (line ends, etc.) and should go away if you use minicom.
If your problem persists with minicom or some program like that which
properly sets the tty settings before transferring the data, please let
us know.
thanks,
greg k-h
Ok, thanks for that info! Stupid me to think that basic tools like cat
and echo would work with default line settings. ;)
Anyway, I did a quick test with microcom (busybox) since that was all
that was available on this embedded system at the moment. Everything
worked fine until I pressed Ctrl-X at which point I got a kernel panic
(null pointer dereference at virtual address 00000014) at
isp1760_irq+0xde/0x806 (PC)
isp1760_irq+0x248/0x806 (LR)
Call trace:
[<901486ae>] usb_hcd_irq+0x6a/0x74
[<900406d4>] handle_IRQ_event+0x14/0x3c
[<90041816>] handle_level_irq+0x9e/0xb0
[<90017ee2>] demux_eic_irq+0x3a/0x54
[<90017c5e>] do_IRQ+0x32/0x58
[<90016422>] irq_level0+0x18/0x60
[<9014845a>] unlink1+0x86/0x94
[<901485fe>] usb_hcd_unlink_urb+0x3a/0x80
[<90148b7e>] usb_kill_urb+0x42/0xc4
[<c0897496>] ftdi_close+0xba/0xf0 [ftdi_sio]
[<c08b1872>] sial_close+0x6a/0xf0 [usbserial]
...
Right now I'm using a backported and endianness-modified isp1760 driver
from 2.6.35.7 with a 2.6.27.54 kernel - if I manage to repeat this on a
current kernel I'll get back to the list.
Thanks,
Arvid Brodin
Enea Services Stockholm AB
--
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