r1666 - trunk/src/host/qemu-neo1973/hw

andrew at sita.openmoko.org andrew at sita.openmoko.org
Thu Apr 5 23:41:35 CEST 2007


Author: andrew
Date: 2007-04-05 23:41:34 +0200 (Thu, 05 Apr 2007)
New Revision: 1666

Modified:
   trunk/src/host/qemu-neo1973/hw/nand.c
Log:
Fix a NAND erase block size off-by-one error.


Modified: trunk/src/host/qemu-neo1973/hw/nand.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/nand.c	2007-04-05 21:36:44 UTC (rev 1665)
+++ trunk/src/host/qemu-neo1973/hw/nand.c	2007-04-05 21:41:34 UTC (rev 1666)
@@ -557,7 +557,7 @@
         page = i >> 9;
         if (bdrv_read(s->bdrv, page, iobuf, 1) == -1)
             printf("%s: read error in sector %i\n", __FUNCTION__, page);
-        memset(iobuf, 0xff, addr & 0x1ff);
+        memset(iobuf, 0xff, ((addr - 1) & 0x1ff) + 1);
         if (bdrv_write(s->bdrv, page, iobuf, 1) == -1)
             printf("%s: write error in sector %i\n", __FUNCTION__, page);
     }





More information about the commitlog mailing list