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] [day] [month] [year] [list]
Message-ID: <7fcecd56-494d-a0d2-2cca-989d13cebae6@microchip.com>
Date:   Wed, 9 Mar 2022 14:22:21 +0000
From:   <Tudor.Ambarus@...rochip.com>
To:     <p.yadav@...com>, <michael@...le.cc>
CC:     <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
        <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/5] mtd: spi-nor Favor the BFPT-parsed Quad Enable method

On 3/9/22 16:17, Tudor Ambarus wrote:
> JESD216 SFDP defines in the BFPT standard methods to enable Quad Mode. The
> flash parameters and settings that are retrieved from SFDP have higher
> precedence than the static initialized ones, because they should be more
> accurate and less error prone than those initialized statically. Favor the
> BFPT-parsed Quad Enable method and use the generic core methods where
> possible.
> This patch may introduce regressions in case BFPT contains wrong data. The
> fix is to introduce a post_bfpt() fixup hook and update the wrong BFPT
> data.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@...rochip.com>
> ---
>  drivers/mtd/spi-nor/core.c     |  5 +++--
>  drivers/mtd/spi-nor/issi.c     |  4 ++--
>  drivers/mtd/spi-nor/macronix.c | 14 ++++++--------
>  3 files changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 5de46a786cc5..9a5299a7b212 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -2427,9 +2427,11 @@ static void spi_nor_late_init_params(struct spi_nor *nor)
>  	if (nor->info->fixups && nor->info->fixups->late_init)
>  		nor->info->fixups->late_init(nor);
>  
> -	/* Default method kept for backward compatibility. */
> +	/* Default methods kept for backward compatibility. */
>  	if (!params->set_4byte_addr_mode)
>  		params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode_brwr;
> +	if (!params->quad_enable)
> +		params->quad_enable = spi_nor_sr2_bit1_quad_enable;
>  

oops, this will break micron-st since they explicitly clear the quad_enable
method. Let me respin this patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ