spi: spi_write_then_read() bugfixes
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 13 Apr 2009 21:39:57 +0000 (14:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Apr 2009 22:04:30 +0000 (15:04 -0700)
commitbdff549ebeff92b1a6952e5501caf16a6f8898c8
tree3cebe8c0f7b26433e42832a6feb50fd6e4de75b7
parent0769c2981495c3d05429840d6fc7a1b5e26accaa
spi: spi_write_then_read() bugfixes

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>
Cc: <stable@kernel.org> [2.6.28.x, 2.6.29.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/spi/spi.c