Bug 146663

Summary: pl2303 kernel module doesn't work with 'Aten UC-232A'
Product: Red Hat Enterprise Linux 3 Reporter: Juanjo Villaplana <villapla>
Component: kernelAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: lwang, magnus.olsson, pcormier, peterm, petrides, riel
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2006-0144 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-15 15:50:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 168426    
Attachments:
Description Flags
Candidate #1
none
Additional patch to Candidate #1
none
Candidate #2 - corrected with customer feedback none

Description Juanjo Villaplana 2005-01-31 16:38:20 UTC
Description of problem:

(1) Aten UC-232A USB-serial converter doesn't work properly with
latest RHEL AS3 U4 kernel (pl2303 v0.9 kernel module), rx works but tx
don't.

(2) We also tried the "Redhat 9" source code module (pl2303 v0.91)
supplied by Aten (http://www.aten.com/04-1-tech-download.php?id=619),
and this solved the tx problem, but we found that the converter hungs
when sending a BREAK (Ctrl+A F, from minicom).

(3) Finally we tried to compile the source code module (pl2303 v0.10 +
pl2303.h + usb-serial.h) from kernel 2.4.29 and it seems to work fine. 

(4) It also works on RHEL WS4 Beta kernel 2.6.


Version-Release number of selected component (if applicable):

kernel-smp-2.4.21-27.0.2.EL


How reproducible:

Try to use this usb-serial converter to access a remote serial console
using minicom from a RHEL AS3 U4 box.


Steps to Reproduce:
1.
2.
3.
  
Actual results:

With (1) rx OK, tx fail.

With (2) rx OK, tx OK, BREAK (sysrq) fail.

With (3) and (4) it seems to work properly.


Expected results:

This converter should work like a regular (onboard) serial port.


Additional info:

Comment 1 Pete Zaitcev 2005-03-17 01:29:17 UTC
Created attachment 112066 [details]
Candidate #1

This is a backport from 2.6.11 which ought to address both TX not working
and the break control.

Comment 2 Juanjo Villaplana 2005-03-17 08:40:19 UTC
Hi Pete,

I have tried this patch on standard 2.4.21-27.0.2.EL sources, but the
compilation process ended up with:

--------------------------------------------------------------------------------
pl2303.c: In function `pl2303_set_termios':
pl2303.c:234: warning: `priv' might be used uninitialized in this function
pl2303.c: In function `pl2303_open':
pl2303.c:426: `priv' undeclared (first use in this function)
pl2303.c:426: (Each undeclared identifier is reported only once
pl2303.c:426: for each function it appears in.)
make[3]: *** [pl2303.o] Error 1
make[3]: Leaving directory
`/usr/src/linux-2.4.21-27.0.2.EL.pl2303/drivers/usb/serial'
make[2]: *** [_modsubdir_serial] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.21-27.0.2.EL.pl2303/drivers/usb'
make[1]: *** [_modsubdir_usb] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.21-27.0.2.EL.pl2303/drivers'
make: *** [_mod_drivers] Error 2
--------------------------------------------------------------------------------

Regards,
            Juanjo

Comment 3 Juanjo Villaplana 2005-03-17 12:18:11 UTC
Created attachment 112083 [details]
Additional patch to Candidate #1

Hi Pete,

I have solved the compilation errors with this small patch. With the resulting
module TX and break seems to work fine.

Please tell me if I have to open a new bug, but I have observed that
disconnecting the USB-Serial converter while it is in use (by minicom, for
example) leads to a kernel panic when new data is transferred (pressing a key
in minicom):

--------------------------------------------------------------------------------

devel.si.uji.es login:
Red Hat Enterprise Linux AS release 3 (Taroon Update 4)
Kernel 2.4.21-27.0.2.ELsmp on an i686

devel.si.uji.es login: Unable to handle kernel NULL pointer dereference at
virtual address 00000060
 printing eip:
f897aa17
*pde = 36fee001
*pte = 3b1da067
Oops: 0002
lp parport ide-cd cdrom autofs4 smbus audit acenic e100 ipt_REJECT ipt_LOG
ipt_state ip_conntrack iptable_filter ip_tables floppy sg microcode pl2303
usbseria
CPU:	0
EIP:	0060:[<f897aa17>]    Tainted: P
EFLAGS: 00010286

EIP is at serial_write [usbserial] 0xa7 (2.4.21-27.0.2.ELsmp/i686)
eax: 00000000	ebx: 00000060	ecx: 00000060	edx: 00000000
esi: 00000000	edi: 00000001	ebp: 00000001	esp: f732beb0
ds: 0068   es: 0068   ss: 0068
Process minicom (pid: 6194, stackpage=f732b000)
Stack: 00000000 c0383180 00000292 f732a000 c043b280 00000001 bfff9e40 f732a000
       f6fa5000 c01b6206 f6fa5000 00000001 bfff9e40 00000001 f6fa5974 00000000
       00000000 f732a000 00000000 00000000 00000000 c3573bfc f732a000 c3573980
Call Trace:   [<c01b6206>] write_chan [kernel] 0x1e6 (0xf732bed4)
[<c01b44ad>] do_tty_write [kernel] 0x14d (0xf732bf40)
[<c01b186f>] tty_write [kernel] 0x14f (0xf732bf6c)
[<c01b6020>] write_chan [kernel] 0x0 (0xf732bf70)
[<c0164257>] sys_write [kernel] 0x97 (0xf732bf94)

Code: f0 ff 4e 60 0f 88 dd 25 00 00 80 7e 35 00 74 29 f0 ff 46 60

Kernel panic: Fatal exception
--------------------------------------------------------------------------------


Note that this problem was also observed in setup (3). Also note that the
kernel is Tainted because we use Fujitsu-siemens serverview agents, I can
repeat the test if needed.

Regards,
	   Juanjo

Comment 4 Pete Zaitcev 2005-03-17 19:52:33 UTC
The oops on unplug is a manifestation of bug 132994. Let's not consider
it in the context of this bug.


Comment 5 Pete Zaitcev 2005-03-17 20:05:06 UTC
Created attachment 112106 [details]
Candidate #2 - corrected with customer feedback

Thanks a lot for testing. Most people just wait until I push a test
through the build system, which takes time. So, this is welcome.

Comment 6 Pete Zaitcev 2005-03-22 00:01:04 UTC
A test kernel 2.4.21-31.EL.usbserial.2 is available at
 ftp://people.redhat.com/zaitcev/rhel3usb/


Comment 7 Magnus Olsson 2005-05-09 06:13:30 UTC
I also have problem with this device at RHES4. The first time I try to send 
data with it, it is no problem. But the second time I send, the port opens and 
no more happens. I have to unplug it and start from the beginning.

Comment 8 Pete Zaitcev 2005-05-09 06:35:54 UTC
Magnus, please file a bug. Don't pollute unrelated bugs.


Comment 9 Pete Zaitcev 2006-01-10 06:35:35 UTC
Juanjo, did the usbserial.X work for you?


Comment 10 Juanjo Villaplana 2006-01-12 13:00:52 UTC
Pete, I have tested the tx and BREAK issue on a server running
kernel-smp-2.4.21-31.EL.usbserial.5 and it works fine.

Note that we have upgraded to RHEL4 the server where the Aten UC-232A USB-serial
converter is attached, so we aren't using this kernel (2.4.21-31.EL.usbserial.5)
in our production server.

Comment 13 Ernie Petrides 2006-01-20 23:42:35 UTC
A fix for this problem has just been committed to the RHEL3 U7
patch pool this evening (in kernel version 2.4.21-39.EL).


Comment 21 Red Hat Bugzilla 2006-03-15 15:50:08 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2006-0144.html