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:	Tue, 10 Jun 2014 10:19:50 +0200
From:	Wolfram Sang <wsa@...-dreams.de>
To:	Max Schwarz <max.schwarz@...ine.de>
Cc:	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>, linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	Heiko Stübner <heiko@...ech.de>,
	Maxime Ripard <maxime.ripard@...e-electrons.com>
Subject: Re: [PATCH v4] i2c: add driver for Rockchip RK3xxx SoC I2C adapter


> > > +	/* Synchronization & notification */
> > > +	spinlock_t lock;
> > 
> > Why the lock? The core has per-adapter locks anyhow.
> 
> I'm using it to lock the rk3x_i2c struct during interrupts. It's needed there 
> because an operation can timeout, which means the interrupt can occur at any 
> time and possibly conflict with the cleanup I do after a timeout.
> 
> I looked around in i2c-exynos5.c, i2c-pxa.c and others, and they do it the 
> same way. Could you explain in more detail why it's not needed?

I saw that you disable IRQs on timeout, so that shouldn't happen? You
don't disable IRQs after a successful transfer, though, AFAICS.

> > It looks to me that you STOP after every message? You should use
> > REPEATED_START inbetween messages and only stop after the last message
> > of a transfer.
> 
> I had a fight with the hw today and finally got it to issue a REPEATED_START 
> for multiple "boring" messages. Will be included in the next version.

Great.

> Actually, I wasn't aware that (len == 0) is a valid case. The hw supports it 
> in both modes, I just tested that. So the check is going away.

Also good!


Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ