Problems with cfi_cmdset_0002.c

David Woodhouse dwmw2 at
Mon Feb 12 08:24:22 EST 2001

jonas.holmberg at said:
>      /* Wheee. Bring me the head of someone at AMD. */
>         if (bootloc == 3 && cfi->cfiq->NumEraseRegions > 1) {
>                 printk("Swapping erase regions for broken CFI table\n");

> The expression is false, but the EraseRegionInfo should be swapped. I
> have no solution to that problem. Can you think of one? 

Well, if you can bring me the person at AMD responsible for making the CFI 
table report the erase regions in the wrong order in the first place, I can 
certainly think of a few suggestions. OK, I _know_ the CFI spec doesn't 
explicitly say that the erase regions listed in the CFI tables have to be 
in order - but a modicum of common sense would have helped. 

The 'bootloc == 3' check is supposed to be for devices with the smallest 
erase blocks at the top - "Top Boot" devices. Are your devices "Bottom 
Boot" devices and _still_ have the regions listed backwards? In which case, 
we should probably omit the check for bootloc - they're _all_ backwards. I 
put that in because I assumed they'd at least got it right _somewhere_.

Does anyone else have an AMD bottom-boot device where the CFI table is 
correct and doesn't need swapping? If so, maybe we're going to have to have 
a table listing which device IDs need swapping and which don't. 

Unless someone speaks up fairly quickly, let's assume that _all_ the tables 
are backwards and take out the check for bootloc. If that breaks later, we 
can come up with something better.

jonas.holmberg at said:
> Secondly, the if-statement on line 660:

Yeah. Please commit. 


To unsubscribe, send "unsubscribe mtd" to majordomo at

More information about the linux-mtd mailing list