linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Jyan Chou <jyanchou@realtek.com>,
	riteshh@codeaurora.org, asutoshd@codeaurora.org
Cc: linux-mmc@vger.kernel.org, james.tai@realtek.com, cy.huang@realtek.com
Subject: Re: [PATCH] mmc: CQHCI: solve DMA boundary limitation of CQHCI driver
Date: Wed, 16 Nov 2022 08:43:10 +0200	[thread overview]
Message-ID: <e3516bcf-5b5c-e81d-b51a-c9637d734886@intel.com> (raw)
In-Reply-To: <20221116020012.19318-1-jyanchou@realtek.com>

On 16/11/22 04:00, Jyan Chou wrote:
> Because CQHCI has its own DMA descriptors, when using DMA,
> if the DMA addr or buffer size has limitaion, we need to add an
> option to set up tran_desc.

Thanks for the patch, however we always require that features must
be used to be included in the kernel i.e. the patch with driver
changes that implements the ->setup_tran_desc() callback must
also be submitted.

> 
> Signed-off-by: Jyan Chou <jyanchou@realtek.com>
> ---
>  drivers/mmc/host/cqhci-core.c | 5 +++++
>  drivers/mmc/host/cqhci.h      | 2 ++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c
> index b3d7d6d8d654..4d6fb228a21e 100644
> --- a/drivers/mmc/host/cqhci-core.c
> +++ b/drivers/mmc/host/cqhci-core.c
> @@ -516,6 +516,11 @@ static int cqhci_prep_tran_desc(struct mmc_request *mrq,
>  
>  	desc = get_trans_desc(cq_host, tag);
>  
> +	if (cq_host->ops->setup_tran_desc) {
> +		cq_host->ops->setup_tran_desc(data, cq_host, desc, sg_count);
> +		return 0;
> +	}
> +
>  	for_each_sg(data->sg, sg, sg_count, i) {
>  		addr = sg_dma_address(sg);
>  		len = sg_dma_len(sg);
> diff --git a/drivers/mmc/host/cqhci.h b/drivers/mmc/host/cqhci.h
> index ba9387ed90eb..2e47461096e8 100644
> --- a/drivers/mmc/host/cqhci.h
> +++ b/drivers/mmc/host/cqhci.h
> @@ -290,6 +290,8 @@ struct cqhci_host_ops {
>  	int (*program_key)(struct cqhci_host *cq_host,
>  			   const union cqhci_crypto_cfg_entry *cfg, int slot);
>  #endif
> +	void (*setup_tran_desc)(struct mmc_data *data,
> +		struct cqhci_host *cq_host, u8 *desc, int sg_count);
>  };
>  
>  static inline void cqhci_writel(struct cqhci_host *host, u32 val, int reg)


      reply	other threads:[~2022-11-16  6:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16  2:00 [PATCH] mmc: CQHCI: solve DMA boundary limitation of CQHCI driver Jyan Chou
2022-11-16  6:43 ` Adrian Hunter [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=e3516bcf-5b5c-e81d-b51a-c9637d734886@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=asutoshd@codeaurora.org \
    --cc=cy.huang@realtek.com \
    --cc=james.tai@realtek.com \
    --cc=jyanchou@realtek.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=riteshh@codeaurora.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).