diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-07-03 04:39:34 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-03 04:45:58 -0400 |
commit | 44e18e9eda1f5c318a888989d929188eea93c8dc (patch) | |
tree | 77036f2d85c5d791a617c04cd8a498d08d2c6185 /drivers | |
parent | 47220f623c3216ca276bad517ed208ea2ffceaa2 (diff) |
sh-sci: update receive error handling for muxed irqs
This patch updates the receive error code for muxed
interrupts in the sh-sci driver.
Receive error interrupts may be generated by the hardware
if RE or REIE bits in SCSCR are set. Update the muxed
interrupt handling code to acknowledge error interrupts
if RE or REIE is set, instead of only acknowledging if
REIE is set.
Without this patch error interrupts may be generated but
never acked resulting in a "nobody cared" crash.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/sh-sci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 66f52674ca0c..12bd64684f12 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -707,12 +707,13 @@ static irqreturn_t sci_br_interrupt(int irq, void *ptr) | |||
707 | 707 | ||
708 | static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) | 708 | static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) |
709 | { | 709 | { |
710 | unsigned short ssr_status, scr_status; | 710 | unsigned short ssr_status, scr_status, err_enabled; |
711 | struct uart_port *port = ptr; | 711 | struct uart_port *port = ptr; |
712 | irqreturn_t ret = IRQ_NONE; | 712 | irqreturn_t ret = IRQ_NONE; |
713 | 713 | ||
714 | ssr_status = sci_in(port, SCxSR); | 714 | ssr_status = sci_in(port, SCxSR); |
715 | scr_status = sci_in(port, SCSCR); | 715 | scr_status = sci_in(port, SCSCR); |
716 | err_enabled = scr_status & (SCI_CTRL_FLAGS_REIE | SCI_CTRL_FLAGS_RIE); | ||
716 | 717 | ||
717 | /* Tx Interrupt */ | 718 | /* Tx Interrupt */ |
718 | if ((ssr_status & 0x0020) && (scr_status & SCI_CTRL_FLAGS_TIE)) | 719 | if ((ssr_status & 0x0020) && (scr_status & SCI_CTRL_FLAGS_TIE)) |
@@ -721,10 +722,10 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) | |||
721 | if ((ssr_status & 0x0002) && (scr_status & SCI_CTRL_FLAGS_RIE)) | 722 | if ((ssr_status & 0x0002) && (scr_status & SCI_CTRL_FLAGS_RIE)) |
722 | ret = sci_rx_interrupt(irq, ptr); | 723 | ret = sci_rx_interrupt(irq, ptr); |
723 | /* Error Interrupt */ | 724 | /* Error Interrupt */ |
724 | if ((ssr_status & 0x0080) && (scr_status & SCI_CTRL_FLAGS_REIE)) | 725 | if ((ssr_status & 0x0080) && err_enabled) |
725 | ret = sci_er_interrupt(irq, ptr); | 726 | ret = sci_er_interrupt(irq, ptr); |
726 | /* Break Interrupt */ | 727 | /* Break Interrupt */ |
727 | if ((ssr_status & 0x0010) && (scr_status & SCI_CTRL_FLAGS_REIE)) | 728 | if ((ssr_status & 0x0010) && err_enabled) |
728 | ret = sci_br_interrupt(irq, ptr); | 729 | ret = sci_br_interrupt(irq, ptr); |
729 | 730 | ||
730 | return ret; | 731 | return ret; |