: Serial OOPS fix
PATCH 1/1 : Serial OOPS fix
Sven, please give this patch a try.
These wakeup calls were not only wrong, they were never possibly necessary. Because:
1) If the UART was stopped, any necessary wakups were done by the UART layer.
2) If the circular buffer was emptied, we did the proper wakeup when we emptied the buffer.
And this bogus uart_write_wakeup() call is how we can end up dereferencing a NULL tty pointer via uart_tasklet_action() which is scheduled by uart_write_wakeup().
It seems both the sunsab and sunzilog drivers have this problem. sunsu does the right thing, which is not surprising since it's mostly a duplicate of the 8250 driver which tends to be well tested :-)
drivers/serial/sunsab.c +0 -1
@@ -274,7 +274,6 @@ static void transmit_chars(struct uart_sif (uart_circ_empty (xmit) ||uart_tx_stopped (&up->port)) { up->interrupt_mask1 |=SAB82532_IMR1_XPR ;writeb (up->interrupt_mask1, &up->regs->w.imr1); -uart_write_wakeup (&up->port);return ; }
drivers/serial/sunzilog.c +2 -3
@@ -517,10 +517,9 @@ static void sunzilog_transmit_chars(struif (up->port.info =NULL ) goto ack_tx_int; xmit = &up->port.info->xmit; -if (uart_circ_empty (xmit)) { -uart_write_wakeup (&up->port); +if (uart_circ_empty (xmit)) goto ack_tx_int; - } +if (uart_tx_stopped (&up->port)) goto ack_tx_int;
Um 18:33 Uhr am 10.10.05 schrieb David S. Miller:
Quoted 1 line
Sven, please give this patch a try.
This patch resolves the shutdown problem, at least on my sbus ultra1.
Thanks again.
Grüße,
Sven.
Signature · 2 lines
Sven Hartge -- professioneller Unix-Geek Meine Gedanken im Netz: http://sven.formvision.de/blog/
From: Sven Hartge <[email protected]>
Date: Tue, 11 Oct 2005 21:53:21 +0200 (CEST)
Quoted 7 lines
Um 18:33 Uhr am 10.10.05 schrieb David S. Miller:
Quoted 1 line
Sven, please give this patch a try.
This patch resolves the shutdown problem, at least on my sbus ultra1.
Thanks again.
Thanks for testing Sven.