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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 21 Apr 2015 12:09:58 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Bert Vermeulen <bert@...t.com>
Cc:	Geert Uytterhoeven <geert@...ux-m68k.org>,
	linux-spi <linux-spi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] spi: rb4xx: Fix set_cs logic.

On Tue, Apr 21, 2015 at 01:01:22PM +0200, Bert Vermeulen wrote:
> On 04/21/2015 11:46 AM, Geert Uytterhoeven wrote:
> > On Mon, Apr 20, 2015 at 10:37 PM, Mark Brown <broonie@...nel.org> wrote:

> >> No, the enable parameter *should* refer to chip select assertion (see
> >> how we handle GPIO chip selects).  However it's possible that this
> >> device has an inverted chip select and should be registered with the
> >> SPI_CS_HIGH flag?

> > It's logic level:

> >  * @set_cs: set the logic level of the chip select line.  May be called
> >  *          from interrupt context.

> Right It's the implementation which doesn't really make sense IMHO: it
> always inverts the "enable" parameter (unless SPI_CS_HIGH is set), in
> keeping with the default active-low.

The default chip select is active low so an enebled chip select is low.

> So the docs are right, but "enable" doesn't match what it does. Chip select
> assertion would be a better API here. Is it worth fixing?

I suspect it's going to cause more breakage than it fixes with people
upstreaming things to change the sense of the paramter betwen kernel
versions - renaming the parameter to be clearer is probably about as
good as it gets.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ