MTD drivers for DoC Millenium Plus

angainor at evo.evopolska.com angainor at evo.evopolska.com
Wed Jun 11 09:13:55 EDT 2003


After delving a little more into the code...

I have managed to cheat a little through the INFTL_mount,
so now I'm back in inftlcode.c/inftl_add_mtd().
Discovered inftl->mbd.size is correct, M-Systems 
driver did discover same size. Next, calculation of
cylinders/heads/sectors fails, but never mind that.
Below is the code that worries me a lot:

	...
        if (add_mtd_blktrans_dev) {
                if (inftl->PUtable)
	...

Guys, really, has nobody even run this code once
to see if it works? add_mtd_blktrans_dev is a function.
It needs arguments. Specifically, it needs to feed on
&inftl->mbd. So this should actually be:

	...
        if (add_mtd_blktrans_dev(&inftl->mdb)) {
                if (inftl->PUtable)
	...

Checking if a pointer to a function is not zero will 
in most cases return true under linux. This COULD NOT 
possibly work, not once. What's more scary, exactly the 
same code is present in nftlcore.c. And that driver must 
have been tested. What's going on? I've checked out CVS today. 
Am I missing something? 

Regards

Marcin




More information about the linux-mtd mailing list