aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spi/spi.h
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-12-29 19:48:39 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-30 13:56:42 -0500
commit4b1badf5d9ddfc46ad075ca5bfc465972c85cc7c (patch)
tree36c44e9fce920d0da6f076901b3ed8bcc5305d8c /include/linux/spi/spi.h
parentd6e88e671ac12888df2d533dd4ddef705431a32a (diff)
[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>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r--include/linux/spi/spi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index c8bb68099eb9..176f6e36dbfa 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -289,7 +289,7 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum);
289 * the data being transferred; that may reduce overhead, when the 289 * the data being transferred; that may reduce overhead, when the
290 * underlying driver uses dma. 290 * underlying driver uses dma.
291 * 291 *
292 * If the transmit buffer is null, undefined data will be shifted out 292 * If the transmit buffer is null, zeroes will be shifted out
293 * while filling rx_buf. If the receive buffer is null, the data 293 * while filling rx_buf. If the receive buffer is null, the data
294 * shifted in will be discarded. Only "len" bytes shift out (or in). 294 * shifted in will be discarded. Only "len" bytes shift out (or in).
295 * It's an error to try to shift out a partial word. (For example, by 295 * It's an error to try to shift out a partial word. (For example, by