Problems mounting file system and booting with DOC

Dave Dillow dave at thedillows.org
Wed Jan 5 14:42:44 EST 2005


On Wed, 2005-01-05 at 14:00, Carlos, John J USAATC wrote:
> Hello All,
> 
>   I will try again and see if I can get some insight as to my problem.

Sorry, got busy with other projects....

I've not got a complete patch at the moment, but in
drivers/mtd/inftlcore.c, you will find the lines:

parity = (nrbits(thisVUC, 16) & 0x1) ? 0x1 : 0;
parity |= (nrbits(prev_block, 16) & 0x1) ? 0x2 : 0;
parity |= (nrbits(anac, 8) & 0x1) ? 0x4 : 0;
parity |= (nrbits(nacs, 8) & 0x1) ? 0x8 : 0;

Those need to be changed to:

parity = (nrbits((thisVUC & 0xff) ^
		(thisVUC >> 8), 8) & 0x1) ? 0x8 : 0;
parity |= (nrbits((prev_block & 0xff) ^
		(prev_block >> 8), 8) & 0x1) ? 0x4 : 0;
parity |= (nrbits(anac, 8) & 0x1) ? 0x2 : 0;
parity |= (nrbits(nacs, 8) & 0x1) ? 0x1 : 0;

I believe this will fix the parity generation problem, and will be a
start to keep the DoC BIOS extension from corrupting your device. There
are other compatibility problems, but I think this is the only one that
will corrupt things.

The Linux INFTL doesn't check the parity (well, it didn't at the time I
looked at this), so no need to change it there.

Using this change should let you boot from the DoC using the BIOS
extensions and lilo or syslinux, but won't affect docboot, AFAIK.
-- 
Dave Dillow <dave at thedillows.org>





More information about the linux-mtd mailing list