diff mbox series

mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data

Message ID 20231117095531.1693753-1-treapking@chromium.org
State New
Headers show
Series mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data | expand

Commit Message

Pin-yen Lin Nov. 17, 2023, 9:55 a.m. UTC
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>

---

 drivers/mmc/host/mtk-sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson Nov. 23, 2023, 5:13 p.m. UTC | #1
On Fri, 17 Nov 2023 at 10:55, 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>
>
> ---
>
>  drivers/mmc/host/mtk-sd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 97f7c3d4be6e..4469003f571e 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -1150,7 +1150,7 @@ 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",
> +               dev_err(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
>                         __func__, cmd->opcode, cmd->arg, host->error);

How critical is this? Should we perhaps use a dev_warn instead?

>  }
>

Kind regards
Uffe
Pin-yen Lin Nov. 27, 2023, 2:48 p.m. UTC | #2
Hi Ulf,

On Fri, Nov 24, 2023 at 1:13 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Fri, 17 Nov 2023 at 10:55, 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>
> >
> > ---
> >
> >  drivers/mmc/host/mtk-sd.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> > index 97f7c3d4be6e..4469003f571e 100644
> > --- a/drivers/mmc/host/mtk-sd.c
> > +++ b/drivers/mmc/host/mtk-sd.c
> > @@ -1150,7 +1150,7 @@ 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",
> > +               dev_err(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
> >                         __func__, cmd->opcode, cmd->arg, host->error);
>
> How critical is this? Should we perhaps use a dev_warn instead?

After rechecking the driver, I agree that dev_warn() is probably
enough as the driver tries to reset the hardware to recover from the
bad state when this error happens.

I'll wait a few days before sending out v2 to see if Mediatek people
can confirm this.

Thanks and regards,
Pin-yen
>
> >  }
> >
>
> Kind regards
> Uffe
diff mbox series

Patch

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 97f7c3d4be6e..4469003f571e 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1150,7 +1150,7 @@  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",
+		dev_err(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
 			__func__, cmd->opcode, cmd->arg, host->error);
 }