Hi Erwin,
  With your kindly help, I fixed this bug. but, his son showed that:

==============

# ./flash_eraseall -j /dev/mtd2
MTD_open
MTD_ioctl [EMAIL PROTECTED] ` 0`--ph0 �`dopete.MTD_write
Last[0] is 19
Last[1] is 19
Last[2] is 19
Last[0] is 1
Last[1] is 1
Last[2] is 1
Last[2] is 1, datum is 85

./flash_��as�al疽?dev�m柝2@ p`` ph�`d ilure: Input/output error
Erasing 64 Kibyte @ 10000 -- 12 % complete.MTD_write
Last[0] is 19
Last[1] is 19
Last[2] is 19
Last[0] is 1
Last[1] is 1
Last[2] is 1
Last[2] is 1, datum is 85

./flash_er��e��l肄/�ev/�td? [EMAIL PROTECTED]: Input/output error
Erasing 64 Kibyte @ 20000 -- 25 % complete.MTD_write
Last[0] is 19
Last[1] is 19
Last[2] is 19
Last[0] is 1
Last[1] is 1
Last[2] is 1
Last[2] is 1, datum is 85

./flash���a�eal? [EMAIL PROTECTED] failure: Input/output error
Erasing 64 Kibyte @ 30000 -- 37 % complete.MTD_write
Last[0] is 19
Last[1] is 19
Last[2] is 19
Last[0] is 1
Last[1] is 1
Last[2] is 1
Last[2] is 1, datum is 85

./flash_���疽奁l:[EMAIL PROTECTED]:hM�D w`itd ilure: Input/output error
Erasing 64 Kibyte @ 40000 -- 50 % complete.MTD_write
Last[0] is 19
Last[1] is 19
Last[2] is 19
Last[0] is 1
Last[1] is 1
Last[2] is 1
Last[2] is 1, datum is 85

./[EMAIL PROTECTED] prih?`dure: Input/output error
Erasing 64 Kibyte @ 50000 -- 62 % complete.MTD_write
Last[0] is 19
Last[1] is 19
Last[2] is 19
Last[0] is 1
Last[1] is 1
Last[2] is 1
Last[2] is 1, datum is 85

./flash��r�seal疽奁d柝/@tp`:`phD�wr`tdfaiure: Input/output error
Erasing 64 Kibyte @ 60000 -- 75 % complete.MTD_write
Last[0] is 19
Last[1] is 19
Last[2] is 19
Last[0] is 1
Last[1] is 1
Last[2] is 1
Last[2] is 1, datum is 85

./flash_���疽奁�: /[EMAIL PROTECTED]:hMT�`die failure: Input/output error
Erasing 64 Kibyte @ 70000 -- 87 % complete.MTD_write
Last[0] is 19
Last[1] is 19
Last[2] is 19
Last[0] is 1
Last[1] is 1
Last[2] is 1
Last[2] is 1, datum is 85

./flas���酒�e捩l?ev/mtd2: MTD write failure: Input/output error
==============
Did this can spelled that my flash driver(write, read, copy_form/to ) isn't
right?



2007/3/26, Erwin Authried <[EMAIL PROTECTED]>:

Am Montag, den 26.03.2007, 10:54 +0800 schrieb Yue Han:
> Hi Mr. Li,
> I'm using uclinxu-2.4.19 which doesn't has the flash_tools cmd(include
> flash_eraseall mkfs.jffs2 .etc). So I made them out of
> mtd-snapshot-20040730.tar.bz2.
>
> Unfortunately, I got the error what I mentioned before.
>
> In the light of your prompt, I dig into mtdchar.c and
> flash_eraseall.c,
> I used printk to trace the bug and found it DO jump from mtd_ioctl().
>
> I find the function mtd_open() and mtd_ioctl() implemented  like this:
...
>
> So, I pin the problem on  the function mtd_ioctl() 's parameter
> doesn't match.
> But when I check other uclinux-dist who has flash_tools, I saw the
> same implement and call method.
>
> Ohh..I have no clue to fix it again, please give me some hint.
>  Thank you!
>

The ioctcl calls are correct. I think that the problem comes from using
different mtd kernel header files when you build flash_eraseall. Using
an old kernel like 2.4.19 is rather bad, I think there were a lot of
bugs fixed in MTD since.

Regards,
Erwin


_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to