From patchwork Fri Jul 3 08:39:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 33868 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n638hbjQ002979 for ; Fri, 3 Jul 2009 08:43:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338AbZGCInN (ORCPT ); Fri, 3 Jul 2009 04:43:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752465AbZGCInN (ORCPT ); Fri, 3 Jul 2009 04:43:13 -0400 Received: from rv-out-0506.google.com ([209.85.198.234]:32722 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753338AbZGCInM (ORCPT ); Fri, 3 Jul 2009 04:43:12 -0400 Received: by rv-out-0506.google.com with SMTP id f6so757841rvb.1 for ; Fri, 03 Jul 2009 01:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=NoThnX0ahqTzlU8qf8ilz3QR14knvSMigpq83Nguyvg=; b=XAd/TPagI0dOctc35EdPPCQ1o8rVv1z5wpTAT2utuX8P72y3XkuIg8mpVnlumwva7f qxD34s70HplaZLU0zawWoua8kRxQu/67t7xIgJ4PrXlWQPNIWrMooOTMzmxrt0sgtkOx wjamMIAdgt9rFyAgdipWUrPftqQVf15Uo3kJY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=rO3E9phbJZ0Lzom5PoTwLhVXZlyTysjNeqix6G/KkNgUBktk5WkpzJKWUpW3AcnnLk 6UndfvAT2PbXCQHIgM9UJI56MOPCP9vDDYfWbFsIrFGbgHMwaqAzvB2tV0eS/qXDhrCi 65UvwjTqsJq/WXbqnDYEgPOXMALnKC/JdYUPA= Received: by 10.141.40.20 with SMTP id s20mr198764rvj.213.1246610595597; Fri, 03 Jul 2009 01:43:15 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id g14sm14972534rvb.4.2009.07.03.01.43.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 03 Jul 2009 01:43:14 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Fri, 03 Jul 2009 17:39:34 +0900 Message-Id: <20090703083934.16139.11408.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh-sci: update receive error handling for muxed irqs Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm 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 --- 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 --- 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;