Skip to contentSkip to conversation

Broken serial port

DISCUSSION Laurent Vivier 2 participants 3 messages Jun 17, 2014 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

Hi,

I'm not subscribed to these mailing lists, so CC: me.

I'm playing for some days with a kernel 3.15 on an old mac performa 575 and it seems that the serial port is broken. When I log on using the console on the serial port it seems there is an screen refresh added after each character I send.

A little demo :

http://asciinema.org/a/10211 [at 3:20]

I bisect and I found this commit :

commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c

Author: Seth Bollinger <[email protected]>
Date:   Tue Mar 25 12:55:37 2014 -0500

serial_core: Fix conditional start_tx on ring buffer not empty

If the serial_core ring buffer empties just as the tty layer receives an XOFF, then start_tx will never be called when the tty layer receives an XON as the serial_core ring buffer is empty. This will possibly leave a few bytes trapped in the fifo for drivers that disable the transmitter when flow controlled.

If I revert it, all works fine :

http://asciinema.org/a/10212

Regards,
Laurent

#1 lore raw
Quoted 8 lines · Laurent Vivier

Hi,

I'm not subscribed to these mailing lists, so CC: me.

I'm playing for some days with a kernel 3.15 on an old mac performa 575 and it seems that the serial port is broken. When I log on using the console on the serial port it seems there is an screen refresh added after each character I send.

What uart driver is this happening on?

This is a known bug being worked on for these uart drivers:
sunsab
sunzilog
ip22zilog
pmac_zilog

Regards,
Peter Hurley

Quoted 29 lines

A little demo :

http://asciinema.org/a/10211 [at 3:20]

I bisect and I found this commit :

commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c

Author: Seth Bollinger <[email protected]>
Date:   Tue Mar 25 12:55:37 2014 -0500

serial_core: Fix conditional start_tx on ring buffer not empty

If the serial_core ring buffer empties just as the tty layer receives an XOFF, then start_tx will never be called when the tty layer receives an XON as the serial_core ring buffer is empty. This will possibly leave a few bytes trapped in the fifo for drivers that disable the transmitter when flow controlled.

If I revert it, all works fine :

http://asciinema.org/a/10212

Regards,
Laurent

#2 lore raw
Quoted 10 lines · Peter Hurley
Quoted 8 lines · Laurent Vivier

Hi,

I'm not subscribed to these mailing lists, so CC: me.

I'm playing for some days with a kernel 3.15 on an old mac performa 575 and it seems that the serial port is broken. When I log on using the console on the serial port it seems there is an screen refresh added after each character I send.

Quoted 7 lines

What uart driver is this happening on?

This is a known bug being worked on for these uart drivers:
sunsab
sunzilog
ip22zilog
pmac_zilog

Seems to be pmac_zilog, from dmesg :

pmac_zilog: 0.6 (Benjamin Herrenschmidt <[email protected]>) scc.0: ttyS0 at MMIO 0x50f0c022 (irq = 4, base_baud = 230400) is a Z85c30 ESCC -
Serial port
scc.1: ttyS1 at MMIO 0x50f0c020 (irq = 4, base_baud = 230400) is a Z85c30 ESCC -
Serial port

If needed, I can test the fix.

Thank you.

Regards,
Laurent

Quoted 34 lines

Regards,
Peter Hurley

Quoted 30 lines

A little demo :

http://asciinema.org/a/10211 [at 3:20]

I bisect and I found this commit :

commit 717f3bbab3c7628736ef738fdbf3d9a28578c26c

Author: Seth Bollinger <[email protected]>
Date:   Tue Mar 25 12:55:37 2014 -0500

serial_core: Fix conditional start_tx on ring buffer not empty

If the serial_core ring buffer empties just as the tty layer
receives
an XOFF, then start_tx will never be called when the tty layer receives an XON as the serial_core ring buffer is empty. This will possibly leave a few bytes trapped in the fifo for drivers that disable the transmitter when flow controlled.

If I revert it, all works fine :

http://asciinema.org/a/10212

Regards,
Laurent