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: <3464becc-b2d1-02f1-4214-2bc69edddca4@gmail.com>
Date:   Wed, 26 Jul 2023 18:37:22 +0900
From:   Takahiro Kuwano <tkuw584924@...il.com>
To:     Tudor Ambarus <tudor.ambarus@...aro.org>,
        takahiro.kuwano@...ineon.com, michael@...le.cc
Cc:     pratyush@...nel.org, linux-mtd@...ts.infradead.org,
        linux-kernel@...r.kernel.org, bacem.daassi@...ineon.com,
        miquel.raynal@...tlin.com, richard@....at
Subject: Re: [PATCH v4 09/11] mtd: spi-nor: spansion: let SFDP determine the
 flash and sector size

On 7/26/2023 4:52 PM, Tudor Ambarus wrote:
> sector_size is used to determine the flash size and the erase size in
> case of uniform erase. n_sectors is used to determine the flash_size.
> But the flash size and the erase sizes are determined when parsing SFDP,
> let SFDP determine them.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@...aro.org>
> ---
>  drivers/mtd/spi-nor/spansion.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
> index 1c5671a3751a..30a3ffbfa381 100644
> --- a/drivers/mtd/spi-nor/spansion.c
> +++ b/drivers/mtd/spi-nor/spansion.c
> @@ -873,11 +873,11 @@ static const struct flash_info spansion_nor_parts[] = {
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s25fs256t_fixups },
> -	{ "s25hl512t",  INFO6(0x342a1a, 0x0f0390, 256 * 1024, 256)
> +	{ "s25hl512t",  INFO6(0x342a1a, 0x0f0390, 0, 0)
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s25hx_t_fixups },
> -	{ "s25hl01gt",  INFO6(0x342a1b, 0x0f0390, 256 * 1024, 512)
> +	{ "s25hl01gt",  INFO6(0x342a1b, 0x0f0390, 0, 0)
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s25hx_t_fixups },
> @@ -886,11 +886,11 @@ static const struct flash_info spansion_nor_parts[] = {
>  		MFR_FLAGS(USE_CLPEF)
>  		FLAGS(NO_CHIP_ERASE)
>  		.fixups = &s25hx_t_fixups },
> -	{ "s25hs512t",  INFO6(0x342b1a, 0x0f0390, 256 * 1024, 256)
> +	{ "s25hs512t",  INFO6(0x342b1a, 0x0f0390, 0, 0)
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s25hx_t_fixups },
> -	{ "s25hs01gt",  INFO6(0x342b1b, 0x0f0390, 256 * 1024, 512)
> +	{ "s25hs01gt",  INFO6(0x342b1b, 0x0f0390, 0, 0)
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s25hx_t_fixups },
> @@ -901,22 +901,22 @@ static const struct flash_info spansion_nor_parts[] = {
>  		.fixups = &s25hx_t_fixups },
>  	{ "cy15x104q",  INFO6(0x042cc2, 0x7f7f7f, 512 * 1024, 1)
>  		FLAGS(SPI_NOR_NO_ERASE) },
> -	{ "s28hl512t",   INFO(0x345a1a,      0, 256 * 1024, 256)
> +	{ "s28hl512t",   INFO(0x345a1a,      0, 0, 0)
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s28hx_t_fixups,
>  	},
> -	{ "s28hl01gt",   INFO(0x345a1b,      0, 256 * 1024, 512)
> +	{ "s28hl01gt",   INFO(0x345a1b,      0, 0, 0)
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s28hx_t_fixups,
>  	},
> -	{ "s28hs512t",   INFO(0x345b1a,      0, 256 * 1024, 256)
> +	{ "s28hs512t",   INFO(0x345b1a,      0, 0, 0)
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s28hx_t_fixups,
>  	},
> -	{ "s28hs01gt",   INFO(0x345b1b,      0, 256 * 1024, 512)
> +	{ "s28hs01gt",   INFO(0x345b1b,      0, 0, 0)
>  		PARSE_SFDP
>  		MFR_FLAGS(USE_CLPEF)
>  		.fixups = &s28hx_t_fixups,

Tested-by: Takahiro Kuwano <Takahiro.Kuwano@...ineon.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ