]> err.no Git - linux-2.6/commit
[PATCH] SPI: define null tx_buf to mean "shift out zeroes"
authorDavid Brownell <david-b@pacbell.net>
Sat, 30 Dec 2006 00:48:39 +0000 (16:48 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 30 Dec 2006 18:56:42 +0000 (10:56 -0800)
commit4b1badf5d9ddfc46ad075ca5bfc465972c85cc7c
tree36c44e9fce920d0da6f076901b3ed8bcc5305d8c
parentd6e88e671ac12888df2d533dd4ddef705431a32a
[PATCH] SPI: define null tx_buf to mean "shift out zeroes"

Some issues were recently turned up with the current specification of what
it means for spi_transfer.tx_buf to be null, as part of transfers which are
(from the SPI protocol driver perspective) pure reads.

Specifically, that it seems better to change the TX behaviour there from
"undefined" to "will shift zeroes".  This lets protocol drivers (like the
ads7846 driver) depend on that behavior.  It's what most controller drivers
in the tree are already doing (with one exception and one case of driver
wanting-to-oops), it's what Microwire hardware will necessarily be doing,
and it removes an issue whereby certain security audits would need to
define such a value anyway as part of removing covert channels.

This patch changes the specification to require shifting zeroes, and
updates all currently merged SPI controller drivers to do so.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/spi/spi_mpc83xx.c
drivers/spi/spi_s3c24xx.c
include/linux/spi/spi.h