[4/6] i3c: master: svc: fix check wrong status register in irq handler

Message ID 20231016153232.2851095-5-Frank.Li@nxp.com
State New
Headers
Series i3c: master: svc: collection of bugs fixes |

Commit Message

Frank Li Oct. 16, 2023, 3:32 p.m. UTC
  svc_i3c_master_irq_handler() wrong check register SVC_I3C_MINTMASKED. It
should be SVC_I3C_MSTATUS.

Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
Cc: stable@vger.kernel.org
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/i3c/master/svc-i3c-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Miquel Raynal Oct. 17, 2023, 2:28 p.m. UTC | #1
Hi Frank,

Frank.Li@nxp.com wrote on Mon, 16 Oct 2023 11:32:30 -0400:

> svc_i3c_master_irq_handler() wrong check register SVC_I3C_MINTMASKED. It

				wrongly checks
> should be SVC_I3C_MSTATUS.

Ah right, good catch.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

> 
> Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  drivers/i3c/master/svc-i3c-master.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
> index c252446b2bc5..5ab68d6e439d 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -475,7 +475,7 @@ static void svc_i3c_master_ibi_work(struct work_struct *work)
>  static irqreturn_t svc_i3c_master_irq_handler(int irq, void *dev_id)
>  {
>  	struct svc_i3c_master *master = (struct svc_i3c_master *)dev_id;
> -	u32 active = readl(master->regs + SVC_I3C_MINTMASKED);
> +	u32 active = readl(master->regs + SVC_I3C_MSTATUS);
>  
>  	if (!SVC_I3C_MSTATUS_SLVSTART(active))
>  		return IRQ_NONE;


Thanks,
Miquèl
  

Patch

diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index c252446b2bc5..5ab68d6e439d 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -475,7 +475,7 @@  static void svc_i3c_master_ibi_work(struct work_struct *work)
 static irqreturn_t svc_i3c_master_irq_handler(int irq, void *dev_id)
 {
 	struct svc_i3c_master *master = (struct svc_i3c_master *)dev_id;
-	u32 active = readl(master->regs + SVC_I3C_MINTMASKED);
+	u32 active = readl(master->regs + SVC_I3C_MSTATUS);
 
 	if (!SVC_I3C_MSTATUS_SLVSTART(active))
 		return IRQ_NONE;