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: <5ebaf98b-a77e-3c5a-3e08-bbb0119558a2@gmail.com>
Date:   Mon, 19 Dec 2022 16:30:32 +0100
From:   Matthias Brugger <matthias.bgg@...il.com>
To:     Xiangsheng Hou <xiangsheng.hou@...iatek.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Mark Brown <broonie@...nel.org>,
        Chuanhong Guo <gch981213@...il.com>
Cc:     linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-spi@...r.kernel.org, benliang.zhao@...iatek.com,
        bin.zhang@...iatek.com
Subject: Re: [PATCH v5 01/10] spi: mtk-snfi: Change default page format to
 setup default setting

Thanks for your patch! There is something to improve please see below.

On 19/12/2022 03:40, Xiangsheng Hou wrote:
> Change default page format to setup default setting since the sector
> size 1024 on MT7986 will lead to probe fail.
> 
> Signed-off-by: Xiangsheng Hou <xiangsheng.hou@...iatek.com>
> ---
>   drivers/spi/spi-mtk-snfi.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-mtk-snfi.c b/drivers/spi/spi-mtk-snfi.c
> index fa8412ba20e2..719fc6f53ab1 100644
> --- a/drivers/spi/spi-mtk-snfi.c
> +++ b/drivers/spi/spi-mtk-snfi.c
> @@ -1430,8 +1430,7 @@ static int mtk_snand_probe(struct platform_device *pdev)
>   
>   	// setup an initial page format for ops matching page_cache_op template
>   	// before ECC is called.
> -	ret = mtk_snand_setup_pagefmt(ms, ms->caps->sector_size,
> -				      ms->caps->spare_sizes[0]);
> +	ret = mtk_snand_setup_pagefmt(ms, SZ_2K, SZ_64);

Couldn't you just set sector_size in mt7986_snand_caps?

Regards,
Matthias


>   	if (ret) {
>   		dev_err(ms->dev, "failed to set initial page format\n");
>   		goto disable_clk;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ