]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
mmc: block: Allow more than 8 partitions per card
authorColin Cross <ccross@android.com>
Thu, 22 Oct 2015 17:00:41 +0000 (10:00 -0700)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 28 Dec 2015 11:51:38 +0000 (12:51 +0100)
commit382c55f88ffeb218c446bf0c46d0fc25d2795fe2
tree4fd2ac9e1260d2c06ddaf8b4b9b91728991e8f50
parent520bd7a8b4152aacfbd34eb7f7a447354b631039
mmc: block: Allow more than 8 partitions per card

It is quite common for Android devices to utilize more
then 8 partitions on internal eMMC storage.

The vanilla kernel can support this via
CONFIG_MMC_BLOCK_MINORS, however that solution caps the
system to 256 minors total, which limits the number of
mmc cards the system can support.

This patch, which has been carried for quite awhile in
the AOSP common tree, provides an alternative solution
that doesn't seem to limit the total card count. So I
wanted to submit it for consideration upstream.

This patch sets the GENHD_FL_EXT_DEVT flag, which will
allocate minor number in major 259 for partitions past
disk->minors.

It also removes the use of disk_devt to determine devidx
from md->disk. md->disk->first_minor is always initialized
from devidx and can always be used to recover it.

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Chuanxiao Dong <chuanxiao.dong@intel.com>
Cc: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Austin S Hemmelgarn <ahferroin7@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Android Kernel Team <kernel-team@android.com>
Cc: linux-mmc@vger.kernel.org
Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Added context to commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/card/block.c