Problems with nftl_format
I have a problem with nftl_format. It give the following output to me.
# doc_loadbios /dev/mtd0 grub_firmware (OK: grub prompt appears at next boot) # nftl_format /dev/mtd0 81920 Phase 1. Checking and erasing Erase Zones from 0x00014000 to 0x01000000 Erasing Zone #10 @ 0x14000 Erasing Zone #11 @ 0x16000 Erasing Zone #12 @ 0x18000 Erasing Zone #13 @ 0x1a000 ... Erasing Zone #2044 @ 0xff8000 Erasing Zone #2045 @ 0xffa000 Erasing Zone #2046 @ 0xffc000 Erasing Zone #2047 @ 0xffe000 Phase 2.a Writing NFTL Media Header and Bad Unit Table Phase 2.b Writing Spare NFTL Media Header and Spare Bad Unit Table Phase 3. Writing Unit Control Information to each Erase Unit MEMWRITEOOB at 14200: Invalid argument MEMWRITEOOB at 16200: Invalid argument MEMWRITEOOB at 18200: Invalid argument MEMWRITEOOB at 1a200: Invalid argument ... MEMWRITEOOB at ff8200: Invalid argument MEMWRITEOOB at ffa200: Invalid argument MEMWRITEOOB at ffc200: Invalid argument MEMWRITEOOB at ffe200: Invalid argument
My configuration is linux 2.4.3, DOC-2000 16MB @d6000, mtd sanpshot 1-mar-2001.
Most recent snapshots give similar errors. What's wrong? Thank for any help.
Fabrizio Pollastri.
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 1 line · [email protected] said:
MEMWRITEOOB at 14200: Invalid argument
OK, I probably broke it when I changed the structures slightly to make sparc64 happy. Can you confirm or deny my suspicion that it broke on the 17th of March?
Does it start to work again if you recompile nftl_format against the new headers?
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to [email protected]
sszie_t and loff_t V.S u_int32_t (Was Re: Problems with nftl_format)
Quoted 11 lines · David Woodhouse
Quoted 1 line · [email protected] said:
MEMWRITEOOB at 14200: Invalid argument
OK, I probably broke it when I changed the structures slightly to make sparc64 happy. Can you confirm or deny my suspicion that it broke on the 17th of March?
Does it start to work again if you recompile
nftl_formatagainst the new headers?
David,
I think the problem should be that you have changed the definition
of struct mtd_oob_buf. In older header file you have:
struct mtd_oob_buf {
loff_t start;
ssize_t length;
unsigned char *ptr;
};and in newer header file:
struct mtd_oob_buf {
loff_t start;
ssize_t length;
unsigned char *ptr;
};But you still use loff_t and ssize_t in mtd_ioctl in mtdchar.c
ret = (mtd->write_oob)(mtd, buf.start, buf.length, &retlen,
databuf);
if (copy_to_user((void *)arg + sizeof(loff_t), &retlen, sizeof(ssize_t))) ret = -EFAULT;
Dose this cause any problem ??
Ollie
To unsubscribe, send "unsubscribe mtd" to [email protected]