Re: pl2303 regression after v4.17. Bisected to 7041d9c3f01b

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/23/18 10:21 AM, Johan Hovold wrote:
On Fri, Nov 23, 2018 at 04:19:49AM +0100, Florian Zumbiehl wrote:
Can you tell what the physical chip is labeled as, if anything?

First one is Aten UC-232A:
https://www.aten.com/global/en/products/usb-&-thunderbolt/usb-converters/uc232a/

and another is TRENDnet TU-S9:
https://www.trendnet.com/products/proddetail?prod=150_tu-s9

I also just confirmed that my device works fine as console and with a
(busybox) getty running. I can stop and start the flow using stop and
star chars and disabling IXON transmits any buffered chars while
stopped.

Jarkko, does software flow control work if you run a terminal program
instead of a getty?

I don't know since I cannot tune it on from another end (machine is connected to another central lab machine control machine). But plain
"picocom -b 115200 /dev/ttyUSB0" works fine to both directions.

And could you try enabling debugging for pl2303 so we can see what
commands are sent when your getty is started?

This is from serial-getty@ttyUSB0.service disabled during boot and then manually starting it. I left out a few tens of lines during kernel boot. I guess they are same for you and user space seems to trigger only these "pl2303 ttyUSB0: pl2303_set_control_lines - 03" below.

...
[ 3.821071] pl2303 ttyUSB0: pl2303_get_line_request - 80 25 00 00 00 00 00
[    3.821081] pl2303 ttyUSB0: data bits = 8
[    3.821090] pl2303 ttyUSB0: baud requested = 115200
[    3.821100] pl2303 ttyUSB0: baud set = 115200
[    3.821108] pl2303 ttyUSB0: stop bits = 1
[    3.821116] pl2303 ttyUSB0: parity = none
...
[   36.811976] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[   37.095937] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[   37.398983] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[   44.725588] pl2303 ttyUSB0: pl2303_set_control_lines - 03

# systemctl start serial-getty@ttyUSB0.service

[  104.535005] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[  104.536214] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[  104.822756] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[  105.095423] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[ 105.098392] pl2303 ttyUSB0: pl2303_get_line_request - 00 c2 01 00 00 00 08
[  105.098485] pl2303 ttyUSB0: data bits = 8
[  105.098513] pl2303 ttyUSB0: baud requested = 9600
[  105.098541] pl2303 ttyUSB0: baud set = 9600
[  105.098565] pl2303 ttyUSB0: stop bits = 1
[  105.098589] pl2303 ttyUSB0: parity = none
[ 105.099126] pl2303 ttyUSB0: pl2303_set_line_request - 80 25 00 00 00 00 08
[  105.099271] pl2303 1-4.2:1.0: pl2303_vendor_write - [0000] = 00

Requested baud setting looks odd to me. Maybe related to this --keep-baud flag in "/sbin/agetty -o -p -- \u --keep-baud 115200,38400,9600 ttyUSB0 vt220"?

This from another boot but with "picocom -b 115200 /dev/ttyUSB0":

[   35.762964] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[   42.973566] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[   92.464566] pl2303 ttyUSB0: pl2303_set_control_lines - 03
[   92.464985] pl2303 ttyUSB0: pl2303_tiocmget - result = 166
[ 92.465553] pl2303 ttyUSB0: pl2303_get_line_request - 00 c2 01 00 00 00 08
[   92.465591] pl2303 ttyUSB0: data bits = 8
[   92.465602] pl2303 ttyUSB0: baud requested = 115200
[   92.465613] pl2303 ttyUSB0: baud set = 115200
[   92.465623] pl2303 ttyUSB0: stop bits = 1
[   92.465633] pl2303 ttyUSB0: parity = none
[   92.465755] pl2303 1-4.2:1.0: pl2303_vendor_write - [0000] = 00
[   92.466230] pl2303 ttyUSB0: pl2303_tiocmget - result = 166
[   92.466264] pl2303 ttyUSB0: pl2303_tiocmget - result = 166

And what is the output of stty -a -F /dev/ttyUSB0 when the getty has
been started?

Below different outputs from systemd getty service disabled and enabled case and when running just picocom.

1. serial-getty@ttyUSB0.service disabled

speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc

2. serial-getty@ttyUSB0.service enabled

speed 9600 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke -flusho -extproc

3. serial-getty@ttyUSB0.service disabled && picocom -b 115200 /dev/ttyUSB0

speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc

--
Jarkko



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux