public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* misc question about MTD
@ 2002-05-10  6:43 Jim Zeus
  2002-05-10  7:23 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Zeus @ 2002-05-10  6:43 UTC (permalink / raw)
  To: all in MTD mailinglist

Hi, folks

when I am reading the code of MTD, I meet some questions :
1.in cfi_probe_chip(cfi_probe.c), what is an 'alias ' of a flash chip? is that the same flash chip mapping in different address?
2.if I send Query command (98h, I mean) twice, would the 'QRY' disappear? and if I send it once, can I read the 'QRY' for several times? (in my deduce , the answer of these two questions should be 'yes')

Thanks

Jim Zeus



_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net  http://www.everyone.net/?btn=tag

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: misc question about MTD
@ 2002-05-14  6:17 Jim Zeus
  2002-05-14  7:40 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Zeus @ 2002-05-14  6:17 UTC (permalink / raw)
  To: zeusj, David  Woodhouse, David  Woodhouse; +Cc: all in MTD mailinglist

Hi,David

  thank you for your explanation, I have got what you said 

>and if _that_ has 'Q' 'R' 'Y' for data you assume
>they're the same chip, otherwise not.

I think its just "assume" , If the Chip A and Chip B got QRY on the same location for data ,they will be still regarded as same chip,  and that's the "FIXME" in your code means,isnt it:)

   I think before mount the flash should be erased automatically ,but  when I mount my flash (the mtd0 and mtdblock0 are all ok), I got the following message:
>jffs_scan_flash(): Did not find even a single chunk of free space. This is BAD!
>jffs_scan_flash(): Leaving...
>jffs_scan_falsh():Free size accounting screwed
>jfffs_scan_flash():free_chunk_size1 == 0x800000, free_chunk_size2 == 0x0, fmc->f
ree_size == 0x0
Why the flash is still dirty?

and when I was reading code of jffs_scan_flash , I meet the "flipping bits", you know , in the if-else phrase to detect flipping bits:
>if((((__u32)(pos - start)) != 0)){
>....
>}else{
>/* "Flipping bits" detected. This means that our scan for them
>   did not catch this offset. See check_partly_erased_sectors() for
>   more info.
>*/
I analysed all the case ,but I think that's impossible to enter the "else" bracket theoretically 
Did I miss something or there is something special for the hardware?

Thanks

Jim Zeus






_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net  http://www.everyone.net/?btn=tag

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: misc question about MTD
@ 2002-05-15 18:34 Jim Zeus
  2002-05-15 18:49 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Zeus @ 2002-05-15 18:34 UTC (permalink / raw)
  To: David Woodhouse, David  Woodhouse; +Cc: all in MTD mailinglist

Hi, David

--- David Woodhouse <dwmw2@infradead.org> wrote:

>Strange. Is the flash completely erased? It should not be erased 
>automatically -- too many people attempt to mount the wrong flash 
>partition, and if you mount the partition that contains your bootloader you 
>will _not_ thank me for auto-erasing it.

Yes, its ok now , I erase the flash before mount it , then its ok:)


>I would strongly recommend you use JFFS2, not JFFS. I haven't looked at JFFS
>code for ages now, and I don't think anyone else is doing so either.

It is the second time you *strongly* recommend me use JFFS2:) 
ok, I tried it just now: I erased the flash, and I mount it(I do all these just like mount JFFS),but I got the message that I have meet before (in the last board I ported):
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020024: 0x2f0c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020028: 0x0001 instead
Further such events for this erase block will not be printed
JFFS2: Erase block at 0x00020000 is not formatted. It will be erased

these messages above are my old friend, and I got some new ones:

Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes

so what does that means? I am losing the confidence to JFFS2 now:(

And when I am debugging the flash, I find something strange,you know, I wrote some debug message when debugging so when I "cp /usr/somefile /dev/mtd0",I got this:
# cp /usr/somefile /dev/mtd0
MTD_open
ZEUS:begin of mtd_open
ZEUS:begin of get_mtd_device
ZEUS:begin of __get_mtd_device
ZEUS:end of __get_mtd_device
ZEUS:end of get_mtd_device
ZEUS:end of mtd_open
MTD_write
ZEUS:begin of mtd_write
ZEUS:begin of cfi_amdstd_write
ZEUS:end of cfi_amdstd_write
ZEUS:end of mtd_write
MTD_close
ZEUS:begin of mtd_close
ZEUS:begin of put_mtd_device
ZEUS:end of put_mtd_device
ZEUS:end of mtd_close

the "begin of" and "end of" message is printed at the begin and end of functions,
when I delete the printk() in cfi_amdstd_write() to prevent the "ZEUS:begin/end of cfi_amdstd_write" to be shown(I just do it, nothing else), I cant accomplish the same thing that I have done before:
# cp /usr/somefile /dev/mtd0
MTD_open
ZEUS:begin of mtd_open
ZEUS:begin of get_mtd_device
ZEUS:begin of __get_mtd_device
ZEUS:end of __get_mtd_device
ZEUS:end of get_mtd_device
ZEUS:end of mtd_open
MTD_write
ZEUS:begin of mtd_write
Last[3] is 9da5, datum is 6246
/dev/mtd0: I/O error
MTD_close
ZEUS:begin of mtd_close
ZEUS:begin of put_mtd_device
ZEUS:end of put_mtd_device
ZEUS:end of mtd_close
#

I know the "Last[3] is 9da5, datum is 6246" message is to tell me that what should be written is wrongly different from what be read from flash,its a sanity check,but why a printk() can affects the Flash write?

Thanks in advance

Jim Zeus


_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net  http://www.everyone.net/?btn=tag

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

end of thread, other threads:[~2002-05-15 18:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-10  6:43 misc question about MTD Jim Zeus
2002-05-10  7:23 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2002-05-14  6:17 Jim Zeus
2002-05-14  7:40 ` David Woodhouse
2002-05-15 18:34 Jim Zeus
2002-05-15 18:49 ` David Woodhouse

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