MTD compiled in the kernel
I'm still having problems compiling MTD into the 2.2 kernel.
The drivers seem to load fine, but when I try to fdisk /dev/nftla, I get "unable to read /dev/nftla". Trying to mount /dev/nftla1 won't work either.
Anybody got any ideas?
One other oddity, is that I get a strange error:
"Changing size of flash from 7ce0 to 7ce0 for geometry reasons" (or something like that, quoting from memory).
David, any ideas?
---------------
Dvir Oren
<[email protected]>
<http://thor.prohosting.com/~dviro>
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 3 lines · [email protected] said:
The drivers seem to load fine, but when I try to fdisk
/dev/nftla, I get "unable to read/dev/nftla". Trying to mount/dev/nftla1won't work either.
Odd. Did it really initialise? Did you see the printk as the kernel booted? What's in /proc/mtd ? Can you post the entire dmesg?
I assume you've included this patch which fixes the initialisation order - register the block device before trying to find partitions on it...
Index: nftl.c
===================================================================
RCS file: /cvs/mtd/kernel/nftl.c,v
retrieving revision 1.9
nftl.c +8 -9
@@ -1129,15 +1129,6 @@#ifdef PRERELEASE printk (KERN_INFO "$Id: nftl.c,v 1.9 1999/10/25 14:55:46 dwmw2 Exp $\n" );#endif -register_mtd_notifier (&nftl_notifier); - -for (i=0 ; i <MAX_MTD_DEVICES ; i++) { - mtd =get_mtd_device (i); - -if (mtd) -NFTL_notify_func (mtd, i); - } -if (register_blkdev (NFTL_MAJOR ,"nftl" , &nftl_fops)){printk ("unable to register NFTL block device\n" );
@@ -1150,6 +1141,14 @@ gendisk_head = &nftl_gendisk; } +register_mtd_notifier (&nftl_notifier); + +for (i=0 ; i <MAX_MTD_DEVICES ; i++) { + mtd =get_mtd_device (i); + +if (mtd) +NFTL_notify_func (mtd, i); + }return 0 ; }
Quoted 3 lines · [email protected] said:
One other oddity, is that I get a strange error: "Changing size of
flash from 7ce0 to 7ce0 for geometry reasons" (or something like that, quoting from memory).
Mea culpa. Try this and it'll tell you the original numbers rather than setting the new value _before_ printing them :)
Can you let me know both figures, and the geometry that's reported in both Linux and DOS/Windows?
Index: nftl.c
===================================================================
RCS file: /cvs/mtd/kernel/nftl.c,v
retrieving revision 1.10
nftl.c +3 -4
@@ -133,11 +133,10 @@if (thisNFTL->nr_sects != thisNFTL->heads * thisNFTL->cylinders * thisNFTL->sectors) {printk ("NFTL capacity reduced for geometry reasons from %lx to %lx sectors\n" , thisNFTL->nr_sects, - thisNFTL->nr_sects = thisNFTL->heads * thisNFTL->cylinders * thisNFTL->sectors); - } - + thisNFTL->heads * thisNFTL->cylinders * thisNFTL->sectors); - + thisNFTL->nr_sects = thisNFTL->heads * thisNFTL->cylinders * thisNFTL->sectors; + } thisNFTL->EUNtable = kmalloc( 2 * thisNFTL->numvunits,
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to [email protected]