* typo in Documentation/devices.txt ?
@ 2012-01-05 7:08 허종만
2012-01-09 8:41 ` Aaron Lu
0 siblings, 1 reply; 2+ messages in thread
From: 허종만 @ 2012-01-05 7:08 UTC (permalink / raw)
To: linux-mmc
Hi, all..
Here is description for MMC block devices in Documentation/devices.txt :
179 block MMC block devices
0 = /dev/mmcblk0 First SD/MMC card
1 = /dev/mmcblk0p1 First partition on first MMC card
8 = /dev/mmcblk1 Second SD/MMC card
^^^^^^^^^^^^^^^^^^
The start of next SD/MMC card can be configured with
CONFIG_MMC_BLOCK_MINORS, or overridden at boot/modprobe
time using the mmcblk.perdev_minors option. That would
bump the offset between each card to be the configured
value instead of the default 8.
Shouldn't "8 = /dev/mmcblk1" be "9 = /dev/mmcblk1" ?
If we have 8 partitions on first MMC card, we need mmcblk0p1 ~ mmcblk0p8 devices, with minor number 1 ~ 8.
Am I misunderstanding?
Regards,
Jongman Heo.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: typo in Documentation/devices.txt ?
2012-01-05 7:08 typo in Documentation/devices.txt ? 허종만
@ 2012-01-09 8:41 ` Aaron Lu
0 siblings, 0 replies; 2+ messages in thread
From: Aaron Lu @ 2012-01-09 8:41 UTC (permalink / raw)
To: 허종만; +Cc: linux-mmc
Hi,
On Thu, Jan 05, 2012 at 07:08:27AM +0000, 허종만 wrote:
>
> Hi, all..
>
> Here is description for MMC block devices in Documentation/devices.txt :
>
> 179 block MMC block devices
> 0 = /dev/mmcblk0 First SD/MMC card
> 1 = /dev/mmcblk0p1 First partition on first MMC card
> 8 = /dev/mmcblk1 Second SD/MMC card
> ^^^^^^^^^^^^^^^^^^
> The start of next SD/MMC card can be configured with
> CONFIG_MMC_BLOCK_MINORS, or overridden at boot/modprobe
> time using the mmcblk.perdev_minors option. That would
> bump the offset between each card to be the configured
> value instead of the default 8.
>
>
> Shouldn't "8 = /dev/mmcblk1" be "9 = /dev/mmcblk1" ?
No, mmcblk1's minor is 8, mmcblk2's minor is 16, etc...
>
> If we have 8 partitions on first MMC card, we need mmcblk0p1 ~ mmcblk0p8 devices, with minor number 1 ~ 8.
> Am I misunderstanding?
Each mmc block device by default has 8 minors, not 8 partitions. Minor 0
represent the whole disk. So each mmc block device at most has 7
partitions instead of 8.
See code in function mmc_blk_alloc_req on assigning minor value to the
whole disk of the block device:
md->disk->first_minor = devidx * perdev_minors;
And code in function blk_alloc_devt on checking partition number against
disk minors:
/* in consecutive minor range? */
if (part->partno < disk->minors) {
*devt = MKDEV(disk->major, disk->first_minor + part->partno);
return 0;
}
-Aaron
>
> Regards,
> Jongman Heo.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-09 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-05 7:08 typo in Documentation/devices.txt ? 허종만
2012-01-09 8:41 ` Aaron Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox