From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754357AbcAVQtB (ORCPT ); Fri, 22 Jan 2016 11:49:01 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33886 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752344AbcAVQs6 (ORCPT ); Fri, 22 Jan 2016 11:48:58 -0500 Subject: Re: [PATCH 4/4] tty: serial: 8250: omap: consume spurious interrupts To: John Ogness , gregkh@linuxfoundation.org, tony@atomide.com, nsekhar@ti.com References: <87si1pq577.fsf@linutronix.de> Cc: vinod.koul@intel.com, dan.j.williams@intel.com, bigeasy@linutronix.de, peter.ujfalusi@ti.com, dmaengine@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org From: Peter Hurley Message-ID: <56A25D77.7090000@hurleysoftware.com> Date: Fri, 22 Jan 2016 08:48:55 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <87si1pq577.fsf@linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On 01/22/2016 02:27 AM, John Ogness wrote: > 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.) Does this fix the spurious irqs referred to by Sekhar in this email chain https://lkml.org/lkml/2015/12/3/442 ? > 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); > >