[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mafs07cnin59q.fsf@kernel.org>
Date: Thu, 19 Oct 2023 14:52:33 +0200
From: Pratyush Yadav <pratyush@...nel.org>
To: AceLan Kao <acelan.kao@...onical.com>
Cc: Tudor Ambarus <tudor.ambarus@...aro.org>,
Pratyush Yadav <pratyush@...nel.org>,
Michael Walle <michael@...le.cc>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: Lower the priority of the software reset
failure message
On Thu, Oct 19 2023, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@...onical.com>
>
> Not all SPI drivers support soft reset enable and soft reset commands.
> This failure is expected and not critical. Thus, we avoid reporting it
> to regular users to prevent potential confusion regarding power-off issues.
No, failure to soft reset can very much be critical in certain cases.
For example, if you are operating the flash in 8D-8D-8D mode and do not
have the hard reset line connected, the bootloader (or the kernel) would
be unable to detect or operate the flash after a warm reboot.
Perhaps it makes sense to just call it when SNOR_F_BROKEN_RESET is set?
This way you do not unnecessarily call it when you do not need to, and
won't see the error message.
>
> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@...onical.com>
> ---
> drivers/mtd/spi-nor/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 1b0c6770c14e..7bca8ffcd756 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -3252,7 +3252,7 @@ static void spi_nor_soft_reset(struct spi_nor *nor)
>
> ret = spi_mem_exec_op(nor->spimem, &op);
> if (ret) {
> - dev_warn(nor->dev, "Software reset failed: %d\n", ret);
> + dev_info(nor->dev, "Software reset failed: %d\n", ret);
> return;
> }
>
> @@ -3262,7 +3262,7 @@ static void spi_nor_soft_reset(struct spi_nor *nor)
>
> ret = spi_mem_exec_op(nor->spimem, &op);
> if (ret) {
> - dev_warn(nor->dev, "Software reset failed: %d\n", ret);
> + dev_info(nor->dev, "Software reset failed: %d\n", ret);
> return;
> }
--
Regards,
Pratyush Yadav
Powered by blists - more mailing lists