NFTL not recognizing disk on chip in some cases
Raphael Hertzog
eng at eipm.ch
Thu Jan 30 05:56:26 EST 2003
Am Don, 2003-01-30 um 09.19 schrieb David Woodhouse:
> 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;
Ok. It effectively fixes the problem. It's not very nice since the
notice is still displayed ... but that doesn't matter much.
Thanks for the patch !
Cheers,
--
Raphaël Hertzog - EIPM SA
More information about the linux-mtd
mailing list