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]
Message-ID: <20170221190830.xyubgimyc2w5p5v6@sirena.org.uk>
Date:   Tue, 21 Feb 2017 11:08:30 -0800
From:   Mark Brown <broonie@...nel.org>
To:     Adrian Fiergolski <adrian.fiergolski@...n.ch>
Cc:     linux-spi@...r.kernel.org, robh+dt@...nel.org,
        mark.rutland@....com, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, miguel.ojeda.sandonis@...il.com
Subject: Re: [PATCH] spi: Add spi-bits-per-word binding.

On Mon, Feb 20, 2017 at 04:35:12PM +0100, Adrian Fiergolski wrote:
> If an SPI controller doesn't support 8 bit transfers
> (master->bits_per_word_mask), it will be never registered (tested with
> spidev):
> of_register_spi_device calls spi_add_device which calls spi_setup. The last
> takes as an argument spi_device struct, which, in case of spidev, has
> bits_per_word set to 0. Thus, the spi_setup function will set it to default
> 8. Further, the same function will call __spi_validate_bits_per_word which
> will fail the whole registration for controllers not supporting 8 bit
> transfers (i.e. xilinx-spi).

This doens't make much sense, if a device driver requires a given number
of bits per word forcing a different value via device tree is not going
to result in the driver actually working.  If you want to use a device
with a controller with restricted bits per word support you need to
change the device driver to support the limited capabilities of the
controller.

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