From: Dmitry Osipenko Subject: [PATCH v2 7/8] mmc: block: Enable partition-table scanning for boot partitions Date: Fri, 6 Mar 2020 05:12:19 +0300 Message-ID: <20200306021220.22097-8-digetx@gmail.com> References: <20200306021220.22097-1-digetx@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20200306021220.22097-1-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Jens Axboe , Thierry Reding , Jonathan Hunter , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , David Heidelberg , Peter Geis , Stephen Warren , Nicolas Chauvet , Ulf Hansson , Adrian Hunter , Billy Laws Cc: linux-tegra@vger.kernel.org, linux-block@vger.kernel.org, Andrey Danin , Gilles Grandou , Ryan Grachek , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-tegra@vger.kernel.org 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 --- 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