public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Problems with nftl_format
@ 2001-04-09  9:24 Fabrizio Pollastri
  2001-04-09  9:41 ` David Woodhouse
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrizio Pollastri @ 2001-04-09  9:24 UTC (permalink / raw)
  To: mtd

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 majordomo@infradead.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with nftl_format
  2001-04-09  9:24 Problems with nftl_format Fabrizio Pollastri
@ 2001-04-09  9:41 ` David Woodhouse
  2001-04-10  4:21   ` sszie_t and loff_t V.S u_int32_t (Was Re: Problems with nftl_format) Ollie Lho
  0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2001-04-09  9:41 UTC (permalink / raw)
  To: Fabrizio Pollastri; +Cc: mtd


pollastri@iriti.cnr.it 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 majordomo@infradead.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* sszie_t and loff_t V.S u_int32_t (Was Re: Problems with nftl_format)
  2001-04-09  9:41 ` David Woodhouse
@ 2001-04-10  4:21   ` Ollie Lho
  0 siblings, 0 replies; 3+ messages in thread
From: Ollie Lho @ 2001-04-10  4:21 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Fabrizio Pollastri, mtd

David Woodhouse wrote:
> 
> pollastri@iriti.cnr.it 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?
> 

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 majordomo@infradead.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-10  4:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-09  9:24 Problems with nftl_format Fabrizio Pollastri
2001-04-09  9:41 ` David Woodhouse
2001-04-10  4:21   ` sszie_t and loff_t V.S u_int32_t (Was Re: Problems with nftl_format) Ollie Lho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox