diff options
| author | Jurij Smakov <jurij@woodyd.org> | 2004-12-08 05:32:16 -0800 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-12-08 05:32:16 -0800 |
| commit | e8da8a959fe5cf69bfea4b3385e3ee77c4433865 (patch) | |
| tree | ea148aaf623eb90d019399b5deddbcfb26ee4b47 | |
| parent | 13063d94e23e42615e242c0239ed61c1f41dee34 (diff) | |
[SUNSAB]: Fix serial break handling.
We forget to check the BRK condition in
the interrupt status register when deciding
to call receive_chars() or not, which is where
BRK handling occurs.
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/serial/sunsab.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index f489fc1bb923..8caaf2e5e47c 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c @@ -143,6 +143,11 @@ receive_chars(struct uart_sunsab_port *up, writeb(SAB82532_CMDR_RMC, &up->regs->w.cmdr); } + /* Count may be zero for BRK, so we check for it here */ + if ((stat->sreg.isr1 & SAB82532_ISR1_BRK) && + (up->port.line == up->port.cons->index)) + saw_console_brk = 1; + for (i = 0; i < count; i++) { unsigned char ch = buf[i]; @@ -172,8 +177,6 @@ receive_chars(struct uart_sunsab_port *up, stat->sreg.isr0 &= ~(SAB82532_ISR0_PERR | SAB82532_ISR0_FERR); up->port.icount.brk++; - if (up->port.line == up->port.cons->index) - saw_console_brk = 1; /* * We do the SysRQ and SAK checking * here because otherwise the break @@ -325,8 +328,9 @@ static irqreturn_t sunsab_interrupt(int irq, void *dev_id, struct pt_regs *regs) tty = NULL; if (status.stat) { - if (status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME | - SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) + if ((status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME | + SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) || + (status.sreg.isr1 & SAB82532_ISR1_BRK)) tty = receive_chars(up, &status, regs); if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) || (status.sreg.isr1 & SAB82532_ISR1_CSC)) @@ -352,8 +356,10 @@ static irqreturn_t sunsab_interrupt(int irq, void *dev_id, struct pt_regs *regs) tty = NULL; if (status.stat) { - if (status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME | - SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) + if ((status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME | + SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) || + (status.sreg.isr1 & SAB82532_ISR1_BRK)) + tty = receive_chars(up, &status, regs); if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) || (status.sreg.isr1 & (SAB82532_ISR1_BRK | SAB82532_ISR1_CSC))) |
