From: Colin Cross <ccross@android.com>
To: Olof Johansson <olof@lixom.net>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
Lei Wen <adrian.wenl@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Mandeep Baines <msb@chromium.org>,
Colin Cross <ccross@android.com>
Subject: [PATCH] mmc_block: Allow more than 8 partitions per card
Date: Wed, 8 Sep 2010 09:50:37 -0700 [thread overview]
Message-ID: <1283964637-28246-1-git-send-email-ccross@android.com> (raw)
In-Reply-To: <AANLkTinUNpWsu=AY+1EeG8xznPaESL8XnjGo7613yoMt@mail.gmail.com>
Set the GENHD_FL_EXT_DEVT flag, which will allocate minor numbers
in major 259 for partitions past disk->minors.
Also remove 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.
Signed-off-by: Colin Cross <ccross@android.com>
---
drivers/mmc/card/block.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index d545f79..07d8eb0 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -87,11 +87,7 @@ static void mmc_blk_put(struct mmc_blk_data *md)
mutex_lock(&open_lock);
md->usage--;
if (md->usage == 0) {
- int devmaj = MAJOR(disk_devt(md->disk));
- int devidx = MINOR(disk_devt(md->disk)) >> MMC_SHIFT;
-
- if (!devmaj)
- devidx = md->disk->first_minor >> MMC_SHIFT;
+ int devidx = md->disk->first_minor >> MMC_SHIFT;
blk_cleanup_queue(md->queue.queue);
@@ -607,6 +603,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
md->disk->private_data = md;
md->disk->queue = md->queue.queue;
md->disk->driverfs_dev = &card->dev;
+ md->disk->flags = GENHD_FL_EXT_DEVT;
/*
* As discussed on lkml, GENHD_FL_REMOVABLE should:
--
1.7.1
next prev parent reply other threads:[~2010-09-08 16:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 4:13 [PATCH] mmc: make number of mmcblk minors configurable Olof Johansson
2010-08-19 0:16 ` Andrew Morton
2010-08-19 3:22 ` Olof Johansson
2010-08-20 1:02 ` [PATCH v2] mmc: add config and runtime option for number of mmcblk minors Olof Johansson
2010-08-20 22:13 ` [PATCH v3] " Olof Johansson
2010-08-20 22:18 ` sys_init_module system call runcoderen
2010-08-20 22:32 ` Randy Dunlap
2010-08-20 22:50 ` runcoderen
2010-09-08 14:25 ` [PATCH v3] mmc: add config and runtime option for number of mmcblk minors Lei Wen
2010-09-08 14:57 ` Olof Johansson
2010-09-08 15:19 ` Kay Sievers
2010-09-08 15:57 ` Olof Johansson
2010-09-08 16:48 ` Colin Cross
2010-09-08 16:50 ` Colin Cross [this message]
2010-09-09 2:49 ` [PATCH] mmc_block: Allow more than 8 partitions per card Lei Wen
2010-09-09 7:54 ` Adrian Hunter
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=1283964637-28246-1-git-send-email-ccross@android.com \
--to=ccross@android.com \
--cc=adrian.wenl@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=msb@chromium.org \
--cc=olof@lixom.net \
/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;
as well as URLs for NNTP newsgroup(s).