Linux MultiMedia Card development
 help / color / mirror / Atom feed
* [PATCH v3] mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data
@ 2023-12-01 10:26 Pin-yen Lin
  2023-12-02  2:04 ` Wenbin Mei (梅文彬)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pin-yen Lin @ 2023-12-01 10:26 UTC (permalink / raw)
  To: Chaotian Jing, Ulf Hansson, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: linux-arm-kernel, linux-kernel, ot_shunxi.zhang, linux-mediatek,
	Chen-Yu Tsai, linux-mmc, Pin-yen Lin

This log message is necessary for debugging, so enable it by default to
debug issues that are hard to reproduce locally.

Signed-off-by: Pin-yen Lin <treapking@chromium.org>

---

Changes in v3:
- Only print the warning when -ETIMEDOUT or not in tuning process

Changes in v2:
- Use dev_warn() instead of dev_err()

 drivers/mmc/host/mtk-sd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 97f7c3d4be6e..6ae5e0a9fca9 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1149,9 +1149,11 @@ static void msdc_recheck_sdio_irq(struct msdc_host *host)
 
 static void msdc_track_cmd_data(struct msdc_host *host, struct mmc_command *cmd)
 {
-	if (host->error)
-		dev_dbg(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
-			__func__, cmd->opcode, cmd->arg, host->error);
+	if (host->error &&
+	    ((!mmc_op_tuning(cmd->opcode) && !host->hs400_tuning) ||
+	     cmd->error == -ETIMEDOUT))
+		dev_warn(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
+			 __func__, cmd->opcode, cmd->arg, host->error);
 }
 
 static void msdc_request_done(struct msdc_host *host, struct mmc_request *mrq)
-- 
2.43.0.rc2.451.g8631bc7472-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data
  2023-12-01 10:26 [PATCH v3] mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data Pin-yen Lin
@ 2023-12-02  2:04 ` Wenbin Mei (梅文彬)
  2023-12-04 11:43 ` AngeloGioacchino Del Regno
  2023-12-07 14:01 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: Wenbin Mei (梅文彬) @ 2023-12-02  2:04 UTC (permalink / raw)
  To: ulf.hansson@linaro.org, matthias.bgg@gmail.com,
	treapking@chromium.org, angelogioacchino.delregno@collabora.com,
	Chaotian Jing (井朝天)
  Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	wenst@chromium.org,
	ot_shunxi.zhang@mediatek.corp-partner.google.com,
	linux-mmc@vger.kernel.org

On Fri, 2023-12-01 at 18:26 +0800, Pin-yen Lin wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  This log message is necessary for debugging, so enable it by default
> to
> debug issues that are hard to reproduce locally.
> 
> Signed-off-by: Pin-yen Lin <treapking@chromium.org>
> 
Reviewed-by: Wenbin Mei <wenbin.mei@mediatek.com>
> ---
> 
> Changes in v3:
> - Only print the warning when -ETIMEDOUT or not in tuning process
> 
> Changes in v2:
> - Use dev_warn() instead of dev_err()
> 
>  drivers/mmc/host/mtk-sd.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 97f7c3d4be6e..6ae5e0a9fca9 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -1149,9 +1149,11 @@ static void msdc_recheck_sdio_irq(struct
> msdc_host *host)
>  
>  static void msdc_track_cmd_data(struct msdc_host *host, struct
> mmc_command *cmd)
>  {
> -	if (host->error)
> -		dev_dbg(host->dev, "%s: cmd=%d arg=%08X; host-
> >error=0x%08X\n",
> -			__func__, cmd->opcode, cmd->arg, host->error);
> +	if (host->error &&
> +	    ((!mmc_op_tuning(cmd->opcode) && !host->hs400_tuning) ||
> +	     cmd->error == -ETIMEDOUT))
> +		dev_warn(host->dev, "%s: cmd=%d arg=%08X; host-
> >error=0x%08X\n",
> +			 __func__, cmd->opcode, cmd->arg, host->error);
>  }
>  
>  static void msdc_request_done(struct msdc_host *host, struct
> mmc_request *mrq)
> -- 
> 2.43.0.rc2.451.g8631bc7472-goog
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data
  2023-12-01 10:26 [PATCH v3] mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data Pin-yen Lin
  2023-12-02  2:04 ` Wenbin Mei (梅文彬)
@ 2023-12-04 11:43 ` AngeloGioacchino Del Regno
  2023-12-07 14:01 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-12-04 11:43 UTC (permalink / raw)
  To: Pin-yen Lin, Chaotian Jing, Ulf Hansson, Matthias Brugger
  Cc: linux-arm-kernel, linux-kernel, ot_shunxi.zhang, linux-mediatek,
	Chen-Yu Tsai, linux-mmc

Il 01/12/23 11:26, Pin-yen Lin ha scritto:
> This log message is necessary for debugging, so enable it by default to
> debug issues that are hard to reproduce locally.
> 
> Signed-off-by: Pin-yen Lin <treapking@chromium.org>
> 

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data
  2023-12-01 10:26 [PATCH v3] mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data Pin-yen Lin
  2023-12-02  2:04 ` Wenbin Mei (梅文彬)
  2023-12-04 11:43 ` AngeloGioacchino Del Regno
@ 2023-12-07 14:01 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2023-12-07 14:01 UTC (permalink / raw)
  To: Pin-yen Lin
  Cc: Chaotian Jing, Matthias Brugger, AngeloGioacchino Del Regno,
	linux-arm-kernel, linux-kernel, ot_shunxi.zhang, linux-mediatek,
	Chen-Yu Tsai, linux-mmc

On Fri, 1 Dec 2023 at 11:27, Pin-yen Lin <treapking@chromium.org> wrote:
>
> This log message is necessary for debugging, so enable it by default to
> debug issues that are hard to reproduce locally.
>
> Signed-off-by: Pin-yen Lin <treapking@chromium.org>

Applied for next, thanks!

Kind regards
Uffe


>
> ---
>
> Changes in v3:
> - Only print the warning when -ETIMEDOUT or not in tuning process
>
> Changes in v2:
> - Use dev_warn() instead of dev_err()
>
>  drivers/mmc/host/mtk-sd.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 97f7c3d4be6e..6ae5e0a9fca9 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -1149,9 +1149,11 @@ static void msdc_recheck_sdio_irq(struct msdc_host *host)
>
>  static void msdc_track_cmd_data(struct msdc_host *host, struct mmc_command *cmd)
>  {
> -       if (host->error)
> -               dev_dbg(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
> -                       __func__, cmd->opcode, cmd->arg, host->error);
> +       if (host->error &&
> +           ((!mmc_op_tuning(cmd->opcode) && !host->hs400_tuning) ||
> +            cmd->error == -ETIMEDOUT))
> +               dev_warn(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
> +                        __func__, cmd->opcode, cmd->arg, host->error);
>  }
>
>  static void msdc_request_done(struct msdc_host *host, struct mmc_request *mrq)
> --
> 2.43.0.rc2.451.g8631bc7472-goog
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-07 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-01 10:26 [PATCH v3] mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data Pin-yen Lin
2023-12-02  2:04 ` Wenbin Mei (梅文彬)
2023-12-04 11:43 ` AngeloGioacchino Del Regno
2023-12-07 14:01 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox