mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: "Mukund JB." <mukundjb@esntechnologies.co.in>
Cc: "linux-os (Dick Johnson)" <linux-os@analogic.com>,
	"Srinivas G." <srinivasg@esntechnologies.co.in>,
	linux-kernel-Mailing-list <linux-kernel@vger.kernel.org>
Subject: Re: Unable to mount the SD card formatted using the DIGITAL CAMREA on Linux box
Date: Tue, 2 Aug 2005 09:42:23 -0400	[thread overview]
Message-ID: <20050802134223.GE31019@csclub.uwaterloo.ca> (raw)
In-Reply-To: <C349E772C72290419567CFD84C26E01704213C@mail.esn.co.in>

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

  parent reply	other threads:[~2005-08-02 13:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-01 11:31 Mukund JB.
2005-08-01 12:08 ` linux-os (Dick Johnson)
2005-08-02 13:42 ` Lennart Sorensen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-08-09 12:11 Mukund JB.
2005-08-08  8:56 Mukund JB.
2005-07-29 17:35 Mukund JB.
2005-07-29 17:43 ` Lennart Sorensen
2005-07-29 18:05 ` linux-os (Dick Johnson)
2005-07-29 18:09   ` linux-os (Dick Johnson)
2005-07-29 11:23 Srinivas G.
2005-07-29 12:02 ` linux-os (Dick Johnson)
2005-07-29 13:37   ` Lennart Sorensen
2005-07-29 13:11 ` Norbert van Nobelen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050802134223.GE31019@csclub.uwaterloo.ca \
    --to=lsorense@csclub.uwaterloo.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=mukundjb@esntechnologies.co.in \
    --cc=srinivasg@esntechnologies.co.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®