linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: lantiq: add missing interrupt ack
@ 2023-06-02 13:30 Bernhard Seibold
  2023-06-02 14:56 ` Ilpo Järvinen
  0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Seibold @ 2023-06-02 13:30 UTC (permalink / raw)
  To: linux-serial; +Cc: Greg Kroah-Hartman, Bernhard Seibold, stable

Currently, the error interrupt is never acknowledged, so once active it
will stay active indefinitely, causing the handler to be called in an
infinite loop.

Fixes: 2f0fc4159a6a ("SERIAL: Lantiq: Add driver for MIPS Lantiq SOCs.")
Cc: <stable@vger.kernel.org>
Signed-off-by: Bernhard Seibold <mail@bernhard-seibold.de>
---
 drivers/tty/serial/lantiq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index a58e9277dfad..f1387f1024db 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
@@ -250,6 +250,7 @@ lqasc_err_int(int irq, void *_port)
 	struct ltq_uart_port *ltq_port = to_ltq_uart_port(port);
 
 	spin_lock_irqsave(&ltq_port->lock, flags);
+	__raw_writel(ASC_IRNCR_EIR, port->membase + LTQ_ASC_IRNCR);
 	/* clear any pending interrupts */
 	asc_update_bits(0, ASCWHBSTATE_CLRPE | ASCWHBSTATE_CLRFE |
 		ASCWHBSTATE_CLRROE, port->membase + LTQ_ASC_WHBSTATE);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: lantiq: add missing interrupt ack
  2023-06-02 13:30 [PATCH] serial: lantiq: add missing interrupt ack Bernhard Seibold
@ 2023-06-02 14:56 ` Ilpo Järvinen
  2023-06-05 11:06   ` Bernhard Seibold
  0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2023-06-02 14:56 UTC (permalink / raw)
  To: Bernhard Seibold; +Cc: linux-serial, Greg Kroah-Hartman, stable

[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]

On Fri, 2 Jun 2023, Bernhard Seibold wrote:

> Currently, the error interrupt is never acknowledged, so once active it
> will stay active indefinitely, causing the handler to be called in an
> infinite loop.
> 
> Fixes: 2f0fc4159a6a ("SERIAL: Lantiq: Add driver for MIPS Lantiq SOCs.")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Bernhard Seibold <mail@bernhard-seibold.de>
> ---
>  drivers/tty/serial/lantiq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
> index a58e9277dfad..f1387f1024db 100644
> --- a/drivers/tty/serial/lantiq.c
> +++ b/drivers/tty/serial/lantiq.c
> @@ -250,6 +250,7 @@ lqasc_err_int(int irq, void *_port)
>  	struct ltq_uart_port *ltq_port = to_ltq_uart_port(port);
>  
>  	spin_lock_irqsave(&ltq_port->lock, flags);
> +	__raw_writel(ASC_IRNCR_EIR, port->membase + LTQ_ASC_IRNCR);
>  	/* clear any pending interrupts */
>  	asc_update_bits(0, ASCWHBSTATE_CLRPE | ASCWHBSTATE_CLRFE |
>  		ASCWHBSTATE_CLRROE, port->membase + LTQ_ASC_WHBSTATE);

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

This has been there since the beginning, it is a bit odd if nobody has hit 
this before now.

-- 
 i.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: lantiq: add missing interrupt ack
  2023-06-02 14:56 ` Ilpo Järvinen
@ 2023-06-05 11:06   ` Bernhard Seibold
  0 siblings, 0 replies; 3+ messages in thread
From: Bernhard Seibold @ 2023-06-05 11:06 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: linux-serial, Greg Kroah-Hartman, stable


> Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> hat am 02.06.2023 16:56 CEST geschrieben:
> 
>  
> On Fri, 2 Jun 2023, Bernhard Seibold wrote:
> 
> > Currently, the error interrupt is never acknowledged, so once active it
> > will stay active indefinitely, causing the handler to be called in an
> > infinite loop.
> 
> This has been there since the beginning, it is a bit odd if nobody has hit 
> this before now.

Let's just say this might be related to the fact that no end-user product that contains this
peripheral uses the upstream kernel. However this patch does fix a real issue that was
observed on real hardware.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-05 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02 13:30 [PATCH] serial: lantiq: add missing interrupt ack Bernhard Seibold
2023-06-02 14:56 ` Ilpo Järvinen
2023-06-05 11:06   ` Bernhard Seibold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).