NFTL not recognizing disk on chip in some cases

David Woodhouse dwmw2 at infradead.org
Thu Jan 30 03:19:56 EST 2003


On 30 Jan 2003, Raphael Hertzog wrote:

> I'm happy to test any patch since I can reproduce the problem here very
> regularly ... :-)

Index: drivers/mtd/nftlmount.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nftlmount.c,v
retrieving revision 1.31
diff -u -p -r1.31 nftlmount.c
--- drivers/mtd/nftlmount.c	15 Nov 2002 16:34:43 -0000	1.31
+++ drivers/mtd/nftlmount.c	30 Jan 2003 08:19:46 -0000
@@ -137,7 +137,11 @@ static int find_boot_record(struct NFTLr
 				printk(KERN_NOTICE "NFTL Media Headers at 0x%x and 0x%x disagree.\n",
 				       nftl->MediaUnit * nftl->EraseSize, block * nftl->EraseSize);
 				/* if (debug) Print both side by side */
-				return -1;
+				if (boot_record_count < 2) {
+					/* We haven't yet seen two real ones */
+					return -1;
+				}
+				continue;
 			}
 			if (boot_record_count == 1)
 				nftl->SpareMediaUnit = block;

-- 
dwmw2






More information about the linux-mtd mailing list