From: Dmitry Osipenko <digetx@gmail.com>
To: "Jens Axboe" <axboe@kernel.dk>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
"David Heidelberg" <david@ixit.cz>,
"Peter Geis" <pgwipeout@gmail.com>,
"Stephen Warren" <swarren@wwwdotorg.org>,
"Nicolas Chauvet" <kwizart@gmail.com>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Adrian Hunter" <adrian.hunter@intel.com>,
"Billy Laws" <blaws05@gmail.com>
Cc: linux-tegra@vger.kernel.org, linux-block@vger.kernel.org,
Andrey Danin <danindrey@mail.ru>,
Gilles Grandou <gilles@grandou.net>,
Ryan Grachek <ryan@edited.us>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 7/8] mmc: block: Enable partition-table scanning for boot partitions
Date: Fri, 6 Mar 2020 05:12:19 +0300 [thread overview]
Message-ID: <20200306021220.22097-8-digetx@gmail.com> (raw)
In-Reply-To: <20200306021220.22097-1-digetx@gmail.com>
Some NVIDIA Tegra devices store partition table on a boot eMMC partition,
and thus, boot partitions need to be scanned. This patch enables scanning
of the boot MMC partitions. Please note that boot partitions will be
scanned-only, i.e. the scanned boot partitions will be kept hidden.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/mmc/core/block.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 2c2bec114fd6..b834c830e19a 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -2410,9 +2410,12 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
md->parent = parent;
set_disk_ro(md->disk, md->read_only || default_ro);
md->disk->flags = GENHD_FL_EXT_DEVT;
+
if (area_type & (MMC_BLK_DATA_AREA_RPMB | MMC_BLK_DATA_AREA_BOOT))
- md->disk->flags |= GENHD_FL_NO_PART_SCAN
- | GENHD_FL_SUPPRESS_PARTITION_INFO;
+ md->disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
+
+ if (area_type & MMC_BLK_DATA_AREA_RPMB)
+ md->disk->flags |= GENHD_FL_NO_PART_SCAN;
/*
* As discussed on lkml, GENHD_FL_REMOVABLE should:
--
2.25.1
next prev parent reply other threads:[~2020-03-06 2:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 2:12 [PATCH v2 0/8] Introduce NVIDIA Tegra Partition Tablex Dmitry Osipenko
2020-03-06 2:12 ` [PATCH v2 1/8] mmc: core: Add raw_boot_mult field to mmc_ext_csd Dmitry Osipenko
2020-03-06 2:12 ` [PATCH v2 2/8] mmc: block: Add mmc_bdev_to_card() helper Dmitry Osipenko
2020-03-06 2:12 ` [PATCH v2 3/8] partitions: Introduce NVIDIA Tegra Partition Table Dmitry Osipenko
2020-03-06 2:22 ` Randy Dunlap
2020-03-06 2:30 ` Dmitry Osipenko
2020-03-08 23:30 ` kbuild test robot
2020-03-06 2:12 ` [PATCH v2 4/8] mmc: block: Add mmc_bdev_to_part_type() helper Dmitry Osipenko
2020-03-06 2:12 ` [PATCH v2 5/8] mmc: block: Add mmc_bdev_to_area_type() helper Dmitry Osipenko
2020-03-06 2:12 ` [PATCH v2 6/8] mmc: block: Add MMC_QUIRK_RESCAN_MAIN_BLKDEV Dmitry Osipenko
2020-03-06 2:12 ` Dmitry Osipenko [this message]
2020-03-06 2:12 ` [PATCH v2 8/8] partitions/tegra: Implement eMMC boot partitions scanning Dmitry Osipenko
2020-03-06 11:00 ` kbuild test robot
2020-03-09 5:56 ` kbuild test robot
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=20200306021220.22097-8-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=axboe@kernel.dk \
--cc=blaws05@gmail.com \
--cc=danindrey@mail.ru \
--cc=david@ixit.cz \
--cc=gilles@grandou.net \
--cc=jonathanh@nvidia.com \
--cc=kwizart@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
--cc=pgwipeout@gmail.com \
--cc=ryan@edited.us \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@linaro.org \
/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).