Skip to content
Commit 99424488 authored by Yauhen Kharuzhy's avatar Yauhen Kharuzhy Committed by Pierre Ossman
Browse files

s3cmci: Fix hangup in do_pio_write()

This commit fixes the regression what was added by commit
088a78af

 "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: default avatarYauhen Kharuzhy <jekhor@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent 86a6a874
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment