spi: spi_write_then_read() bugfixes
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 13 Apr 2009 22:35:03 +0000 (22:35 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 2 May 2009 17:56:50 +0000 (10:56 -0700)
commit2e59b05f014868ffaa019923cc6b4953110d006b
tree083454a7bb456d5b5d64286c8ed57fb4354174d3
parent9d6daefcb03e760fa79c89b41d1078a89d09c999
spi: spi_write_then_read() bugfixes

upstream commit: bdff549ebeff92b1a6952e5501caf16a6f8898c8

The "simplify spi_write_then_read()" patch included two regressions from
the 2.6.27 behaviors:

 - The data it wrote out during the (full duplex) read side
   of the transfer was not zeroed.

 - It fails completely on half duplex hardware, such as
   Microwire and most "3-wire" SPI variants.

So, revert that patch.  A revised version should be submitted at some
point, which can get the speedup on standard hardware (full duplex)
without breaking on less-capable half-duplex stuff.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/spi/spi.c