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:   Fri, 18 Jan 2019 19:12:03 +0000
From:   Mark Brown <broonie@...nel.org>
To:     kernel@...tin.sperl.org
Cc:     Jon Hunter <jonathanh@...dia.com>,
        linux-tegra <linux-tegra@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-spi@...r.kernel.org
Subject: Re: Regression: spi: core: avoid waking pump thread from spi_sync
 instead run teardown delayed

On Fri, Jan 18, 2019 at 06:11:31PM +0100, kernel@...tin.sperl.org wrote:

> Does something like this looks acceptable?

> diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
> index ec210286567c..677fc5025033 100644
> --- a/include/linux/spi/spi.h
> +++ b/include/linux/spi/spi.h
> @@ -288,6 +288,21 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
>  	module_driver(__spi_driver, spi_register_driver, \
>  			spi_unregister_driver)
> 
> +/* define SPI Controller states in the state machine */
> +enum spi_controller_state {
> +	SPI_CONTROLLER_STATE_SHUTDOWN		= 0,
> +	SPI_CONTROLLER_STATE_IDLE		= 1,
> +	SPI_CONTROLLER_STATE_IN_PROCESS		= 2,
> +	SPI_CONTROLLER_STATE_IN_TRANSFER	= 3,
> +};

Yes, it does!

> SPI_CONTROLLER_MODE_EXCLUSIVE could replace the bus_lock_flag.
> I am also not sure of the “convention” of memory mode (i.e
> using mem_ops). Is it maybe implicitly spi_bus_locked - i.e
> typically only a single device?

Yes, it does - we're basically handing over the entire SPI bus to
another bit of hardware that will do memory mapped flash access so we
can't really have anything else trying to do SPI operations at the same
time.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ