From: "Benoît Monin" <benoit.monin@bootlin.com>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>
Cc: "Benoît Monin" <benoit.monin@bootlin.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
"Gregory CLEMENT" <gregory.clement@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: [PATCH v2 4/4] mmc: block: use mmc_card_can_cmd23
Date: Mon, 7 Jul 2025 17:24:36 +0200 [thread overview]
Message-ID: <fadea910693438b256841ba41e5e725172eb5198.1751898225.git.benoit.monin@bootlin.com> (raw)
In-Reply-To: <cover.1751898225.git.benoit.monin@bootlin.com>
Use the helper to test for CMD23 card support. Remove the check on the
NO_CMD23 quirk as it is already done in the helper.
Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
---
drivers/mmc/core/block.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 9cc47bf94804b..f67f5ff97f896 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1768,8 +1768,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
* these, while retaining features like reliable writes.
*/
if ((md->flags & MMC_BLK_CMD23) && mmc_op_multi(brq->cmd.opcode) &&
- (do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) ||
- do_data_tag)) {
+ (do_rel_wr || do_data_tag)) {
brq->sbc.opcode = MMC_SET_BLOCK_COUNT;
brq->sbc.arg = brq->data.blocks |
(do_rel_wr ? (1 << 31) : 0) |
@@ -2618,13 +2617,8 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
*/
md->read_only = mmc_blk_readonly(card);
- if (mmc_host_can_cmd23(card->host)) {
- if ((mmc_card_mmc(card) &&
- card->csd.mmca_vsn >= CSD_SPEC_VER_3) ||
- (mmc_card_sd(card) && !mmc_card_ult_capacity(card) &&
- card->scr.cmds & SD_SCR_CMD23_SUPPORT))
- md->flags |= MMC_BLK_CMD23;
- }
+ if (mmc_host_can_cmd23(card->host) && mmc_card_can_cmd23(card))
+ md->flags |= MMC_BLK_CMD23;
if (md->flags & MMC_BLK_CMD23 &&
((card->ext_csd.rel_param & EXT_CSD_WR_REL_PARAM_EN) ||
prev parent reply other threads:[~2025-07-07 15:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 15:24 [PATCH v2 0/4] mmc: introduce multi-block read gap tuning Benoît Monin
2025-07-07 15:24 ` [PATCH v2 1/4] mmc: core: add mmc_read_blocks to mmc_ops Benoît Monin
2025-07-09 14:46 ` Ulf Hansson
2025-07-10 13:36 ` Benoît Monin
2025-07-15 15:54 ` Ulf Hansson
2025-07-07 15:24 ` [PATCH v2 2/4] mmc: sdhci-cadence: implement multi-block read gap tuning Benoît Monin
2025-07-07 15:24 ` [PATCH v2 3/4] mmc: mmc_test: use mmc_card_can_cmd23 Benoît Monin
2025-07-07 15:24 ` Benoît Monin [this message]
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=fadea910693438b256841ba41e5e725172eb5198.1751898225.git.benoit.monin@bootlin.com \
--to=benoit.monin@bootlin.com \
--cc=adrian.hunter@intel.com \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=tawfik.bayouk@mobileye.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=ulf.hansson@linaro.org \
--cc=vladimir.kondratiev@mobileye.com \
/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
all inboxes | Powered by JetHome®