aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf
diff options
context:
space:
mode:
authorLukas Wunner <[email protected]>2019-07-03 12:29:31 +0200
committerMark Brown <[email protected]>2019-07-24 19:44:59 +0100
commit8d8bef50365847134b51c1ec46786bc2873e4e47 (patch)
tree0399a7bd5c7623fb0f49d7e0b2c99ec0e547f66d /tools/testing/selftests/bpf
parent1274204542f683e1d8491ebe9cc86284d5a8ebcc (diff)
spi: bcm2835: Fix 3-wire mode if DMA is enabled
Commit 6935224da248 ("spi: bcm2835: enable support of 3-wire mode") added 3-wire support to the BCM2835 SPI driver by setting the REN bit (Read Enable) in the CS register when receiving data. The REN bit puts the transmitter in high-impedance state. The driver recognizes that data is to be received by checking whether the rx_buf of a transfer is non-NULL. Commit 3ecd37edaa2a ("spi: bcm2835: enable dma modes for transfers meeting certain conditions") subsequently broke 3-wire support because it set the SPI_MASTER_MUST_RX flag which causes spi_map_msg() to replace rx_buf with a dummy buffer if it is NULL. As a result, rx_buf is *always* non-NULL if DMA is enabled. Reinstate 3-wire support by not only checking whether rx_buf is non-NULL, but also checking that it is not the dummy buffer. Fixes: 3ecd37edaa2a ("spi: bcm2835: enable dma modes for transfers meeting certain conditions") Reported-by: Nuno Sá <[email protected]> Signed-off-by: Lukas Wunner <[email protected]> Cc: [email protected] # v4.2+ Cc: Martin Sperl <[email protected]> Acked-by: Stefan Wahren <[email protected]> Link: https://lore.kernel.org/r/328318841455e505370ef8ecad97b646c033dc8a.1562148527.git.lukas@wunner.de Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf')
0 files changed, 0 insertions, 0 deletions