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: <mafs0lec1mgkm.fsf@kernel.org>
Date:   Tue, 17 Oct 2023 17:09:13 +0200
From:   Pratyush Yadav <pratyush@...nel.org>
To:     Tudor Ambarus <tudor.ambarus@...aro.org>
Cc:     michael@...le.cc, pratyush@...nel.org,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Mamta Shukla <mamta.shukla@...ca-geosystems.com>
Subject: Re: [PATCH v4 2/2] mtd: spi-nor: micron-st: use SFDP table for
 mt25qu512a

On Tue, Oct 17 2023, Tudor Ambarus wrote:

> From: Mamta Shukla <mamta.shukla@...ca-geosystems.com>
>
[...]
> diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
> index 756391c906e5..8920547c12bf 100644
> --- a/drivers/mtd/spi-nor/micron-st.c
> +++ b/drivers/mtd/spi-nor/micron-st.c
> @@ -180,6 +180,18 @@ static const struct flash_info micron_nor_parts[] = {
>  	},
>  };
>  
> +static int mt25qu512a_post_bfpt_fixup(struct spi_nor *nor,
> +				      const struct sfdp_parameter_header *bfpt_header,
> +				      const struct sfdp_bfpt *bfpt)
> +{
> +	nor->flags &= ~SNOR_F_HAS_16BIT_SR;
> +	return 0;
> +}
> +
> +static struct spi_nor_fixups mt25qu512a_fixups = {
> +	.post_bfpt = mt25qu512a_post_bfpt_fixup,
> +};
> +
>  static const struct flash_info st_nor_parts[] = {
>  	{
>  		.name = "m25p05-nonjedec",
> @@ -407,10 +419,8 @@ static const struct flash_info st_nor_parts[] = {
>  		.name = "mt25qu512a",
>  		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP |
>  			 SPI_NOR_BP3_SR_BIT6,
> -		.size = SZ_64M,
> -		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> -		.fixup_flags = SPI_NOR_4B_OPCODES,

Hmm, I have missed some recent developments in SPI NOR and I was
confused why you did not add a PARSE_SFDP flag. But now I understand
that you just need to drop the .size parameter and it will automatically
use SFDP. So LGTM.

Reviewed-by: Pratyush Yadav <pratyush@...nel.org>

>  		.mfr_flags = USE_FSR,
> +		.fixups = &mt25qu512a_fixups,
>  	}, {
>  		.id = SNOR_ID(0x20, 0xbb, 0x20),
>  		.name = "n25q512a",

-- 
Regards,
Pratyush Yadav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ