On Mon, Aug 01, 2005 at 05:01:00PM +0530, Mukund JB. wrote:
> Dear all,
>
> Below are my driver messages logged at initialization time & sfdisk call
> time.
>
> when module is initialized................
>
> TIFM INFO | TI init Routine Invoked!
> ReportMediaModel: ( SD card Details)
> Size = 14 [MB]
> mwCylinders = 450
> mwHeadCount = 2
> mwSectorsPerTrack = 32
Well the 450 cylinders there is right, so why is the driver passing info
down to user space saying the device has 448 cylinders? Somehow you are
loosing 2 cylinders in your driver somewhere.
> When the ioctl is invoked through the "sfdisk -lV /dev/tfa0"
>
> TIFM INFO | <tifm_ioctl> invoked!
> TIFM INFO | dev no. [ 0 ] sock no. [ 0 ]
> TIFM INFO | <GetGeometry_ioctl> geo.cylinders = 450
> TIFM INFO | <GetGeometry_ioctl> geo.heads = 2
> TIFM INFO | <GetGeometry_ioctl> geo.sectors = 32
> TIFM INFO | <GetGeometry_ioctl> geo.start = 0
>
> This means that I am giving the proper details to the user program but
> the sfdisk is printing it wrong (probably manipulation).
>
> And when I try to mount ......
>
> mount /dev/tfa0 /mnt
> FAT: bogus number of reserved sectors
> Mount: you must specify the filesystem type
Well if the partition table/fs size is larger than the device currently
claims to be, the FS will fail and mount will fail. Nothing wrong in
mount, just broken device driver.
> mount -tvfat /dev/tfa0 /mnt
> FAT: bogus number of reserved sectors
> Mount: wrong fs type, bad option, bas superblock on /dev/tfa0,
> or too many mounted file systems
>
> I have gone through the mount.c code in order to understand where I am
> exactly failing.
> mount is failing in guess_fstype_and_mount() in do_mount_syscall after
> issuing the mount sys call.
> I am attaching the source code of mount functionality which may be on
> some help to u in u8ndertaing why exactly its failing.
Perhaps adding more debuging to your driver wherever user space calls in
to get the size of the device, to make sure you have the right
information passed along. Heads and sectors looks fine, but the
cylinder count needs fixing since it is currently reporting 2 less than
it really is. This has to be 100% a problem in the device driver.
Len Sorensen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|