diff mbox series

i3c: master:dw: Fix dw_i3c_master_disable controller by using correct mask

Message ID 9af6e8d204c7d846b727a9a010b79f1df7ecec1e.1551907779.git.vitor.soares@synopsys.com (mailing list archive)
State Mainlined
Commit 907621e94d49b85cd76f13110eceb940a182c69e
Headers show
Series i3c: master:dw: Fix dw_i3c_master_disable controller by using correct mask | expand

Commit Message

Vitor Soares March 6, 2019, 9:57 p.m. UTC
The controller is disable by clear the DEV_CTRL_ENABLE bit rather
than set it. This is fixed by using the correct mask.

Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP")
Signed-off-by: Vitor Soares <vitor.soares@synopsys.com>
---
 drivers/i3c/master/dw-i3c-master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vitor Soares March 27, 2019, 9:37 p.m. UTC | #1
Hi Boris,


On 06/03/19 21:57, Vitor Soares wrote:
> The controller is disable by clear the DEV_CTRL_ENABLE bit rather
> than set it. This is fixed by using the correct mask.
>
> Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP")
> Signed-off-by: Vitor Soares <vitor.soares@synopsys.com>
> ---
>  drivers/i3c/master/dw-i3c-master.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index bb03079..ec385fb 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -300,7 +300,7 @@ to_dw_i3c_master(struct i3c_master_controller *master)
>  
>  static void dw_i3c_master_disable(struct dw_i3c_master *master)
>  {
> -	writel(readl(master->regs + DEVICE_CTRL) & DEV_CTRL_ENABLE,
> +	writel(readl(master->regs + DEVICE_CTRL) & ~DEV_CTRL_ENABLE,
>  	       master->regs + DEVICE_CTRL);
>  }
>  

Friendly ping.


Best regards,
Vitor Soares
Boris Brezillon March 30, 2019, 7:54 a.m. UTC | #2
On Wed, 27 Mar 2019 21:37:59 +0000
vitor <vitor.soares@synopsys.com> wrote:

> Hi Boris,
> 
> 
> On 06/03/19 21:57, Vitor Soares wrote:
> > The controller is disable by clear the DEV_CTRL_ENABLE bit rather

		      ^disabled by clearing

> > than set it. This is fixed by using the correct mask.

	 ^setting


The commit message is not accurate. You were not setting the
DEV_CTRL_ENABLE bit, you were actually masking all other bits and
keeping the DEV_CTRL_ENABLE one unchanged.

> >
> > Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP")

Missing

Cc: <stable@vger.kernel.org>

line.

Can you send a new version with this fixed?

Thanks,

Boris

> > Signed-off-by: Vitor Soares <vitor.soares@synopsys.com>
> > ---
> >  drivers/i3c/master/dw-i3c-master.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> > index bb03079..ec385fb 100644
> > --- a/drivers/i3c/master/dw-i3c-master.c
> > +++ b/drivers/i3c/master/dw-i3c-master.c
> > @@ -300,7 +300,7 @@ to_dw_i3c_master(struct i3c_master_controller *master)
> >  
> >  static void dw_i3c_master_disable(struct dw_i3c_master *master)
> >  {
> > -	writel(readl(master->regs + DEVICE_CTRL) & DEV_CTRL_ENABLE,
> > +	writel(readl(master->regs + DEVICE_CTRL) & ~DEV_CTRL_ENABLE,
> >  	       master->regs + DEVICE_CTRL);
> >  }
> >    
> 
> Friendly ping.
> 
> 
> Best regards,
> Vitor Soares
> 
> _______________________________________________
> linux-i3c mailing list
> linux-i3c@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-i3c
Vitor Soares April 1, 2019, 4:58 p.m. UTC | #3
Hi Boris,

Thanks for your feedback.

On 30/03/19 07:54, Boris Brezillon wrote:
> On Wed, 27 Mar 2019 21:37:59 +0000
> vitor <vitor.soares@synopsys.com> wrote:
>
>> Hi Boris,
>>
>>
>> On 06/03/19 21:57, Vitor Soares wrote:
>>> The controller is disable by clear the DEV_CTRL_ENABLE bit rather
> 		      ^disabled by clearing
>
>>> than set it. This is fixed by using the correct mask.
> 	 ^setting
>
>
> The commit message is not accurate. You were not setting the
> DEV_CTRL_ENABLE bit, you were actually masking all other bits and
> keeping the DEV_CTRL_ENABLE one unchanged.
>
>>> Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP")
> Missing
>
> Cc: <stable@vger.kernel.org>
>
> line.
>
> Can you send a new version with this fixed?
>
> Thanks,
>
> Boris
>

Sure.


Best regards,
Vitor Soares
diff mbox series

Patch

diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index bb03079..ec385fb 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -300,7 +300,7 @@  to_dw_i3c_master(struct i3c_master_controller *master)
 
 static void dw_i3c_master_disable(struct dw_i3c_master *master)
 {
-	writel(readl(master->regs + DEVICE_CTRL) & DEV_CTRL_ENABLE,
+	writel(readl(master->regs + DEVICE_CTRL) & ~DEV_CTRL_ENABLE,
 	       master->regs + DEVICE_CTRL);
 }