From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753179AbcAVK2u (ORCPT ); Fri, 22 Jan 2016 05:28:50 -0500 Received: from www.linutronix.de ([62.245.132.108]:45305 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752819AbcAVK2A (ORCPT ); Fri, 22 Jan 2016 05:28:00 -0500 From: John Ogness To: gregkh@linuxfoundation.org Cc: vinod.koul@intel.com Cc: dan.j.williams@intel.com Cc: peter@hurleysoftware.com Cc: bigeasy@linutronix.de Cc: tony@atomide.com Cc: nsekhar@ti.com Cc: peter.ujfalusi@ti.com Cc: dmaengine@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 4/4] tty: serial: 8250: omap: consume spurious interrupts Date: Fri, 22 Jan 2016 11:27:56 +0100 Message-ID: <87si1pq577.fsf@linutronix.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It has been seen that spurious interrupts are generated when the DMA engine is in use. By disabling timeout interrupts (~IER_RDI) this phenomenon goes away, but this driver relies on the timeout interrupts, so we just consume the spurious interrupts. Since we are consuming spurious interrupts, the irq cannot be shared with other drivers. (It is never really shared anyway.) Signed-off-by: John Ogness --- patch against next-20160122 drivers/tty/serial/8250/8250_omap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index ef7a60b..004b85a 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -630,7 +630,7 @@ static int omap_8250_startup(struct uart_port *port) } #endif - ret = request_irq(port->irq, omap8250_irq, IRQF_SHARED, + ret = request_irq(port->irq, omap8250_irq, 0, dev_name(port->dev), port); if (ret < 0) goto err; @@ -1112,8 +1112,14 @@ static int omap_8250_dma_handle_irq(struct uart_port *port, unsigned int iir) unsigned char status; int dma_err; + /* + * It has been seen that spurious interrupts are generated when the + * DMA engine is in use. By disabling timeout interrupts (~IER_RDI) + * this phenomenon goes away, but this driver relies on the timeout + * interrupts, so we just consume the spurious interrupts. + */ if (iir & UART_IIR_NO_INT) - return 0; + return 1; spin_lock(&port->lock); -- 1.7.10.4