lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFpb0o2w9=nRp98XnqoLKtFOCDssJzy+53mg1bW8y0UmUw@mail.gmail.com>
Date: Tue, 20 Aug 2024 13:33:31 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Judith Mendez <jm@...com>
Cc: Adrian Hunter <adrian.hunter@...el.com>, linux-mmc@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mmc: sdhci_am654: Add tuning debug prints

On Thu, 15 Aug 2024 at 22:15, Judith Mendez <jm@...com> wrote:
>
> Add debug prints to tuning algorithm for debugging.
>
> Signed-off-by: Judith Mendez <jm@...com>
> ---
>  drivers/mmc/host/sdhci_am654.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
> index c3d485bd4d553..a909f8de0eabe 100644
> --- a/drivers/mmc/host/sdhci_am654.c
> +++ b/drivers/mmc/host/sdhci_am654.c
> @@ -457,11 +457,13 @@ static u32 sdhci_am654_calculate_itap(struct sdhci_host *host, struct window
>
>         if (!num_fails) {
>                 /* Retry tuning */
> +               dev_err(dev, "No failing region found, retry tuning\n");

A dev_err seems to be too heavy, but I am not sure at what frequency
this could occur?

Why isn't a dev_dbg sufficient?

>                 return -1;
>         }
>
>         if (fail_window->length == ITAPDLY_LENGTH) {
>                 /* Retry tuning */
> +               dev_err(dev, "No passing ITAPDLY, retry tuning\n");

Ditto.

>                 return -1;
>         }
>
> @@ -505,6 +507,7 @@ static int sdhci_am654_platform_execute_tuning(struct sdhci_host *host,
>         struct sdhci_am654_data *sdhci_am654 = sdhci_pltfm_priv(pltfm_host);
>         unsigned char timing = host->mmc->ios.timing;
>         struct window fail_window[ITAPDLY_LENGTH];
> +       struct device *dev = mmc_dev(host->mmc);
>         u8 curr_pass, itap;
>         u8 fail_index = 0;
>         u8 prev_pass = 1;
> @@ -542,12 +545,14 @@ static int sdhci_am654_platform_execute_tuning(struct sdhci_host *host,
>
>         if (ret >= 0) {
>                 itap = ret;
> +               dev_dbg(dev, "Final ITAPDLY=%d\n", itap);
>                 sdhci_am654_write_itapdly(sdhci_am654, itap, sdhci_am654->itap_del_ena[timing]);
>         } else {
>                 if (sdhci_am654->tuning_loop < RETRY_TUNING_MAX) {
>                         sdhci_am654->tuning_loop++;
>                         sdhci_am654_platform_execute_tuning(host, opcode);
>                 } else {
> +                       dev_err(dev, "Failed to find ITAPDLY, fail tuning\n");

The commit message only talks about debug messages, but this is an
error message. Perhaps update the commit message a bit?

>                         return -1;
>                 }
>         }
> --
> 2.46.0
>

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ