[devel] usb-serial driver pl2303.c crashes (fwd)

Ivan Zakharyaschev =?iso-8859-1?q?imz_=CE=C1_altlinux=2Eru?=
Пт Авг 3 20:55:33 MSD 2001


	Hello!

У меня возникли проблемы при попытке использовать "переходник"
USB-serial с помощью драйвера pl2303 (написанного именно для этого
устройства) из ядра 2.4.7-alt2-up (с 2.4.5 и 2.4.6 то же самое). Может у
кого-нибудь есть идеи по поводу того, как пытаться исправить?

Вот мое письмо автору драйвера, которое должно все разъяснить.

Best regards,
	Ivan Z.

---------- Forwarded message ----------
Date: Fri, 3 Aug 2001 17:46:44 +0100 (BST)
From: Ivan Zakharyaschev <imz на altlinux.ru>
To: Greg Kroah-Hartman <greg на kroah.com>
Subject: usb-serial driver pl2303.c crashes

	Greg,

As you can guess, I have got a Prolific USB-to-serial converter
(PL2303), and am trying now to use it.

Here is the scheme of what I am doing:

I boot up my system with a 2.4.7 kernel, usb-ohci is loaded.
Then I issue the command modprobe pl2303 debug=1. Connect the converter
to one of the USB holes and the other end to a serial port of the same
computer (ttyS1). It is detected, and assigned to /dev/usb/ttyUSB0.

Then I try to send a byte ('a') through the conveter., so I run

$ cat /dev/ttyS1

and on another console

$ echo a > /dev/usb/ttyUSB0

At this moment something horrible happens -- I attach the logs that
might be useful. I'm not a kernel hacker, but I'd like to get this
driver working, and I'm ready to test it. Do you have any suggestions
what to do?

By the way, I tried to use it in other ways and in other configurations,
for example on a computer with Intel's USB (with usb-uhci module), and
with other kernels (2.4.5 and 2.4.6).

When I try to do the same the second time (echo a > /dev/usb/ttyUSB0),
it behaves differently: some debug messages are printed out, but the
byte doesn't appear to go through and the echo process doesn't exit --
so I press Ctrl-C to stop it. So the second time it doesn't work either.
The log for the second attempt is attached as well.

The test of writing in other direction (from ttyS1) results in a
complete crash of the system (it says something about a fault in an
interrupt handler).

So that's it. I would be glad to hear any advice from you.

Best reagrds,
----------- следующая часть -----------
Aug  3 16:53:39 pc363 syslogd: syslogd startup succeeded
Aug  3 16:53:39 pc363 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Aug  3 16:53:39 pc363 kernel: Inspecting /boot/System.map-2.4.7-alt2-up
Aug  3 16:53:39 pc363 klogd: klogd startup succeeded
Aug  3 16:53:39 pc363 kernel: Loaded 13415 symbols from /boot/System.map-2.4.7-alt2-up.
Aug  3 16:53:39 pc363 kernel: Symbols match kernel version 2.4.7.
Aug  3 16:53:39 pc363 kernel: Loaded 252 symbols from 14 modules.
Aug  3 16:53:39 pc363 kernel: Linux version 2.4.7-alt2-up (kostya на goldhead.station) (gcc version 2.95.3 20010315 (ALT Linux, build 2.95.3-ipl6mdk)) #1 Thu Aug 2 05:20:42 MSD 2001
Aug  3 16:53:39 pc363 kernel: BIOS-provided physical RAM map:
Aug  3 16:53:39 pc363 kernel:  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
Aug  3 16:53:39 pc363 kernel:  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
Aug  3 16:53:39 pc363 kernel:  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
Aug  3 16:53:39 pc363 kernel:  BIOS-e820: 0000000000100000 - 0000000007ff0000 (usable)
Aug  3 16:53:39 pc363 kernel:  BIOS-e820: 0000000007ff0000 - 0000000007ff3000 (ACPI NVS)
Aug  3 16:53:39 pc363 kernel:  BIOS-e820: 0000000007ff3000 - 0000000008000000 (ACPI data)
Aug  3 16:53:39 pc363 kernel:  BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
Aug  3 16:53:39 pc363 kernel: On node 0 totalpages: 32752
Aug  3 16:53:39 pc363 kernel: zone(0): 4096 pages.
Aug  3 16:53:39 pc363 kernel: zone(1): 28656 pages.
Aug  3 16:53:39 pc363 kernel: zone(2): 0 pages.
Aug  3 16:53:39 pc363 kernel: Kernel command line: root=/dev/hda6
Aug  3 16:53:39 pc363 kernel: Initializing CPU#0
Aug  3 16:53:39 pc363 kernel: Detected 501.135 MHz processor.
Aug  3 16:53:39 pc363 kernel: Console: colour VGA+ 80x25
Aug  3 16:53:39 pc363 kernel: Calibrating delay loop... 999.42 BogoMIPS
Aug  3 16:53:39 pc363 kernel: Memory: 126192k/131008k available (826k kernel code, 4428k reserved, 227k data, 308k init, 0k highmem)
Aug  3 16:53:39 pc363 kernel: Dentry-cache hash table entries: 16384 (order: 5, 131072 bytes)
Aug  3 16:53:39 pc363 kernel: Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
Aug  3 16:53:39 pc363 kernel: Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
Aug  3 16:53:39 pc363 kernel: Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Aug  3 16:53:39 pc363 kernel: Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
Aug  3 16:53:39 pc363 kernel: CPU: L1 I Cache: 32K (32 bytes/line), D cache 32K (32 bytes/line)
Aug  3 16:53:39 pc363 kernel: CPU: AMD-K6(tm) 3D processor stepping 0c
Aug  3 16:53:39 pc363 kernel: Checking 'hlt' instruction... OK.
Aug  3 16:53:39 pc363 kernel: POSIX conformance testing by UNIFIX
Aug  3 16:53:39 pc363 kernel: mtrr: v1.40 (20010327) Richard Gooch (rgooch на atnf.csiro.au)
Aug  3 16:53:39 pc363 kernel: mtrr: detected mtrr type: AMD K6
Aug  3 16:53:39 pc363 kernel: PCI: PCI BIOS revision 2.10 entry at 0xfb4f0, last bus=1
Aug  3 16:53:39 pc363 kernel: PCI: Using configuration type 1
Aug  3 16:53:39 pc363 kernel: PCI: Probing PCI hardware
Aug  3 16:53:39 pc363 kernel: Unknown bridge resource 0: assuming transparent
Aug  3 16:53:39 pc363 kernel: Unknown bridge resource 2: assuming transparent
Aug  3 16:53:39 pc363 kernel: PCI: Using IRQ router ALI [10b9/1533] at 00:07.0
Aug  3 16:53:39 pc363 kernel: PnP: PNP BIOS installation structure at 0xc00fc130
Aug  3 16:53:39 pc363 kernel: PnP: PNP BIOS version 1.0, entry at f0000:c158, dseg at f0000
Aug  3 16:53:39 pc363 kernel: PnP: 16 devices detected total
Aug  3 16:53:39 pc363 kernel: Linux NET4.0 for Linux 2.4
Aug  3 16:53:39 pc363 kernel: Based upon Swansea University Computer Society NET3.039
Aug  3 16:53:39 pc363 kernel: Initializing RT netlink socket
Aug  3 16:53:39 pc363 kernel: Starting kswapd v1.8
Aug  3 16:53:39 pc363 kernel: VFS: Diskquotas version dquot_6.5.0 initialized
Aug  3 16:53:39 pc363 kernel: pty: 256 Unix98 ptys configured
Aug  3 16:53:39 pc363 kernel: block: queued sectors max/low 83602kB/27867kB, 256 slots per queue
Aug  3 16:53:39 pc363 kernel: RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Aug  3 16:53:39 pc363 kernel: Uniform Multi-Platform E-IDE driver Revision: 6.31
Aug  3 16:53:39 pc363 kernel: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Aug  3 16:53:39 pc363 kernel: ALI15X3: IDE controller on PCI bus 00 dev 78
Aug  3 16:53:39 pc363 kernel: PCI: Assigned IRQ 5 for device 00:0f.0
Aug  3 16:53:39 pc363 kernel: ALI15X3: chipset revision 194
Aug  3 16:53:39 pc363 kernel: ALI15X3: not 100%% native mode: will probe irqs later
Aug  3 16:53:39 pc363 kernel:     ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:pio
Aug  3 16:53:39 pc363 kernel:     ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:pio
Aug  3 16:53:39 pc363 kernel: hda: ST315320A, ATA DISK drive
Aug  3 16:53:39 pc363 kernel: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Aug  3 16:53:39 pc363 kernel: hdc: FX4824T, ATAPI CD/DVD-ROM drive
Aug  3 16:53:39 pc363 kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Aug  3 16:53:39 pc363 kernel: ide1 at 0x170-0x177,0x376 on irq 15
Aug  3 16:53:39 pc363 kernel: hda: 29888820 sectors (15303 MB) w/2048KiB Cache, CHS=1860/255/63, UDMA(66)
Aug  3 16:53:39 pc363 kernel: Partition check:
Aug  3 16:53:39 pc363 kernel:  hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >
Aug  3 16:53:39 pc363 kernel: NET4: Frame Diverter 0.46
Aug  3 16:53:39 pc363 kernel: Cronyx Ltd, Synchronous PPP and CISCO HDLC (c) 1994
Aug  3 16:53:39 pc363 kernel: Linux port (c) 1998 Building Number Three Ltd & Jan "Yenya" Kasprzak.
Aug  3 16:53:39 pc363 kernel: NET4: Linux TCP/IP 1.0 for NET4.0
Aug  3 16:53:39 pc363 kernel: IP Protocols: ICMP, UDP, TCP
Aug  3 16:53:39 pc363 kernel: IP: routing cache hash table of 512 buckets, 4Kbytes
Aug  3 16:53:39 pc363 kernel: TCP: Hash tables configured (established 8192 bind 8192)
Aug  3 16:53:39 pc363 kernel: NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Aug  3 16:53:39 pc363 kernel: RAMDISK: Compressed image found at block 0
Aug  3 16:53:39 pc363 kernel: Uncompressing.......................done.
Aug  3 16:53:39 pc363 kernel: Freeing initrd memory: 580k freed
Aug  3 16:53:39 pc363 kernel: VFS: Mounted root (ext2 filesystem).
Aug  3 16:53:39 pc363 kernel: reiserfs: checking transaction log (device 03:06) ...
Aug  3 16:53:39 pc363 kernel: Using r5 hash to sort names
Aug  3 16:53:39 pc363 kernel: reiserfs: using 3.5.x disk format
Aug  3 16:53:39 pc363 kernel: ReiserFS version 3.6.25
Aug  3 16:53:39 pc363 kernel: VFS: Mounted root (reiserfs filesystem) readonly.
Aug  3 16:53:39 pc363 kernel: change_root: old root has d_count=2
Aug  3 16:53:39 pc363 kernel: Trying to unmount old root ... okay
Aug  3 16:53:39 pc363 kernel: Freeing unused kernel memory: 308k freed
Aug  3 16:53:39 pc363 kernel: Executing init=/sbin/init
Aug  3 16:53:39 pc363 kernel: Real Time Clock Driver v1.10d
Aug  3 16:53:39 pc363 kernel: Adding Swap: 136544k swap-space (priority -1)
Aug  3 16:53:39 pc363 kernel: reiserfs: checking transaction log (device 03:07) ...
Aug  3 16:53:39 pc363 kernel: Using r5 hash to sort names
Aug  3 16:53:39 pc363 kernel: reiserfs: using 3.5.x disk format
Aug  3 16:53:39 pc363 kernel: ReiserFS version 3.6.25
Aug  3 16:53:39 pc363 kernel: reiserfs: checking transaction log (device 03:08) ...
Aug  3 16:53:39 pc363 kernel: Using r5 hash to sort names
Aug  3 16:53:39 pc363 kernel: reiserfs: using 3.5.x disk format
Aug  3 16:53:39 pc363 kernel: ReiserFS version 3.6.25
Aug  3 16:53:39 pc363 kernel: MSDOS FS: Using codepage 866
Aug  3 16:53:39 pc363 kernel: MSDOS FS: IO charset koi8-r
Aug  3 16:53:39 pc363 kernel: usb.c: registered new driver usbdevfs
Aug  3 16:53:39 pc363 kernel: usb.c: registered new driver hub
Aug  3 16:53:39 pc363 kernel: PCI: Found IRQ 11 for device 00:02.0
Aug  3 16:53:39 pc363 kernel: usb-ohci.c: USB OHCI at membase 0xc8a67000, IRQ 11
Aug  3 16:53:39 pc363 kernel: usb-ohci.c: usb-00:02.0, Acer Laboratories Inc. [ALi] M5237 USB
Aug  3 16:53:39 pc363 kernel: usb.c: new USB bus registered, assigned bus number 1
Aug  3 16:53:39 pc363 kernel: hub.c: USB hub found
Aug  3 16:53:39 pc363 kernel: hub.c: 2 ports detected
Aug  3 16:53:39 pc363 kernel: usb-ohci.c: v5.2:USB OHCI Host Controller Driver
Aug  3 16:53:39 pc363 kernel: isapnp: Scanning for PnP cards...
Aug  3 16:53:39 pc363 kernel: isapnp: No Plug & Play device found

Aug  3 16:53:55 pc363 kernel: Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled
Aug  3 16:53:55 pc363 kernel: ttyS00 at 0x03f8 (irq = 4) is a 16550A
Aug  3 16:53:55 pc363 kernel: ttyS01 at 0x02f8 (irq = 3) is a 16550A
----------- следующая часть -----------
Aug  3 16:54:11 pc363 kernel: usbserial.c: USB Serial support registered for Generic
Aug  3 16:54:11 pc363 kernel: usb.c: registered new driver serial
Aug  3 16:54:11 pc363 kernel: usbserial.c: USB Serial Driver core v1.3
Aug  3 16:54:11 pc363 kernel: usbserial.c: USB Serial support registered for PL-2303
Aug  3 16:54:11 pc363 kernel: pl2303.c: v0.5 : Prolific PL2303 USB to serial adaptor driver
Aug  3 16:54:20 pc363 login(pam_unix)[1267]: session opened for user root by LOGIN(uid=0)
Aug  3 16:54:38 pc363 kernel: hub.c: USB new device connect on bus1/1, assigned device number 2
Aug  3 16:54:38 pc363 kernel: usbserial.c: PL-2303 converter detected
Aug  3 16:54:38 pc363 kernel: usbserial.c: PL-2303 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
Aug  3 16:54:53 pc363 kernel: Unable to handle kernel paging request at virtual address 00070000
Aug  3 16:54:53 pc363 kernel:  printing eip:
Aug  3 16:54:53 pc363 kernel: c8aca1e6
Aug  3 16:54:53 pc363 kernel: *pde = 00000000
Aug  3 16:54:53 pc363 kernel: Oops: 0002
Aug  3 16:54:53 pc363 kernel: CPU:    0
Aug  3 16:54:53 pc363 kernel: EIP:    0010:[lockd:nlmsvc_ops_R85a74e54+223066/52418989]
Aug  3 16:54:53 pc363 kernel: EIP:    0010:[<c8aca1e6>]
Aug  3 16:54:53 pc363 kernel: EFLAGS: 00010002
Aug  3 16:54:53 pc363 kernel: eax: 00000fff   ebx: 00000001   ecx: 00000000   edx: 00001000
Aug  3 16:54:53 pc363 kernel: esi: c42e3f0b   edi: 00070000   ebp: c464f740   esp: c42e3eb0
Aug  3 16:54:53 pc363 kernel: ds: 0018   es: 0018   ss: 0018
Aug  3 16:54:53 pc363 kernel: Process testUSB (pid: 1465, stackpage=c42e3000)
Aug  3 16:54:53 pc363 kernel: Stack: c43b701c c43b7000 00000001 c42e3f0b 00000000 c42a7000 00000000 00000286 
Aug  3 16:54:53 pc363 kernel:        c8ac4536 c43b701c 00000000 c42e3f0b 00000001 00000005 c42a7000 00000fff 
Aug  3 16:54:53 pc363 kernel:        c42a7974 c0159106 c42a7000 00000000 c42e3f0b 00000001 0d000001 c01594f0 
Aug  3 16:54:53 pc363 kernel: Call Trace: [tty_default_put_char+30/36] [opost+148/436] [write_chan+353/532] [tty_write+341/448] [write_chan+0/532] 
Aug  3 16:54:53 pc363 kernel: Call Trace: [<c0159106>] [<c01594f0>] [<c015b56d>] [<c0157359>] [<c015b40c>] 
Aug  3 16:54:53 pc363 kernel:    [sys_write+146/200] [system_call+51/64] 
Aug  3 16:54:53 pc363 kernel:    [<c012c87a>] [<c0106e23>] 
Aug  3 16:54:53 pc363 kernel: 
Aug  3 16:54:53 pc363 kernel: Code: a4 89 d8 01 5d 10 03 45 08 25 ff 0f 00 00 89 45 08 01 5c 24 
----------- следующая часть -----------
Aug  3 17:35:20 pc363 kernel: pl2303.c: pl2303_open port 0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0xc0:0x1:0x8484:0x0  1 - 0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x40:0x1:0x404:0x0  0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0xc0:0x1:0x8484:0x0  1 - 0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0xc0:0x1:0x8383:0x0  1 - ff
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0xc0:0x1:0x8484:0x0  1 - 0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x40:0x1:0x404:0x1  0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0xc0:0x1:0x8484:0x0  1 - 0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0xc0:0x1:0x8383:0x0  1 - ff
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x40:0x1:0x0:0x1  0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x40:0x1:0x1:0xc0  0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x40:0x1:0x2:0x4  0
Aug  3 17:35:20 pc363 kernel: pl2303.c: pl2303_set_termios port 0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0xa1:0x21:0:0  7 - 80 25 0 0 0 0 8
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x40:1:0:1  0
Aug  3 17:35:20 pc363 kernel: pl2303.c: Setting CS8
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x21:0x20:0:0  7
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x21:0x22:1:0  0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0x21:0x22:3:0  0
Aug  3 17:35:20 pc363 kernel: pl2303.c: 0xa1:0x21:0:0  7 - 80 25 0 0 0 0 8
Aug  3 17:35:45 pc363 kernel: pl2303.c: pl2303_close port 0


Подробная информация о списке рассылки Devel