lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 18 May 2024 20:46:12 +0200
From: Peter Korsgaard <peter@...sgaard.com>
To: Grygorii Tertychnyi <grembeter@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,  Thomas Gleixner <tglx@...utronix.de>,
  linux-i2c@...r.kernel.org,  linux-kernel@...r.kernel.org,
  bsp-development.geo@...ca-geosystems.com,  Grygorii Tertychnyi
 <grygorii.tertychnyi@...ca-geosystems.com>
Subject: Re: [PATCH] i2c: ocores: set IACK bit after core is enabled

>>>>> "Grygorii" == Grygorii Tertychnyi <grembeter@...il.com> writes:

 > Setting IACK bit when core is disabled does not clear the "Interrupt Flag"
 > bit in the status register, and the interrupt remains pending.

 > Sometimes it causes failure for the very first message transfer, that is
 > usually a device probe.

 > Hence, set IACK bit after core is enabled to clear pending interrupt.

 > Signed-off-by: Grygorii Tertychnyi <grygorii.tertychnyi@...ca-geosystems.com>

I no longer have access to a device with i2c-ocores, but it sounds
sensible so:

Acked-by: Peter Korsgaard <peter@...sgaard.com>


> ---
 >  drivers/i2c/busses/i2c-ocores.c | 2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
 > index a0af027db04c..a52f8fd4e2fe 100644
 > --- a/drivers/i2c/busses/i2c-ocores.c
 > +++ b/drivers/i2c/busses/i2c-ocores.c
 > @@ -439,8 +439,8 @@ static int ocores_init(struct device *dev, struct ocores_i2c *i2c)
 >  	oc_setreg(i2c, OCI2C_PREHIGH, prescale >> 8);

 >  	/* Init the device */
 > -	oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);
 >  	oc_setreg(i2c, OCI2C_CONTROL, ctrl | OCI2C_CTRL_EN);
 > +	oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);

 >  	return 0;
 >  }
 > --
 > 2.43.0

-- 
Bye, Peter Korsgaard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ