cfi_cmdset_0002.c: do_xxlock_oneblock: overflow subtract causing oopsen on iPAQ h1900
Thayne Harbaugh
tharbaugh at lnxi.com
Thu Feb 12 09:24:06 EST 2004
On Wed, 2004-02-11 at 20:59, Joshua Wise wrote:
> > In the end, please fix up the code so that it works for the general
> > case. I'll look at things later and see what I can do to either black
> > list the SST parts or deal with them in a sane way that isn't dangerous
> > and ugly.
> Hrm ... you make it sound like there are different unlock codes for every
> chip! Is there a general case here?
I don't have extensive knowledge about unlocking flash chips. I think,
however, that the SST part is unique in that it has unlock addresses
that are below the array addresses.
> As to dealing with the SST parts, I believe that if there is not another way
> to detect the parts (ie, doing something htat would cause one to reset, but
> not another), you should probably make the user specify what type of part it
> is ... dangerous hacks like having to read/write 4MiB below the address space
> just to unlock does not seem like a good answer for all chips of the sort!
Yes, definitely dangerous - but at the time, there wasn't an unlock
function so I took certain liberties . . ..
Would a change like this be acceptable until I figure out a better way?
- adr = ((adr & ~0xffff) | 0x2) + ~0x3fffff;
+ adr = ((adr & ~0xffff) | 0x2);
--
Thayne Harbaugh
Linux Networx
More information about the linux-mtd
mailing list