* [RFC PATCH] mmc: improve function name when aborting a tuning cmd
@ 2021-06-08 18:06 Wolfram Sang
2021-06-08 22:30 ` Niklas Söderlund
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2021-06-08 18:06 UTC (permalink / raw)
To: linux-mmc; +Cc: linux-renesas-soc, Wolfram Sang
'mmc_abort_tuning()' made me think tuning gets completely aborted.
However, it sends only a STOP cmd to cancel the current tuning cmd.
Tuning process may still continue after that. So, rename the function to
'mmc_send_abort_tuning()' to better reflect all this.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Ulf, here is the patch we discussed earlier today. Based on mmc/next.
drivers/mmc/core/mmc_ops.c | 4 ++--
drivers/mmc/host/renesas_sdhi_core.c | 2 +-
drivers/mmc/host/sdhci.c | 2 +-
include/linux/mmc/host.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 3c58f6d0f482..973756ed4016 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -700,7 +700,7 @@ int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error)
}
EXPORT_SYMBOL_GPL(mmc_send_tuning);
-int mmc_abort_tuning(struct mmc_host *host, u32 opcode)
+int mmc_send_abort_tuning(struct mmc_host *host, u32 opcode)
{
struct mmc_command cmd = {};
@@ -723,7 +723,7 @@ int mmc_abort_tuning(struct mmc_host *host, u32 opcode)
return mmc_wait_for_cmd(host, &cmd, 0);
}
-EXPORT_SYMBOL_GPL(mmc_abort_tuning);
+EXPORT_SYMBOL_GPL(mmc_send_abort_tuning);
static int
mmc_send_bus_test(struct mmc_card *card, struct mmc_host *host, u8 opcode,
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index baab4c2e1b53..e49ca0f7fe9a 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -704,7 +704,7 @@ static int renesas_sdhi_execute_tuning(struct mmc_host *mmc, u32 opcode)
set_bit(i, priv->smpcmp);
if (cmd_error)
- mmc_abort_tuning(mmc, opcode);
+ mmc_send_abort_tuning(mmc, opcode);
}
ret = renesas_sdhi_select_tuning(host);
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index bf238ade1602..6aaf5c3ce34c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2680,7 +2680,7 @@ void sdhci_abort_tuning(struct sdhci_host *host, u32 opcode)
sdhci_end_tuning(host);
- mmc_abort_tuning(host->mmc, opcode);
+ mmc_send_abort_tuning(host->mmc, opcode);
}
EXPORT_SYMBOL_GPL(sdhci_abort_tuning);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index c7e7b43600e9..0abd47e9ef9b 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -632,6 +632,6 @@ static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data)
}
int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
-int mmc_abort_tuning(struct mmc_host *host, u32 opcode);
+int mmc_send_abort_tuning(struct mmc_host *host, u32 opcode);
#endif /* LINUX_MMC_HOST_H */
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] mmc: improve function name when aborting a tuning cmd
2021-06-08 18:06 [RFC PATCH] mmc: improve function name when aborting a tuning cmd Wolfram Sang
@ 2021-06-08 22:30 ` Niklas Söderlund
2021-06-11 7:40 ` Ulf Hansson
0 siblings, 1 reply; 3+ messages in thread
From: Niklas Söderlund @ 2021-06-08 22:30 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-mmc, linux-renesas-soc
Hallo Wolfram,
Thanks for your work.
On 2021-06-08 20:06:20 +0200, Wolfram Sang wrote:
> 'mmc_abort_tuning()' made me think tuning gets completely aborted.
> However, it sends only a STOP cmd to cancel the current tuning cmd.
> Tuning process may still continue after that. So, rename the function to
> 'mmc_send_abort_tuning()' to better reflect all this.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>
> Ulf, here is the patch we discussed earlier today. Based on mmc/next.
>
> drivers/mmc/core/mmc_ops.c | 4 ++--
> drivers/mmc/host/renesas_sdhi_core.c | 2 +-
> drivers/mmc/host/sdhci.c | 2 +-
> include/linux/mmc/host.h | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index 3c58f6d0f482..973756ed4016 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -700,7 +700,7 @@ int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error)
> }
> EXPORT_SYMBOL_GPL(mmc_send_tuning);
>
> -int mmc_abort_tuning(struct mmc_host *host, u32 opcode)
> +int mmc_send_abort_tuning(struct mmc_host *host, u32 opcode)
> {
> struct mmc_command cmd = {};
>
> @@ -723,7 +723,7 @@ int mmc_abort_tuning(struct mmc_host *host, u32 opcode)
>
> return mmc_wait_for_cmd(host, &cmd, 0);
> }
> -EXPORT_SYMBOL_GPL(mmc_abort_tuning);
> +EXPORT_SYMBOL_GPL(mmc_send_abort_tuning);
>
> static int
> mmc_send_bus_test(struct mmc_card *card, struct mmc_host *host, u8 opcode,
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index baab4c2e1b53..e49ca0f7fe9a 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -704,7 +704,7 @@ static int renesas_sdhi_execute_tuning(struct mmc_host *mmc, u32 opcode)
> set_bit(i, priv->smpcmp);
>
> if (cmd_error)
> - mmc_abort_tuning(mmc, opcode);
> + mmc_send_abort_tuning(mmc, opcode);
> }
>
> ret = renesas_sdhi_select_tuning(host);
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index bf238ade1602..6aaf5c3ce34c 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2680,7 +2680,7 @@ void sdhci_abort_tuning(struct sdhci_host *host, u32 opcode)
>
> sdhci_end_tuning(host);
>
> - mmc_abort_tuning(host->mmc, opcode);
> + mmc_send_abort_tuning(host->mmc, opcode);
> }
> EXPORT_SYMBOL_GPL(sdhci_abort_tuning);
>
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index c7e7b43600e9..0abd47e9ef9b 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -632,6 +632,6 @@ static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data)
> }
>
> int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
> -int mmc_abort_tuning(struct mmc_host *host, u32 opcode);
> +int mmc_send_abort_tuning(struct mmc_host *host, u32 opcode);
>
> #endif /* LINUX_MMC_HOST_H */
> --
> 2.30.2
>
--
Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] mmc: improve function name when aborting a tuning cmd
2021-06-08 22:30 ` Niklas Söderlund
@ 2021-06-11 7:40 ` Ulf Hansson
0 siblings, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2021-06-11 7:40 UTC (permalink / raw)
To: Niklas Söderlund; +Cc: Wolfram Sang, linux-mmc, Linux-Renesas
On Wed, 9 Jun 2021 at 00:33, Niklas Söderlund
<niklas.soderlund@ragnatech.se> wrote:
>
> Hallo Wolfram,
>
> Thanks for your work.
>
> On 2021-06-08 20:06:20 +0200, Wolfram Sang wrote:
> > 'mmc_abort_tuning()' made me think tuning gets completely aborted.
> > However, it sends only a STOP cmd to cancel the current tuning cmd.
> > Tuning process may still continue after that. So, rename the function to
> > 'mmc_send_abort_tuning()' to better reflect all this.
> >
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Applied for next, thanks!
Kind regards
Uffe
>
> > ---
> >
> > Ulf, here is the patch we discussed earlier today. Based on mmc/next.
> >
> > drivers/mmc/core/mmc_ops.c | 4 ++--
> > drivers/mmc/host/renesas_sdhi_core.c | 2 +-
> > drivers/mmc/host/sdhci.c | 2 +-
> > include/linux/mmc/host.h | 2 +-
> > 4 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> > index 3c58f6d0f482..973756ed4016 100644
> > --- a/drivers/mmc/core/mmc_ops.c
> > +++ b/drivers/mmc/core/mmc_ops.c
> > @@ -700,7 +700,7 @@ int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error)
> > }
> > EXPORT_SYMBOL_GPL(mmc_send_tuning);
> >
> > -int mmc_abort_tuning(struct mmc_host *host, u32 opcode)
> > +int mmc_send_abort_tuning(struct mmc_host *host, u32 opcode)
> > {
> > struct mmc_command cmd = {};
> >
> > @@ -723,7 +723,7 @@ int mmc_abort_tuning(struct mmc_host *host, u32 opcode)
> >
> > return mmc_wait_for_cmd(host, &cmd, 0);
> > }
> > -EXPORT_SYMBOL_GPL(mmc_abort_tuning);
> > +EXPORT_SYMBOL_GPL(mmc_send_abort_tuning);
> >
> > static int
> > mmc_send_bus_test(struct mmc_card *card, struct mmc_host *host, u8 opcode,
> > diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> > index baab4c2e1b53..e49ca0f7fe9a 100644
> > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> > @@ -704,7 +704,7 @@ static int renesas_sdhi_execute_tuning(struct mmc_host *mmc, u32 opcode)
> > set_bit(i, priv->smpcmp);
> >
> > if (cmd_error)
> > - mmc_abort_tuning(mmc, opcode);
> > + mmc_send_abort_tuning(mmc, opcode);
> > }
> >
> > ret = renesas_sdhi_select_tuning(host);
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index bf238ade1602..6aaf5c3ce34c 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -2680,7 +2680,7 @@ void sdhci_abort_tuning(struct sdhci_host *host, u32 opcode)
> >
> > sdhci_end_tuning(host);
> >
> > - mmc_abort_tuning(host->mmc, opcode);
> > + mmc_send_abort_tuning(host->mmc, opcode);
> > }
> > EXPORT_SYMBOL_GPL(sdhci_abort_tuning);
> >
> > diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> > index c7e7b43600e9..0abd47e9ef9b 100644
> > --- a/include/linux/mmc/host.h
> > +++ b/include/linux/mmc/host.h
> > @@ -632,6 +632,6 @@ static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data)
> > }
> >
> > int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
> > -int mmc_abort_tuning(struct mmc_host *host, u32 opcode);
> > +int mmc_send_abort_tuning(struct mmc_host *host, u32 opcode);
> >
> > #endif /* LINUX_MMC_HOST_H */
> > --
> > 2.30.2
> >
>
> --
> Regards,
> Niklas Söderlund
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-11 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 18:06 [RFC PATCH] mmc: improve function name when aborting a tuning cmd Wolfram Sang
2021-06-08 22:30 ` Niklas Söderlund
2021-06-11 7:40 ` Ulf Hansson
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.