lkml.org 
[lkml]   [2019]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 12/20] mtd: spi-nor: Print debug message when the read back test fails
From
Date


On 02/11/19 4:53 PM, Tudor.Ambarus@microchip.com wrote:
> From: Tudor Ambarus <tudor.ambarus@microchip.com>
>
> Demystify where the EIO error occurs.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---

I think this is a small enough change that can be squashed into previous
patch itself

> drivers/mtd/spi-nor/spi-nor.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index 8f5e9833081b..725dab241271 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -974,7 +974,12 @@ static int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 status_new)
> if (ret)
> return ret;
>
> - return (nor->bouncebuf[0] != status_new) ? -EIO : 0;
> + if (nor->bouncebuf[0] != status_new) {
> + dev_dbg(nor->dev, "SR: read back test failed\n");
> + return -EIO;
> + }
> +
> + return 0;
> }
>
> /**
>

--
Regards
Vignesh

\
 
 \ /
  Last update: 2019-11-05 13:38    [W:0.719 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site