fix-mmc-busy-loop-on-bytes.patch and Fix hangup in do_pio_write() patch
YongLi
sdshliyong at 163.com
Fri Feb 20 03:08:18 CET 2009
Hello All,
I found two patches about the s3cmci.c, can I apply the two patches at the
same time?
which one is better? below is the detailed information about the two patches
one is fix-mmc-busy-loop-on-bytes.patch
http://git.openmoko.org/?p=kernel.git;a=commit;h=fd473b6f6924afa0712a72e1c3db9c3a9600b4e3
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -289,8 +289,11 @@ static void do_pio_read(struct s3cmci_host *host)
* an even multiple of 4. */
if (fifo >= host->pio_bytes)
fifo = host->pio_bytes;
- else
+ else {
fifo -= fifo & 3;
+ if (!fifo)
+ break;
+ }
host->pio_bytes -= fifo;
host->pio_count += fifo;
@@ -362,8 +365,11 @@ static void do_pio_write(struct s3cmci_host *host)
* words, so round down to an even multiple of 4. */
if (fifo >= host->pio_bytes)
fifo = host->pio_bytes;
- else
+ else {
fifo -= fifo & 3;
+ if (!fifo)
+ break;
+ }
host->pio_bytes -= fifo;
host->pio_count += fifo;
The other is [PATCH] s3cmci: Fix hangup in do_pio_write()
http://lkml.indiana.edu/hypermail/linux/kernel/0901.0/00031.html
drivers/mmc/host/s3cmci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index fd6b5b8..9778deb 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -329,7 +329,7 @@ static void do_pio_write(struct s3cmci_host *host)
to_ptr = host->base + host->sdidata;
- while ((fifo = fifo_free(host))) {
+ while ((fifo = fifo_free(host)) > 3) {
if (!host->pio_bytes) {
res = get_data_buffer(host, &host->pio_bytes,
&host->pio_ptr);
More information about the openmoko-kernel
mailing list