public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: How to support partitions in driver?
@ 2005-08-18  7:47 Mukund JB`.
  2005-08-18 19:42 ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Mukund JB`. @ 2005-08-18  7:47 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel-Mailing-list

Dear Russel,

I have a full-fledged driver working with NO problems. It has been
developed long back.
Now the issue here is to add the partitions support to the existing
driver.

I guess it will involve enough amount of work. If NOT, please provide me
the documentation if available, HOW-TO use the MMC layer.

If the requirement was BIG & bulky what you suggested might have been
apt.
If I can solve it in less effort why go for more effort.
I can always integrate it with main-steam kernel letter. This is the
PEAK time & I am required to submit the patch as soon as possible.

Please understand the reason behind it.

I assure you that I will use the kernel MMC & accomplish what u said
within  next month?
But for now how to implement the partition support in the driver will be
very helpfull.

Thanks & Regards,
Mukund Jampala



>> I have few basic queries regarding my partition implementation in my
Sd
>> driver.
>> Sorry for asking such petty things here. But, somehow it's not
working &
>> I am made to ask it here.
>
>Why don't you use the MMC/SD layer already merged into the kernel
>instead of rewriting your own.  Grab a copy of Andrew Morton's
>kernel, and look at the code in drivers/mmc and include/linux/mmc.
>
>There are three host drivers there already.  I'm sure you can work
>out how to interface the existing framework to your device.
>
>And suddenly you can take advantage of the already existing mmc
>block device support, which does support partitions, and does
>manage to get hot swapping block devices more or less correct.
>(and if it doesn't, it'll be one less driver to fix later.)
>
>--
>Russell King
> Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
> maintainer of:  2.6 Serial core

^ permalink raw reply	[flat|nested] 4+ messages in thread
* How to support partitions in driver?
@ 2005-08-18  6:52 Mukund JB`.
  2005-08-18  7:07 ` Russell King
  0 siblings, 1 reply; 4+ messages in thread
From: Mukund JB`. @ 2005-08-18  6:52 UTC (permalink / raw)
  To: linux-kernel-Mailing-list


Dear all,

I have few basic queries regarding my partition implementation in my Sd
driver. 
Sorry for asking such petty things here. But, somehow it's not working &
I am made to ask it here.

I am working on 2.6.10 kernel(x86 architecture).
I have a working SD driver for my multimedia controller.
I have four interfaces for my board.
I call then tfa0, tfa1, tfa2, tfa3 respectively.

I defined then as below...

mknod /dev/tfa0 b 252 0	//device node for first partition of socket 0
mknod /dev/tfa0p1 b 252 1
mknod /dev/tfa0p2 b 252 2
.....
mknod /dev/tfa1 b 252 4	 //device node for first partition of socket 1
....
mknod /dev/tfa2 b 252 8	 //device node for first partition of socket 2
.....
mknod /dev/tfa3 b 252 12 //device node for first partition of socket 3
.....

I implemented the gendisk partition support with the following calls in
the driver.

#define MAX_PARTS 4 // maximum no partitions per device
alloc_disk (4);
gend.first_minor = (SockNo*MAX_PARTS); // SockNo: Current socket card is
// inserted 

Socket 0 & 3 support SD interfaces.
I am able to mount the SD with when inserted in socket 0.
At the same time, I am NOT able to mount the SD when inserted in socket
3. It fails as follows.

mount /dev/tfa3 /mnt 
/dev/tfa3: No such device or address
sfdisk: cannot open /dev/tfa3 for reading.

/proc/Partitions looks ok.
Cat/proc/partitions
252 0 14336 tfa3	// first inserted
252 0 14336 tfa0	 
252 0 14336 tfa2	

The updates to the /proc/partitions are done on and when the card is
inserted into that particular socket.

Can you please update me if I am missing anything that has to be
implemented in the driver apart from the above code?

Why am I not able to mount card in socket 3?

Regards,
Mukund Jampala


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-18 19:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18  7:47 How to support partitions in driver? Mukund JB`.
2005-08-18 19:42 ` Russell King
  -- strict thread matches above, loose matches on Subject: below --
2005-08-18  6:52 Mukund JB`.
2005-08-18  7:07 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox