linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: riic: Clear NACK in tend isr
@ 2019-09-25 19:43 Chris Brandt
  2019-09-26  4:54 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Brandt @ 2019-09-25 19:43 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: stable, linux-i2c, linux-renesas-soc, Chris Brandt, Chien Nguyen

The NACKF flag should be cleared in INTRIICNAKI interrupt processing as
description in HW manual.

This issue shows up quickly when PREEMPT_RT is applied and a device is
probed that is not plugged in (like a touchscreen controller). The result
is endless interrupts that halt system boot.

Fixes: 310c18a41450 ("i2c: riic: add driver")
Reported-by: Chien Nguyen <chien.nguyen.eb@rvc.renesas.com>
Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
---
 drivers/i2c/busses/i2c-riic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
index f31413fd9521..800414886f6b 100644
--- a/drivers/i2c/busses/i2c-riic.c
+++ b/drivers/i2c/busses/i2c-riic.c
@@ -202,6 +202,7 @@ static irqreturn_t riic_tend_isr(int irq, void *data)
 	if (readb(riic->base + RIIC_ICSR2) & ICSR2_NACKF) {
 		/* We got a NACKIE */
 		readb(riic->base + RIIC_ICDRR);	/* dummy read */
+		riic_clear_set_bit(riic, ICSR2_NACKF, 0, RIIC_ICSR2);
 		riic->err = -ENXIO;
 	} else if (riic->bytes_left) {
 		return IRQ_NONE;
-- 
2.23.0


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

* Re: [PATCH] i2c: riic: Clear NACK in tend isr
  2019-09-25 19:43 [PATCH] i2c: riic: Clear NACK in tend isr Chris Brandt
@ 2019-09-26  4:54 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-09-26  4:54 UTC (permalink / raw)
  To: Chris Brandt
  Cc: Wolfram Sang, stable, linux-i2c, linux-renesas-soc, Chien Nguyen

On Wed, Sep 25, 2019 at 02:43:27PM -0500, Chris Brandt wrote:
> The NACKF flag should be cleared in INTRIICNAKI interrupt processing as
> description in HW manual.
> 
> This issue shows up quickly when PREEMPT_RT is applied and a device is
> probed that is not plugged in (like a touchscreen controller). The result
> is endless interrupts that halt system boot.
> 
> Fixes: 310c18a41450 ("i2c: riic: add driver")
> Reported-by: Chien Nguyen <chien.nguyen.eb@rvc.renesas.com>
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
> ---
>  drivers/i2c/busses/i2c-riic.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
> index f31413fd9521..800414886f6b 100644
> --- a/drivers/i2c/busses/i2c-riic.c
> +++ b/drivers/i2c/busses/i2c-riic.c
> @@ -202,6 +202,7 @@ static irqreturn_t riic_tend_isr(int irq, void *data)
>  	if (readb(riic->base + RIIC_ICSR2) & ICSR2_NACKF) {
>  		/* We got a NACKIE */
>  		readb(riic->base + RIIC_ICDRR);	/* dummy read */
> +		riic_clear_set_bit(riic, ICSR2_NACKF, 0, RIIC_ICSR2);
>  		riic->err = -ENXIO;
>  	} else if (riic->bytes_left) {
>  		return IRQ_NONE;
> -- 
> 2.23.0
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

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

end of thread, other threads:[~2019-09-26  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 19:43 [PATCH] i2c: riic: Clear NACK in tend isr Chris Brandt
2019-09-26  4:54 ` Greg KH

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