diff mbox

sh-sci: update receive error handling for muxed irqs

Message ID 20090703083934.16139.11408.sendpatchset@rx1.opensource.se (mailing list archive)
State Accepted
Headers show

Commit Message

Magnus Damm July 3, 2009, 8:39 a.m. UTC
From: Magnus Damm <damm@igel.co.jp>

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>
---

 drivers/serial/sh-sci.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Paul Mundt July 4, 2009, 3:39 p.m. UTC | #1
On Fri, Jul 03, 2009 at 05:39:34PM +0900, Magnus Damm wrote:
> 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.

On Fri, Jul 03, 2009 at 06:12:46PM +0900, Magnus Damm wrote:
> The sh7724 processor has two on-chip r8a66597 blocks, so add
> it to the list of processors for SUPERH_ON_CHIP_R8A66597.

On Fri, Jul 03, 2009 at 06:40:03PM +0900, Magnus Damm wrote:
> Add USB host support for port CN27 on the Solution Engine 7724
> board. The r8a66597-hcd driver is hooked up as a platform device
> and some registers are configured to enable the USB host function.
> The hardware driving the USB port is the on-chip USB0 block in
> the sh7724 processor configured as USB host controller.

I've added these to my 2.6.31 queue.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 0001/drivers/serial/sh-sci.c
+++ work/drivers/serial/sh-sci.c	2009-07-03 15:16:13.000000000 +0900
@@ -707,12 +707,13 @@  static irqreturn_t sci_br_interrupt(int 
 
 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(i
 	if ((ssr_status & 0x0002) && (scr_status & SCI_CTRL_FLAGS_RIE))
 		ret = sci_rx_interrupt(irq, ptr);
 	/* Error Interrupt */
-	if ((ssr_status & 0x0080) && (scr_status & SCI_CTRL_FLAGS_REIE))
+	if ((ssr_status & 0x0080) && err_enabled)
 		ret = sci_er_interrupt(irq, ptr);
 	/* Break Interrupt */
-	if ((ssr_status & 0x0010) && (scr_status & SCI_CTRL_FLAGS_REIE))
+	if ((ssr_status & 0x0010) && err_enabled)
 		ret = sci_br_interrupt(irq, ptr);
 
 	return ret;