diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2008-01-24 14:00:40 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-24 14:06:44 -0800 |
commit | feed9bab7b14b77be8d796bcee95e2343fb82955 (patch) | |
tree | d46191244459c4dd4c5f6e0ad0c832eaa7894af8 /drivers/net/wan | |
parent | dbcc2ec60fe15448e5dfe4153f7347ac82b4da73 (diff) | |
download | op-kernel-dev-feed9bab7b14b77be8d796bcee95e2343fb82955.zip op-kernel-dev-feed9bab7b14b77be8d796bcee95e2343fb82955.tar.gz |
spi: omap2_mcspi PIO RX fix
Before transmission of the last word in PIO RX_ONLY mode rx+tx mode
is enabled:
/* prevent last RX_ONLY read from triggering
* more word i/o: switch to rx+tx
*/
if (c == 0 && tx == NULL)
mcspi_write_cs_reg(spi,
OMAP2_MCSPI_CHCONF0, l);
But because c is decremented after the test, c will never be zero and
rx+tx will not be enabled. This breaks RX_ONLY mode PIO transfers.
Fix it by decrementing c in the beginning of the various I/O loops.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
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>
Diffstat (limited to 'drivers/net/wan')
0 files changed, 0 insertions, 0 deletions