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] [day] [month] [year] [list]
Date:	Fri, 23 Dec 2011 16:50:00 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Alok Chauhan <alokc@...dia.com>, Olof Johansson <olof@...om.net>
CC:	"khali@...ux-fr.org" <khali@...ux-fr.org>,
	"ben-linux@...ff.org" <ben-linux@...ff.org>,
	Stephen Warren <swarren@...dia.com>,
	"bones@...retlab.ca" <bones@...retlab.ca>,
	"paul.gortmaker@...driver.com" <paul.gortmaker@...driver.com>,
	"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"dgreid@...gle.com" <dgreid@...gle.com>
Subject: RE: [PATCH] i2c: tegra: Add delay before reset the controller

> -----Original Message-----
> From: Alok Chauhan
> 
> Hi,
> 
> (Adding Laxman Dewangan)
> 
> >This change causes problems systems with some models of i2c TPMs, since the
> first transaction to them will always time out (TPM quirk), and the delay
> means that the tpm will have time to go back to sleep and thus timeout >even
> on the retry. So you'll never make progress.
> Working on this.
> 
> -Alok
> 
> 
> -----Original Message-----
> From: Olof Johansson [mailto:olof@...om.net]
> Sent: Friday, December 23, 2011 2:48 AM
> To: Alok Chauhan
> Cc: khali@...ux-fr.org; ben-linux@...ff.org; Stephen Warren;
> bones@...retlab.ca; paul.gortmaker@...driver.com; linux-i2c@...r.kernel.org;
> linux-kernel@...r.kernel.org; linux-tegra@...r.kernel.org; dgreid@...gle.com
> Subject: Re: [PATCH] i2c: tegra: Add delay before reset the controller
> 
> Hi,
> 
> (Adding linux-tegra and Dylan Reid who was debugging this before)
> 
> On Thu, Dec 22, 2011 at 2:41 AM, Alok Chauhan <alokc@...dia.com> wrote:
> > From: Alok Chauhan <alokc@...dia.com>
> >
> > In NACK error condition, I2C controller violates clock-to-data setup
> > time before stop. In Software, because of this reset of controller is
> > happening before I2C controller could complete STOP condition.
> >
> > Added worst case delay of 1 ms (assuming lowest clock frequency will
> > be 1 KHZ) before reset the controller in case of NACK error.
> 
> This change causes problems systems with some models of i2c TPMs, since the
> first transaction to them will always time out (TPM quirk), and the delay
> means that the tpm will have time to go back to sleep and thus timeout even on
> the retry. So you'll never make progress.
> 
> In other words: this patch will break some systems and thus shouldn't be
> applied.
> 
I think the  delay should be calculated based on speed. So if it is 100KHz, then
delay is 10mcro second for 1 bit. We should wait for 2 bit (ack clock to be complete and
stop pulse to be transmitted).
This patch will make sure that i2c driver will not break the specs i.e. in case of NACK error, the stop
signal should be completed by i2c controller before resetting controller.
I will prefer of having the udelay(2*1000000/speed).

> 
> -Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ