It's a bug to look at the device's bits_per_word because each transfer can override these settings. In fact, e.g., spidev cannot specify "global" bits_per_word and instead relies on passing that through every ioctl. This code already did the right thing in orion_spi_setup_transfer, but then failed to access the HW in an appropriate way here in orion_spi_write_read. Tested by 16-bit trnasfers via spidev on an Armada 388 (Solidrun Clearfog). Signed-off-by: Jan Kundrát <jan.kundrat@xxxxxxxxx> --- drivers/spi/spi-orion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index a12ec0814327..5477e7b70902 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -432,7 +432,7 @@ orion_spi_write_read(struct spi_device *spi, struct spi_transfer *xfer) struct orion_spi *orion_spi; int cs = spi->chip_select; - word_len = spi->bits_per_word; + word_len = xfer->bits_per_word; count = xfer->len; orion_spi = spi_master_get_devdata(spi->master); -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html