sh-sci: update receive error handling for muxed irqs

Previous thread: Revert "fb: Initialize fb_info mutexes in framebuffer_alloc()" by Linux Kernel Mailing List on Wednesday, July 8, 2009 - 9:59 am. (1 message)

Next thread: usb: allow sh7724 to enable on-chip r8a66597 by Linux Kernel Mailing List on Wednesday, July 8, 2009 - 9:59 am. (1 message)
From: Linux Kernel Mailing List
Date: Wednesday, July 8, 2009 - 9:59 am

Gitweb:     http://git.kernel.org/linus/44e18e9eda1f5c318a888989d929188eea93c8dc
Commit:     44e18e9eda1f5c318a888989d929188eea93c8dc
Parent:     47220f623c3216ca276bad517ed208ea2ffceaa2
Author:     Magnus Damm <damm@igel.co.jp>
AuthorDate: Fri Jul 3 08:39:34 2009 +0000
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Fri Jul 3 17:45:58 2009 +0900

    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>
---
 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 66f5267..12bd646 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)
 
 static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
 {
-	unsigned short ssr_status, scr_status;
+	unsigned short ssr_status, scr_status, err_enabled;
 	struct uart_port *port = ptr;
 	irqreturn_t ret = IRQ_NONE;
 
 	ssr_status = sci_in(port, SCxSR);
 	scr_status = sci_in(port, SCSCR);
+	err_enabled = scr_status & (SCI_CTRL_FLAGS_REIE | SCI_CTRL_FLAGS_RIE);
 
 	/* Tx Interrupt */
 	if ((ssr_status & 0x0020) && (scr_status & SCI_CTRL_FLAGS_TIE))
@@ -721,10 +722,10 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
 	if ((ssr_status & 0x0002) && (scr_status & SCI_CTRL_FLAGS_RIE))
 		ret = sci_rx_interrupt(irq, ptr);
 	/* Error Interrupt ...
Previous thread: Revert "fb: Initialize fb_info mutexes in framebuffer_alloc()" by Linux Kernel Mailing List on Wednesday, July 8, 2009 - 9:59 am. (1 message)

Next thread: usb: allow sh7724 to enable on-chip r8a66597 by Linux Kernel Mailing List on Wednesday, July 8, 2009 - 9:59 am. (1 message)