]> git.baikalelectronics.ru Git - kernel.git/commit
s3cmci: Fix hangup in do_pio_write()
authorYauhen Kharuzhy <jekhor@gmail.com>
Wed, 11 Feb 2009 21:25:52 +0000 (13:25 -0800)
committerPierre Ossman <drzeus@drzeus.cx>
Wed, 18 Feb 2009 19:56:04 +0000 (20:56 +0100)
commit9b749b4fb9c7c5139e67f9fc77fa8ef151c8b519
treee7e90dec7e5d20a362de132313b8e7c1c653e7cc
parentee1b0453f3b20e57db2fc76c9d1bd60d88d71052
s3cmci: Fix hangup in do_pio_write()

This commit fixes the regression what was added by commit
5ca5ab53a0f9e10422c2ae63f31fcf3b08331f40 "s3cmci: Support transfers
which are not multiple of 32 bits."

fifo_free() now returns amount of available space in FIFO buffer in
bytes.  But do_pio_write() writes to FIFO 32-bit words.  Condition for
return from cycle is (fifo_free() == 0), but when fifo has 1..3 bytes
of free space then this condition will never be true and system hangs.

This patch changes condition in the while() to (fifo_free() > 3).

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/host/s3cmci.c