* Nand flash: hang after erase
@ 2002-01-24 12:13 Elizabeth Clarke
2002-01-24 13:23 ` David Woodhouse
0 siblings, 1 reply; 5+ messages in thread
From: Elizabeth Clarke @ 2002-01-24 12:13 UTC (permalink / raw)
To: linux-mtd
I'm playing with nandtest on an mtd partition, and found it hangs after
it has erased the first block. Putting in some debug I find that it gets
as far as the schedule call in mtdchar.c mtd_ioctl line 324. Here's a
snapshot:
/*
FIXME: Allow INTERRUPTIBLE. Which means
not having the wait_queue head on the stack.
If the wq_head is on the stack, and we
leave because we got interrupted, then the
wq_head is no longer there when the
callback routine tries to wake us up.
*/
ret = mtd->erase(mtd, erase);
if (!ret) {
set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&waitq, &wait);
if (erase->state != MTD_ERASE_DONE &&
erase->state != MTD_ERASE_FAILED)
schedule();
remove_wait_queue(&waitq, &wait);
set_current_state(TASK_RUNNING);
ret = (erase->state == MTD_ERASE_FAILED)?-EIO:0;
}
Since I'm still on the beginning of the learning curve somewhat I have
no idea what this is trying to achieve, or where to go from here. Ideas,
pointers, please?
Ta,
Beth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Nand flash: hang after erase
2002-01-24 12:13 Nand flash: hang after erase Elizabeth Clarke
@ 2002-01-24 13:23 ` David Woodhouse
2002-01-24 13:47 ` Elizabeth Clarke
2002-01-24 19:13 ` Thomas Gleixner
0 siblings, 2 replies; 5+ messages in thread
From: David Woodhouse @ 2002-01-24 13:23 UTC (permalink / raw)
To: Elizabeth Clarke; +Cc: linux-mtd
eclarke@aminocom.com said:
> I'm playing with nandtest on an mtd partition, and found it hangs
> after it has erased the first block. Putting in some debug I find that
> it gets as far as the schedule call in mtdchar.c mtd_ioctl line 324
What is erase->state? If the erase attempt has completed, either
successfully or otherwise, it should be one of the two values which
prevents the call to schedule().
--
dwmw2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Nand flash: hang after erase
2002-01-24 13:23 ` David Woodhouse
@ 2002-01-24 13:47 ` Elizabeth Clarke
2002-01-24 17:35 ` Elizabeth Clarke
2002-01-24 19:13 ` Thomas Gleixner
1 sibling, 1 reply; 5+ messages in thread
From: Elizabeth Clarke @ 2002-01-24 13:47 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
David Woodhouse wrote:
> What is erase->state? If the erase attempt has completed, either
> successfully or otherwise, it should be one of the two values which
> prevents the call to schedule().
erase->state is zero... nand_erase is not setting it appropriately. I
bunged in a line instr->state = MTD_ERASE_DONE; on the way out and now
getting further.
Beth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Nand flash: hang after erase
2002-01-24 13:47 ` Elizabeth Clarke
@ 2002-01-24 17:35 ` Elizabeth Clarke
0 siblings, 0 replies; 5+ messages in thread
From: Elizabeth Clarke @ 2002-01-24 17:35 UTC (permalink / raw)
To: linux-mtd
Elizabeth Clarke wrote:
> erase->state is zero... nand_erase is not setting it appropriately. I
> bunged in a line instr->state = MTD_ERASE_DONE; on the way out and now
> getting further.
hmmm, interesting. Further means as far as noticing nandtest seems to
trash the manufacturers info. Doh, I should have realised that.
And this whilst mounting jffs2:
JFFS2: Erase block at 0x00014000 is not formatted. It will be
erased nand_read_ecc: from = 0x00016000, len =
4096 nand_read_ecc: Failed ECC read,
page 0x000000b1
mtdblock_release
nand_sync: called
ok
mount: Mounting /dev/mtdblock0 on /mnt/jffs2 failed: Invalid argument
Which is where I believe I had a genuine bad block. I thought JFFS2 is
supposed to handle bad blocks? Or have I got the wrong impression...
Beth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Nand flash: hang after erase
2002-01-24 13:23 ` David Woodhouse
2002-01-24 13:47 ` Elizabeth Clarke
@ 2002-01-24 19:13 ` Thomas Gleixner
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2002-01-24 19:13 UTC (permalink / raw)
To: David Woodhouse, Elizabeth Clarke; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]
On Thursday, 24. January 2002 14:23, David Woodhouse wrote:
> eclarke@aminocom.com said:
> > I'm playing with nandtest on an mtd partition, and found it hangs
> > after it has erased the first block. Putting in some debug I find that
> > it gets as far as the schedule call in mtdchar.c mtd_ioctl line 324
>
> What is erase->state? If the erase attempt has completed, either
> successfully or otherwise, it should be one of the two values which
> prevents the call to schedule().
Hi !
I had the same problem some time ago. I sent my patches along with some
rewrite for better support of different hardware to Steven Hill, who
obviously maintains this nand stuff. I never got an answer.
The included diff is against kernel 2.4.17.
The change in nand.c made NAND running. I have implemented JFFS and it works
good (only mount time is a little bit ugly). I will try JFFS2 in the next
weeks.
Thomas
__________________________________________________
Thomas Gleixner, autronix automation GmbH
auf dem berg 3, d-88690 uhldingen-muehlhofen
fon: +49 7556 919891 , fax: +49 7556 919886
mail: gleixner@autronix.de, http: www.autronix.de
Diff following:
[-- Attachment #2: mtd.diff.bz2 --]
[-- Type: application/x-bzip2, Size: 3890 bytes --]
BZh91AY&SYÕ&jÑ\0\x0eà_@0\x7fÿÿÿÿÿßþ¿ÿÿÿ`\x12<\x1cï]÷¶ß`Ü÷Ö÷½z«NÐûí×ÓëÍÕºõÝÚÓîÞÏ®|^ÝÕ(w»Â¥ë®c{a$\x04È'\x11=4\x11=&ÄGêÔhÐdhô\x06I\x10\x13A2*zj~\x1aSÊd=\x03S\x11\x1ah441\x1a\x18M\x01
G©êièÊ^[Põ\0\0\x03M\x1a\x1a\0\0\x03@\x1a\x01&!4ô£\x19Qê{RzG¨ö©å<¦ÔÐ\0= h4\x1a\x01£A\x12$ )í Ojõ5=QèÓSÔa?Tz\r4Ó#Òz\x1a\0\x11$Å4dÓ 0Tü©þ¦¨z¡´§¨ô§¨hõ=@\0Ó@Ê2)\x18 ÓÊ÷ð¨åfg˯,4L6\¥YL\x15¨2öëtd
apA½1EndÈmü¿gë-»\x12êʪª«=M`,8\x14â®"JT\x14Û\faËdß4,²¶ÂûzûgÍëbsê\x1c\x10÷Ĭ^£ô=\x10\x04U*ª½öì¨mkÕ:\x04²\a¡6çµ=Ü*Lv+³\bá ÜÆª\x18\x15PÈU\0B
Àâu°ÆYeÁ
KÕsÆ"ÚîfÌÅ\f|\x06ö]S\x11EUVlüÍxú8ë·\x1d®p¦íù-uý7Ôn²3ËM¯¾.¡\x140´ÔæË1ßgT)%-^\x05ç='¥<I·\x02§k+×ïf¾;ïí|Ô+)ÈÜË7\ròC°ÀÍ.-{V|4zÒ°¶\x1087«\x1f]ï[ ó°H*`
1°[í\x1fI¶P%.êÒµ^Ï`MLºa£½\x18à\x10\Söô3 ù\x02Ë\x1fR×\x0e_=IØ#ÒÆLtºì´d\x05>Ñë¶B¶\L_Ò\x01Èà8_Êf£^=@y$`$0¦Or~GØ'˦¯Òhñ9\x12/¬èó*ý\x05{rWZc}Î!\x16 âêM/<U\x0e10q2^<¦o;ÝÜ[\x17ü¬ø;¯O*p\avÛ{zÓÎ\x1eýÎ& ñÃ\x1dqÍ$ùsöî©ì¸Ñìû'F\v\x03\x03.\x157 \x15©+Îe\x10üog²XüÖfF¸x«1\x17ô8\þÇ¿\x146Æ,_ú)¿p¶ædçfÝzÛ©øgªÛ[mã\x1dIýb\x1eñ\x18\x1dLäÓñ©\x10øà\x0e7¸ö¬8)\x10\f{t>Q.Ò ËS5\rR#Ñ\x04.oUÐ"Í&?¼)Ñ\x19\vg¥a\x10Ñ¿\rWoVv\x10å=\x1f×DTE~sË#Ô
a«\fº `f\x11V·ø*\Þ¨\x066;úÒ\ÊÅÜбk\x17J^[_Xì}ºûÒ7W¯t\x02-7Oª\x18Èìv×ÏìO8\x04H¬÷`?UH0m¬uÙÚýÚ>:Uá2û?\x1a6_´ë¡|-ç?\x0f;3337\x1e-6Ŧ8á1Öì\x05äAÊè«\x13/cY¾]4\x13vn\x01oóóÛ7'µ\x03àÌÍ\x03\x1c\x16²OVÉ\x06õåÂÓi/Z1½Ü\x1a¨TÜC¤ê+^²Üð¬×]îÍG\x03£K>§U"àΧèâc/z\x14dâVhLr,
̲&G¡kö Õ¬û©~\ñÊÅÙK¡äN\\x0f\x141
\b=xÒ\x1c\x15Ï\x15P\v,O0ø=V\x06ë\x04õ>ùõ/;¾÷óá÷\x1dð×GâÁA
\x0fÚå^¡¼YÇ9v\x15\x03½\x1fNS
\x0e\x03ÄN,'|M^\x18za=]Ý¿\x0eÆí\x11®¬ÏàéEB^ÿʺÈÈ^[{Êmr(F\x03OLÏŪ~Ý7\fÌs.±ãÊ4·9òݧE\r.vlvx!õп-ºç³\x03@vñ\x18°a#\bd$R\fb±\bÈÈMÈÐé ? \x021i \x14\x03I\x05¤\x0f&M[µ!âYò\x1düfí~·£~´\x06\x1eÑ>ßuößmO&±ö¹¿\x05®¹ä2Ð\x1e.à\x0fZGëi):\x1014^[\x17d\x14ß°¦%\aH\x1f1Øt\r=\x06?,÷&x9¿(Ò«mµ}¼O´/ËÕ0ÿs\x13Ð\x17fË\x01<\x10O>§¼d)BE6ÎS\x0f\x0f°°ûý<â"""#tÍ:hÂ\vEnè~¯^ÍÕLøm;xa?Nm¨VA³\bâ7aöfÚäÙÃùï\rMËl>tU0qgËÜmÖï˳ëÎΩÎqÙ¢\x1f\x7fCãåB.»\âÌ]\x14°$¨¥6ØQ1/)îå'\x16\x18¬ë¢(\x01üL\x19ä2cÞÃ\x04F3HcU\x01à l\r®i8æÄV/\x06¬/w¸\x14Ó\x01ôA9~ý"Ñ\x1fC=\ba
×ÄXwwOÑ2-\x1c1q\x03¢³ÎÍ\v(«*6FY\x1a§$QQÜ3võOC/"4MUQå{6LñÐu¥5åtÈ®Ûx{\Þ\bmë q0P[\x18í²ÝO1`
\x02È/\x18HçT\x14j©Àî×z÷r ²+\x1eÍ\x7f\v«L½Ý®·LÃÛ^ËGæÄó\a\x15?Câymª¸¢N\0¼_}\x1f(¬Ú;£n).\x16eEG$þö¹\x10eräIÿ>x{b\aìpdpDúÖ¦}seò¡í»ì\x02CzD\x03 >ä\x05\x02«Ø»Þ=w×âáwvh\x13<è¤}j_õ@¶wä
\x14ü$
|(\x05p>Óq Lï2®¨wÙ¢^%èEôf\x19¤<\x0f$
eø
'ã©þà`}@X\x18a©è\x17<¯:LwE\x11\x12(ªØ8V\x05³3Ön\x1diyPª9eËX6\x12/¬N5SÛuäK2ª%æ\x1a×Ô\x15&G\x05]E`y¦\x038YõÏ*S(²\a¤ùh´rÇ Z3BEßã35 GQkSC¤ÅHe`îëëì{ßQBVr^#Ãà\x1aÑUQX:x¸k#Þ»@âr¸^Fä§N\x06ÕÈé1;½+CP4¡¥lòÝ
vÎüóè\fN(¢(¦ÑIi\x1e®þm\x12ÆôS\x12Ä\a\x7f1K;ºÍÖ,\x05ÄTn!ÈD\x13¯Ýµá@\x13¥°Uº4$
\x15áVqHÐur
ÞíH&©'J·XàÑ+Qèb}c<,p\x13³gd\a\x06\x10]ðÐbH¼\x11WÕkµyD4|t
Gd;«Ö©ð\x1dbX\x1c\0M"fÅĺ\x1aÉd ×ZA#ä>$ä;í;}^µÌHÿR\x0eÓºIæ<îSw\vÌè\l7°dé0´BÈg+\x10Ü=¬QÝ\x06ôE\x15Ù~lÎpü\x0fK%À»Ø?N 60Ìby»\\x01¤RDÃóe5çIÀÅÈ3ÕYºH¥{1C"×° 0¹2
ÀÖë<!ýÈé\b\x11C'\x0fÑÕ¬´ußG±KÍ\0ùä°ÖÁ\x13\x1cy) ôÍ\x05rT*ÉÄb\r|ÆAC@\x15<\x0f\x17
®ðuè\x13\aaaý\x15äW},\fyÔÿAÔ%y¶\x01¡>ÆZ ÿ\b
¹ÔÀ¡°{,§[
¥/B\0#+{¾\x0e\fÐ%«âY3Û=¾!¥ôw£Ñ\0zã\x02ÏtàþB+cO{\x0fZÔL\x14%17\x14Ñk\x1fÀðR*]Ó$îä^[Cj7\x13Ò
Y\a¤:B´ò\x0ec@Ê'+EÄ< \0 s¼b\x1a½¡hïFâG\x11²ù±9y
ÊR¸²7ÑQ¢âc²yÁÈ, Å'ÁöF¤{Ø4À£\x154 Ê\x17çï7\x7få1YKÖp
Gp[õ¥ö\x06\x1c\x11]»9}Ñ cжô¸SñéÎy6G칪0C8Ñ\a(1)A¤
ÈepÔºL⬢T+îH\x1e¤\x1ajúÄÓR\x04©\x02öB°ø*@ ;¾]b³A.\x14\f¢]9ÀÄw¶\x05\x12Q\x17P*ë\x7fNìÎTrõif¾5Æ^[\x1dªÀtz\x02)Â}\x18?\Ô\x05DVT \x16\x06BRLxy\x16\x1e\x17\x14P¯EEp×;Ââ#\x11\x15çÁárÕåé@:°B¶lp¶S=y©QG9·)q\x02\x06ùØàdâ/^hS²'u&\x16í0Q\x06@´Ù¦Y\x19T¡ÕiÀ4\f1\x1cA(K!\x10ëH¡\x04³ºX308à\x02NL&Ôø\x1f\vWb^[]~§WI"\x15Ùiï¡=è\x029\x1e5\x13qDñú\x01¸ø1\x104%z@À< ?\0v</\x02¢IxfÞFÂi3£ë'ZåZÞ÷üÝ7f\a'¢;õNEiÄÜqðnz]^[åå¹ÜhbâÅæ\aj\x16~¢^[0(³5Äí-¶Î°É\a§AÄ\f$CBs\x11\x16¬ûr9÷CGêt^[C{ݾ%B\x11ò¹Ro\x01ëm\x16Ó¼\rÌÜÆhù\x1cêÙó{6«wx\f':ro#¾ùT\x02Â\x04ÃnMÄÃÇ\x04s\x16ÇÀ¼]ZF\v:Ü}°ç\føº¸[Æc¬!Ø\x11ÎF\x02Í8}\x03P\\x04ù\x01Ó\\x17ë\x11¥ªÅËsðêõÎâ7ðÉ?h*\x18
è&\Hå2Åf9¹É1\bÔ0¤ÒHL õ±Í{ÇRg4d5YÑCdtTZ\x1aÄCçÖd^[éù\x19Í\bq\x0eV\x1e©¨Ðâ'»/tÃ\0[\v
,\x03¹Yè\x03\x05\x0f(D$\x17jhá)Ðfû\+ÄBØ\x06\x14+0´\x1f\x19÷=\00¸0@ó:oëÅ\x03ר;³\x02\x04C´âö?
ú«a\x15´cÆ\x11÷B'¸¾FTù\a!,¹<g«Eø&Ä;[=3N¾-oß0þ6ý&£\x12HIê:\x0e/\x1d\x13ËPÑAmµ\x05u¼ y \f\x02;¡Ø\x11[\x14M®\x0f\x16\x01xó
\x04<sñ§\aÉX]9
¡t!\x12\rX9&\x1c¬È7$:Ø:\0Y !\x16`Ü\v^[S&|´À̾ûñA²ê¢u\x11`}I¼iÀ,ùyôÂgµS1£pÃ\r¨{N^íîk;:°A`MÂ\x1aaKmîS¢^[¹u\v1¦M½¥4ïÓ7\x02\a
Üñ*`ñ;\x15væRoQyG\x11Ê
õ0+i¹\x1cý\x1aÄñêÈ,^[¡c\x13\x03!\x17í\x040®FÈj\x1a8aµ#zÇQ
\x13\x16~nÄìM)ÛG%¹\x06\x19\x02á*²Fb²:¦\v
\fZ\x1co£\x06 p0aM\aJ+bÓ\vY;$ÞC/yãX\x14øº«òZÛ+O/éð5bm¬;ÒC¦tû¦\x11\x15)*L\x02tÁÅ=á\x15\rg :\a:Ip&Ò@¹`àìLÛ¬÷
\a/ÒQ¤\x13MFU\x0fì\x1e\x11Ëþ]ØõkLæós(ëØW\x18QµàGüèÛ(\x1c4 ×ëg@ô¤Tä>bõòî®÷¹Ó>\aVDHÏ (jÎ\x05½Ù;Ø8Ð'\x02þ*J\0pZÆ\x0eÎlÒp[ viqMK?3¤¦r\x14\x04I\x02Ð#å^\x18\x18Ua\x7fñw$S
\rRf\x10
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-01-24 19:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-24 12:13 Nand flash: hang after erase Elizabeth Clarke
2002-01-24 13:23 ` David Woodhouse
2002-01-24 13:47 ` Elizabeth Clarke
2002-01-24 17:35 ` Elizabeth Clarke
2002-01-24 19:13 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox