From: Adrian Hunter <adrian.hunter@intel.com>
To: Avri Altman <avri.altman@wdc.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-mmc@vger.kernel.org
Cc: Ricky WU <ricky_wu@realtek.com>, Shawn Lin <shawn.lin@rock-chips.com>
Subject: Re: [PATCH v5 3/9] mmc: core: Add open-ended Ext memory addressing
Date: Tue, 3 Sep 2024 07:56:34 +0300 [thread overview]
Message-ID: <8c040805-e3cf-43d3-b806-206c3147052c@intel.com> (raw)
In-Reply-To: <20240827122342.3314173-4-avri.altman@wdc.com>
On 27/08/24 15:23, Avri Altman wrote:
> For open-ended read/write - just send CMD22 before issuing the command.
> While at it, make sure that the rw command arg is properly casting the
> lower 32 bits, as it can be larger now.
>
> Tested-by: Ricky WU <ricky_wu@realtek.com>
> Signed-off-by: Avri Altman <avri.altman@wdc.com>
> ---
> drivers/mmc/core/block.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index 2c9963248fcb..8816b3f0a312 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -180,6 +180,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
> static void mmc_blk_hsq_req_done(struct mmc_request *mrq);
> static int mmc_spi_err_check(struct mmc_card *card);
> static int mmc_blk_busy_cb(void *cb_data, bool *busy);
> +static int mmc_blk_wait_for_idle(struct mmc_queue *mq, struct mmc_host *host);
>
> static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
> {
> @@ -1664,7 +1665,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
>
> brq->mrq.cmd = &brq->cmd;
>
> - brq->cmd.arg = blk_rq_pos(req);
> + brq->cmd.arg = blk_rq_pos(req) & 0xFFFFFFFF;
> if (!mmc_card_blockaddr(card))
> brq->cmd.arg <<= 9;
> brq->cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
> @@ -1712,6 +1713,9 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
> (do_data_tag ? (1 << 29) : 0);
> brq->sbc.flags = MMC_RSP_R1 | MMC_CMD_AC;
> brq->mrq.sbc = &brq->sbc;
> + } else if (mmc_card_ult_capacity(card)) {
> + mmc_blk_wait_for_idle(mq, card->host);
> + mmc_send_ext_addr(card->host, blk_rq_pos(req));
Did you consider having mmc_start_request() send CMD22?
e.g.
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index d6c819dd68ed..22677a01c0e3 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -336,6 +336,9 @@ int mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
{
int err;
+ if (mrq->cmd && mrq->cmd->ext_addr)
+ mmc_send_ext_addr(card->host, mrq->cmd->ext_addr);
+
init_completion(&mrq->cmd_completion);
mmc_retune_hold(host);
> }
> }
>
next prev parent reply other threads:[~2024-09-03 4:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 12:23 [PATCH v5 0/9] Add SDUC Support Avri Altman
2024-08-27 12:23 ` [PATCH v5 1/9] mmc: sd: SDUC Support Recognition Avri Altman
2024-08-27 12:23 ` [PATCH v5 2/9] mmc: sd: Add Extension memory addressing Avri Altman
2024-08-27 12:23 ` [PATCH v5 3/9] mmc: core: Add open-ended Ext " Avri Altman
2024-09-03 4:56 ` Adrian Hunter [this message]
2024-09-03 8:00 ` Avri Altman
2024-09-04 8:51 ` Avri Altman
2024-09-04 9:55 ` Avri Altman
2024-09-04 11:11 ` Adrian Hunter
2024-09-04 11:17 ` Adrian Hunter
2024-08-27 12:23 ` [PATCH v5 4/9] mmc: core: Don't use close-ended rw for SDUC Avri Altman
2024-08-27 12:23 ` [PATCH v5 5/9] mmc: core: Allow mmc erase to carry large addresses Avri Altman
2024-08-27 12:23 ` [PATCH v5 6/9] mmc: core: Add Ext memory addressing for erase Avri Altman
2024-08-27 12:23 ` [PATCH v5 7/9] mmc: core: Adjust ACMD22 to SDUC Avri Altman
2024-08-27 12:23 ` [PATCH v5 8/9] mmc: core: Disable SDUC for mmc_test Avri Altman
2024-08-27 12:23 ` [PATCH v5 9/9] mmc: core: Enable SDUC Avri Altman
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=8c040805-e3cf-43d3-b806-206c3147052c@intel.com \
--to=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ricky_wu@realtek.com \
--cc=shawn.lin@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.