Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r4736 - developers/werner/wlan-spi/patches-tracking
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2008-10-31 02:27:17 +0100 (Fri, 31 Oct 2008)
New Revision: 4736

Added:
   developers/werner/wlan-spi/patches-tracking/fix-mmc-busy-loop-on-bytes.patch
Modified:
   developers/werner/wlan-spi/patches-tracking/series
Log:
fix-mmc-busy-loop-on-bytes.patch: prevent s3cmci from hanging.



Added: 
developers/werner/wlan-spi/patches-tracking/fix-mmc-busy-loop-on-bytes.patch
===================================================================
--- 
developers/werner/wlan-spi/patches-tracking/fix-mmc-busy-loop-on-bytes.patch    
                            (rev 0)
+++ 
developers/werner/wlan-spi/patches-tracking/fix-mmc-busy-loop-on-bytes.patch    
    2008-10-31 01:27:17 UTC (rev 4736)
@@ -0,0 +1,48 @@
+fix-mmc-busy-loop-on-bytes.patch
+
+christer-mmc-byte-alignment.patch reduced the FIFO I/O granularity
+from words to bytes. This also includes the decision when the FIFO
+is empty or full.
+
+However, we sometimes only want to transfer full words, in which
+case do_pio_read/do_pio_write busy-loop until the FIFO has filled
+up or drained enough.
+
+In the case of do_pio_write, this can cause an endless loop if the
+amount of data exceeds the FIFO size, because do_pio_write runs
+before the transfer is initiated, so the FIFO never drains.
+
+Signed-off-by: Werner Almesberger <[EMAIL PROTECTED]>
+
+---
+
+Index: ktrack/drivers/mmc/host/s3cmci.c
+===================================================================
+--- ktrack.orig/drivers/mmc/host/s3cmci.c      2008-10-30 23:07:50.000000000 
-0200
++++ ktrack/drivers/mmc/host/s3cmci.c   2008-10-30 23:08:14.000000000 -0200
+@@ -289,8 +289,11 @@
+                * 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 @@
+                * 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;

Modified: developers/werner/wlan-spi/patches-tracking/series
===================================================================
--- developers/werner/wlan-spi/patches-tracking/series  2008-10-30 23:55:43 UTC 
(rev 4735)
+++ developers/werner/wlan-spi/patches-tracking/series  2008-10-31 01:27:17 UTC 
(rev 4736)
@@ -32,11 +32,12 @@
 # to find out how to unbreak mmc-mci, we revert the recent changes to s3cmci
 # and then apply them one by one, looking for the culprit.
 
-hack-revert-s3cmci.patch
-s3c24xx-cpufreq-driver-mmc.patch
-christer-mmc-byte-alignment.patch
-s3c24xx-mmc-faster-transfer-core.patch
-drivers-s3c24xx-mmc-add-us-to-copyright-header.patch
+#hack-revert-s3cmci.patch
+#s3c24xx-cpufreq-driver-mmc.patch
+#christer-mmc-byte-alignment.patch
+fix-mmc-busy-loop-on-bytes.patch
+#s3c24xx-mmc-faster-transfer-core.patch
+#drivers-s3c24xx-mmc-add-us-to-copyright-header.patch
 
 # dirty experimental stuff follows
 




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to