[UPDATE] DOCBoot support for NFTL-based DOC2000

Zeri Virgo zerivirgo at infocell-its.com
Mon Apr 4 11:05:41 EDT 2005


Dan Brown wrote:
> Don't even bother trying it with a resized firmware tomorrow :)
Been far too busy, anyway :)

> So is it correct to say that you've just switched from the diskonchip 
> driver which is distributed as part of 2.6.11.5, to the diskonchip 
> driver from the MTD CVS repository?
> 
> If so, then any of the changes between the MTD version in 2.6.11.5 and 
> the current CVS are potentially the problem, not just my latest change 
> to diskonchip.c
Exactly. I didn't feel the need to use latest MTD sources for the
diskonchip driver until your patch. Looks like the problem is in 
nand_base.c.

> The version of diskonchip.c in 2.6.11.5 is 1.45.  I don't see anything 
> in the changes between then and now (1.50) that should cause the 
> behavior you're seeing, which means either the problem is in a different 
> file or I'm just not seeing it :)
The call stack goes from mtd->read into nand_base.c nand_read() then 
nand_do_read_ecc() passing NULL to oob_buf and oob_sel. The pointer 
dereference occurs on oobsel when defining ecc_calc and ecc_code... I 
(nervously) replaced these with hard values and the probing completed 
successfully. I think most of the activity lower down does null checks 
on oobsel or doesn't use these values due to the eccmode.

I have no idea what the fix should be! Maybe move the definitions of 
ecc_calc and ecc_code below the check and set of oobsel to &mtd->oobinfo?

- Zeri




More information about the linux-mtd mailing list