From: Wolfgang Denk Date: Thu, 18 Jun 2009 00:11:02 +0200 Subject: [U-Boot] PATCH: bugfix for nand erase failure with bad blocks In-Reply-To: <20090617155421.GB6333@loki.buserror.net> References: <4A3798C4.8000303@valueteam.com> <20090616181035.52228832E416@gemini.denx.de> <4A37F7BF.2090101@valueteam.com> <20090616200940.DD093832E416@gemini.denx.de> <4A37FE47.3030203@freescale.com> <4A3898B5.8060309@valueteam.com> <4A389EE9.1000005@valueteam.com> <20090617155421.GB6333@loki.buserror.net> Message-ID: <20090617221102.20AEC832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Scott, In message <20090617155421.GB6333@loki.buserror.net> you wrote: > > If you want to erase an area but you want to be sure that 'size' bytes > > were erased, you should use: > > > > 'nand erase off size' > > How would the "nand erase" command reliably distinguish between the two alternatives? It cannot. > What we could do is extend the "plus" semantics (which currently allow > rounding the size up to a block boundary) so that if you have a plus sign > before the size it is interpreted the same as read/write. But it's not only with the "plus". I think erase should work similar as write - if we allow write to skip bad blocks and "exceed" thenetto size, then we must do the same for erase. > I'm a little uneasy about changing the normal erase command from size to end > -- it would break existing uses. Though, it would make it consistent with > the NOR erase command. Perhaps a period where it warns but accepts anyway a > size, if the second parameter is less than the first. "if the second parameter is less than the first" ? Sorry, can't parse that. What do you have in mind? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The so-called "desktop metaphor" of today's workstations is instead an "airplane-seat" metaphor. Anyone who has shuffled a lap full of papers while seated between two portly passengers will recognize the difference -- one can see only a very few things at once. - Fred Brooks, Jr.