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: <b5c17892-24ec-a690-96ca-d2238b8925d1@microchip.com>
Date:   Wed, 22 Jul 2020 14:28:30 +0000
From:   <Tudor.Ambarus@...rochip.com>
To:     <alexander.sverdlin@...ia.com>, <vigneshr@...com>,
        <linux-mtd@...ts.infradead.org>, <mika.westerberg@...ux.intel.com>
CC:     <linux-kernel@...r.kernel.org>, <ibr@...ers.de>
Subject: Re: [PATCH] mtd: spi-nor: intel-spi: Simulate WRDI command

+ Mika

Hi, Mika,

Would you please review the patch from below?

Thanks!

On 7/22/20 5:01 PM, Alexander Sverdlin wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> From: Alexander Sverdlin <alexander.sverdlin@...ia.com>
> 
> After spi_nor_write_disable() return code checks were introduced in the
> spi-nor front end intel-spi backend stopped to work because WRDI was never
> supported and always failed.
> 
> Just pretend it was sucessful and ignore the command itself. HW sequencer
> shall do the right thing automatically, while with SW sequencer we cannot
> do it anyway, because the only tool we had was preopcode and it makes no
> sense for WRDI.
> 
> Cc: stable@...r.kernel.org
> Fixes: bce679e5ae3a ("mtd: spi-nor: Check for errors after each Register Operation")
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@...ia.com>
> ---
>  drivers/mtd/spi-nor/controllers/intel-spi.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/controllers/intel-spi.c b/drivers/mtd/spi-nor/controllers/intel-spi.c
> index 61d2a0a..134b356 100644
> --- a/drivers/mtd/spi-nor/controllers/intel-spi.c
> +++ b/drivers/mtd/spi-nor/controllers/intel-spi.c
> @@ -612,6 +612,14 @@ static int intel_spi_write_reg(struct spi_nor *nor, u8 opcode, const u8 *buf,
>                 return 0;
>         }
> 
> +       /*
> +        * We hope that HW sequencer will do the right thing automatically and
> +        * with the SW seuencer we cannot use preopcode any way, so just ignore
> +        * write disable operation and pretend it was completed successfully.
> +        */
> +       if (opcode == SPINOR_OP_WRDI)
> +               return 0;
> +
>         writel(0, ispi->base + FADDR);
> 
>         /* Write the value beforehand */
> --
> 2.10.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ