Problems using ftdi_sio in TS-Linux

Greetings,

I am a Computer Science student at Michigan State University working on my senior project (NASA rover navigation system improvement). This project involves using a SICK LIDAR unit with a TS-Linux-equipped Technologic SBC (TS-5500). (See

formatting link
for SBC & TS-Linux info) As I understand it, TS-Linux is a RH derivative.

The LIDAR unit plugs into a RS422 -> USB adapter. The USB cable from the adapter is then plugged into the SBC. Students from previous semesters have been able to get the LIDAR unit working under stock TS-Linux 2.4.23 with the use of the ftdi_sio.so kernel module (which does NOT ship with TS-Linux).

All of the work from these students was recently destroyed (including backups). I have been trying to get things working once again under TS-Linux with no success. Basically, everything works normally under TS-Linux except communication with the LIDAR unit. I have verified that the LIDAR unit works on a Windows machine, which should rule out hardware issues with both the LIDAR unit and the RS422 -> USB adapter. I am able to mount & read/write to a USB flash drive under TS-Linux on the SBC, so that should rule out "standard" USB configuration issues and also hardware issues with the USB port on the SBC. (I also tried another identical SBC and got the same results).

Any attempt to access /dev/usb/tts/0 results in a kernel page fault and results in an unstable system thereafter. /dev/ttyUSB0 never appears after a load of ftdi_sio.so as would be expected. If I add it with mknod c 188 0, it behaves just the same as /dev/usb/tts/0.

I have tried compiling the ftdi_sio.so module from the 2.4.23 Linux kernel source (from

formatting link
with the TS-Linux patch applied. The module loads without requiring a -f with insmod, but still crashes nonetheless. I have tried countless other variations of ftdi_sio.so to no avail. (same exact results) The students from previous semesters were able to get this working with a version of ftdi_sio.o that had to be forced to load (due to version mismatch)... but no one seems to be able

to remember which version it was.

I've attached a log of a session on the machine where the system was booted without the RS422 -> USB adapter plugged into the SBC. I show dmesg & module info, plug the adapter in, show the same info, and then show the page fault.

This TS-Linux install was done via the instructions located at the URL:

formatting link

Here is the USB device and driver data from the proc fs.

/dev/bus/usb/devices: T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB OHCI Root Hub S: SerialNumber=c4819000 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 7 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0403 ProdID=6001 Rev= 4.00 S: Manufacturer=FTDI S: Product=USB TO RS-422/485 ADAPTER S: SerialNumber=FTC95UFS C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 44mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=serial E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

/dev/bus/usb/drivers: usbdevfs hub usb-storage serial

I compiled in debugging into ftdi_sio.o recently. While I don't have the exact output here with me, it basically sets the baud rate to 9600, states the divisor it's using, and then the segfault happens. (After it states the baud/divisor, there was no additional output)

I'm planning on doing more debugging, but I figured it would be in my best interest to post to this newsgroup to see if anyone has suggestions for how best to troubleshoot/remedy this problem.

Thank you!

Sincerely,

Mike M.

Attached Log: Script started on Mon Mar 13 02:15:24 2000 [root@miniepc root]#uname -a Linux miniepc.embeddedx86.com 2.4.23-2.5-ts #2 Tue Sep 21 03:41:41 MST

2004 i486 unknown [root@miniepc root]#lsmod Module Size Used by Tainted: PF ftdi_sio 20280 0 (unused) a2d_driver 2400 0 (unused) usbserial 16800 0 [ftdi_sio] orinoco_cs 4424 1 orinoco 31072 0 [orinoco_cs] hermes 5248 0 [orinoco_cs orinoco] ds 6496 1 [orinoco_cs] yenta_socket 9760 1 pcmcia_core 37408 0 [orinoco_cs ds yenta_socket] usb-ohci 16416 0 (unused) usbcore 56192 1 [ftdi_sio usbserial usb-ohci] [root@miniepc root]# [root@miniepc root]# [root@miniepc root]#ls -lR /dev/usb

/dev/usb: [root@miniepc root]#dmesg Linux version 2.4.23-2.5-ts (mike@spike) (gcc version 2.95.4 20011002 (Debian prerelease)) #2 Tue Sep 21 03:41:41 MST 2004 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009e400 (usable) BIOS-e820: 000000000009e400 - 00000000000a0000 (reserved) BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 0000000004000000 (usable) BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)

64MB LOWMEM available. On node 0 totalpages: 16384 zone(0): 4096 pages. zone(1): 12288 pages. zone(2): 0 pages. DMI not present. Kernel command line: root=/dev/hda2 reboot=bios console=tty1,115200 Initializing CPU#0 Console: colour VGA+ 80x25 Calibrating delay loop... 65.74 BogoMIPS Memory: 62600k/65536k available (1175k kernel code, 2544k reserved, 304k data, 76k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Dentry cache hash table entries: 8192 (order: 4, 65536 bytes) Inode cache hash table entries: 4096 (order: 3, 32768 bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 4096 (order: 2, 16384 bytes) Page-cache hash table entries: 16384 (order: 4, 65536 bytes) CPU: After generic, caps: 00000001 00000000 00000000 00000000 CPU: Common caps: 00000001 00000000 00000000 00000000 CPU: AMD 486 DX/4-WB stepping 04 Checking 'hlt' instruction... OK. POSIX conformance testing by UNIFIX PCI: Using configuration type 1 PCI: Probing PCI hardware PCI: Probing PCI hardware (bus 00) Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd Journalled Block Device driver loaded devfs: v1.12c (20020818) Richard Gooch ( snipped-for-privacy@atnf.csiro.au) devfs: boot_options: 0x1 Installing knfsd (copyright (C) 1996 snipped-for-privacy@monad.swb.de). pty: 256 Unix98 ptys configured ts5600.o: determined board is not TS5600 Serial driver version 5.05c-TS (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled ttyS00 at 0x03f8 (irq = 4) is a 16550A ttyS01 at 0x02f8 (irq = 3) is a 16550A ttyS02 at 0x03e8 (irq = 4) is a 16550A cs89x0:cs89x0_probe(0x0) PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0x1 eth0: incorrect signature 0x6000 PP_addr=0xf0f eth0: incorrect signature 0xf0f PP_addr=0xf0f eth0: incorrect signature 0xf0f cs89x0: no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) dmfe: Davicom DM9xxx net driver, version 1.36.4 (2002-01-17) eth0: Davicom DM9102 at pci00:0d.0, 00:d0:69:09:22:90, irq 11. Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx hda: SanDisk SDCFB-128, CFA DISK drive ide2: ports already in use, skipping probe ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 hda: attached ide-disk driver. hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error } hda: task_no_data_intr: error=0x04 { DriveStatusError } hda: 250880 sectors (128 MB) w/1KiB Cache, CHS=980/8/32 Partition check: /dev/ide/host0/bus0/target0/lun0: p1 p2 hd: unable to get major 3 for hard disk NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 4096 bind 4096) NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. /dev/ide/host0/bus0/target0/lun0: p1 p2 /dev/ide/host0/bus0/target0/lun0: p1 p2 /dev/ide/host0/bus0/target0/lun0: p1 p2 /dev/ide/host0/bus0/target0/lun0: p1 p2 VFS: Mounted root (ext2 filesystem) readonly. Mounted devfs on /dev Freeing unused kernel memory: 76k freed VFS: Disk change detected on device 03:00 /dev/ide/host0/bus0/target0/lun0: p1 p2 fl: Error FlInit->flInit: 60 fl: Cannot initialize M-Systems DOC 2000 OSAK usb.c: registered new driver usbdevfs usb.c: registered new driver hub usb-ohci.c: USB OHCI at membase 0xc4819000, IRQ 9 usb-ohci.c: usb-00:0b.0, PCI device 1045:c861 usb.c: new USB bus registered, assigned bus number 1 hub.c: USB hub found hub.c: 2 ports detected Linux Kernel Card Services 3.1.22 options: [pci] [cardbus] Intel ISA PCIC probe: not found. PCI: Enabling device 00:0c.0 (0004 -> 0006) Yenta IRQ list 00c0, PCI irq10 Socket status: 30000010 cs: warning: no high memory space available! cs: unable to map card memory! cs: unable to map card memory! cs: unable to map card memory! cs: unable to map card memory! cs: unable to map card memory! cs: unable to map card memory! cs: IO port probe 0x0c00-0x0cff: clean. cs: IO port probe 0x0a00-0x0aff: clean. hermes.c: 4 Dec 2002 David Gibson orinoco.c 0.13d (David Gibson and others) orinoco_cs.c 0.13d (David Gibson and others) eth1: Station identity 001f:0006:0001:0003 eth1: Looks like an Intersil firmware version 1.3.6 eth1: Ad-hoc demo mode supported eth1: IEEE standard IBSS ad-hoc mode supported eth1: WEP supported, 104-bit key eth1: MAC address 00:09:5B:3A:66:9E eth1: Station name "Prism I" eth1: ready eth1: index 0x01: Vcc 5.0, irq 7, io 0x0a00-0x0a3f eth1: Error -110 setting multicast list. eth1: Error -110 setting multicast list. eth1: Error -110 setting multicast list. eth1: New link status: Connected (0001) usb.c: registered new driver serial usbserial.c: USB Serial support registered for Generic usbserial.c: USB Serial Driver core v1.4 a2d.o: Technologic Systems 12.8.2002 Ver 1.02 a2d.o: Module Loaded usbserial.c: USB Serial support registered for FTDI SIO usbserial.c: USB Serial support registered for FTDI 8U232AM Compatible usbserial.c: USB Serial support registered for FTDI FT232BM Compatible usbserial.c: USB Serial support registered for FTDI FT2232C Compatible usbserial.c: USB Serial support registered for USB-UIRT Infrared Receiver/Transmitter usbserial.c: USB Serial support registered for Home-Electronics TIRA-1 IR Transceiver ftdi_sio.c: v1.3.5:USB FTDI Serial Converters Driver [root@miniepc root]# [root@miniepc root]# [root@miniepc root]#echo "plugging in device.." plugging in device.. [root@miniepc root]# [root@miniepc root]#dmesg | tail usbserial.c: USB Serial support registered for FTDI SIO usbserial.c: USB Serial support registered for FTDI 8U232AM Compatible usbserial.c: USB Serial support registered for FTDI FT232BM Compatible usbserial.c: USB Serial support registered for FTDI FT2232C Compatible usbserial.c: USB Serial support registered for USB-UIRT Infrared Receiver/Transmitter usbserial.c: USB Serial support registered for Home-Electronics TIRA-1 IR Transceiver ftdi_sio.c: v1.3.5:USB FTDI Serial Converters Driver hub.c: new USB device 00:0b.0-2, assigned address 2 usbserial.c: FTDI FT232BM Compatible converter detected usbserial.c: FTDI FT232BM Compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs) [root@miniepc root]#ls -lR /dev/usb*

/dev/usb: drwxr-xr-x 1 root root 0 Dec 31 1969 tts/

/dev/usb/tts: crw------- 1 root root 188, 0 Dec 31 1969 0 [root@miniepc root]#lsmod Module Size Used by Tainted: PF ftdi_sio 20280 0 (unused) a2d_driver 2400 0 (unused) usbserial 16800 0 [ftdi_sio] orinoco_cs 4424 1 orinoco 31072 0 [orinoco_cs] hermes 5248 0 [orinoco_cs orinoco] ds 6496 1 [orinoco_cs] yenta_socket 9760 1 pcmcia_core 37408 0 [orinoco_cs ds yenta_socket] usb-ohci 16416 0 (unused) usbcore 56192 1 [ftdi_sio usbserial usb-ohci] [root@miniepc root]# [root@miniepc root]# [root@miniepc root]#stty -a < /dev/usb/tts/0 Segmentation fault [root@miniepc root]#exit Script done on Mon Mar 13 02:17:11 2000

Here is the output from the seg fault... note that if I use ftditest, the process is "ftditest" instead of "bash."

Unable to handle kernel paging request at virtual address 0002001c printing eip: c4803329

*pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[] Tainted: PF EFLAGS: 00010206 eax: 00020000 ebx: c3e1481c ecx: c11a8c00 edx: c2b67e30 esi: c2b67e30 edi: c3e14800 ebp: c273deb0 esp: c273de44 ds: 0018 es: 0018 ss: 0018 Process bash (pid: 321, stackpage=c273d000) Stack: c484cddd c2b67e30 00000001 c10b36d8 00000246 0000000c c0260a9c c0260c54 000001f0 c282e000 c2d2e000 c0198bb7 c282e000 00000000 c282e000 c282e000 c2c791d4 c019545f 00000000 c2d4a7b0 00000000 c2990810 c27d3158 00000000 Call Trace: [] [] [] [] [] [] [] [] [] [] [] [] [] Code: 8b 40 1c 85 c0 74 10 52 8b 40 0c ff d0 83 c4 04 c3 8d b6 00
Reply to
gritswantd
Loading thread data ...

Post your query on

formatting link
. While it's ARM-based, your work is interesting enough that you might get some good info.

--Yan

Reply to
CptDondo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.