I am testing a new MMC device driver for an embedded target under
2.6.13.x and cannot mount the MMC drive. The symptoms are consistent with the kernel reading sector 0 from the card and treating it as the boot sector, which is actually sector 32. The partition table in sector 0 correctly points to the main partition starting at sector 32. Any ideas on why the kernel apparently thinks sector 0 is the boot sector?When I type:
sh-3.00# mount -t msdos /dev/mmc0 /mnt/mmc
I get the following error report:
FAT: invalid media value (0x01) VFS: Can't find a valid FAT filesystem on dev mmcblk0. mount: Mounting /dev/mmc0 on /mnt/mmc failed: Invalid argument
The first report is from fat_fill_super() in inode.c. The fat_boot_sector structure there contains the following values, which match the corresponding fields in sector 0:
b->sector_size[1:0]: 50 07 b->sec_per_clus: 1f (31) b->fats: bf (191) b->dir_entries[1:0]: 06 00 b->sectors[1:0]: 00 b9 b->media: 01 b->fat_length: a5f2 (42482) b->secs_track: 1dea (7658) b->heads: 0006 (6) b->hidden: 07bebe00 (129940992) b->total_sect: 3c8004b3 (1015022771)
I have confirmed that the only MMC operations performed during the mount are a single block read to address 0 followed by a status check.