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, 16 Oct 2018 19:29:21 +0000
From:   Trent Piepho <tpiepho@...inj.com>
To:     "broonie@...nel.org" <broonie@...nel.org>
CC:     "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "phil@...pberrypi.org" <phil@...pberrypi.org>
Subject: Re: [PATCH] spi: Make GPIO CSs honour the SPI_NO_CS flag

On Tue, 2018-10-16 at 10:03 +0100, Mark Brown wrote:
> On Mon, Oct 15, 2018 at 06:34:18PM +0000, Trent Piepho wrote:
> 
> > What about the calls to spi->controller->set_cs() after this? Should a
> > driver provided set_cs method be responsible for checking SPI_NO_CS? 
> > Or should it not be called in the first place?
> 
> This seems like something that should be done entirely in the framework,
> no point in every single driver having to open code the same thing.
> 
> > I imagine it depends on what set_cs needs to do, which might not be
> > solely related to changing the CS line.
> 
> It should be.  If something is hanging other work on set_cs() then it's
> going to break.

IIRC, for spi-dw setting CS is the only way to trigger the master to do
anything.  I think orion is the same way.  Even if you don't want a CS
line the driver still needs to assert one.  Which CS to use as the
dummy CS is a challenge that has come up before.

bcm2835_spi_set_cs() does check SPI_NO_CS, but it still does a lot of
other stuff even if that is set, likely because of the above issue.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ