From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB8F4C433EF for ; Mon, 4 Oct 2021 13:36:33 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2AE0D60FC1 for ; Mon, 4 Oct 2021 13:36:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2AE0D60FC1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E01A183124; Mon, 4 Oct 2021 15:36:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 475CE82DA7; Mon, 4 Oct 2021 15:36:29 +0200 (CEST) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CB21282DA7 for ; Mon, 4 Oct 2021 15:36:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 194DaIXO018099 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Oct 2021 15:36:18 +0200 Received: from [167.87.3.213] ([167.87.3.213]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 194DaHP5026137; Mon, 4 Oct 2021 15:36:17 +0200 Subject: Re: [PATCH] sf: Querying write-protect status before operating the flash From: Jan Kiszka To: chaochao2021666 , Jagan Teki Cc: U-Boot-Denx , Vignesh R , Chao Zeng References: <20210622052126.49853-1-chaochao2021666@163.com> <50e1e113.2ed6.17bc3c269af.Coremail.chaochao2021666@163.com> <17d14fef-de26-f3ca-f1dd-de011e011bde@siemens.com> Message-ID: Date: Mon, 4 Oct 2021 15:36:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <17d14fef-de26-f3ca-f1dd-de011e011bde@siemens.com> Content-Type: text/plain; charset=gbk Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 13.09.21 09:48, Jan Kiszka wrote: > Hi all, > > Chao, please no top-post on mailing list. Also check your mail client, > it seems to inject a lot of bogus newlines. > > On 08.09.21 06:55, chaochao2021666 wrote: >> >> >> >> HI Jagan >> >> >> >> sorry for the delay response. >> >> >> And I have checked the maser. There is still a problem with this feature¡£ >> >> >> reproduce steps: >> 1. enable the flash protect function >> 2. using sf cmd to erase the flash. I can get the erase "OK",not the "error". >> >> >> >> I think the root cause is that the detection mechanism is missing and to judge the permissions of the action >> >> So pull this PR to improve the erase flow >> >> >> another question: >> how can I visit the u-boot-spi/next? do there any link? >> > > See MAINTAINERS: https://source.denx.de/u-boot/custodians/u-boot-spi.git > > But also that tree contains no usage of the flash_is_locked callback. > That was once evaluated by drivers/mtd/spi/spi_flash.c but then > forgotten in the new SPI NOR framework it seems. > > Chao's patch makes sense to me to restore this feature. > > Jan > >> >> >> >> >> BRs >> Chao >> >> >> >> At 2021-06-29 21:50:28, "Jagan Teki" wrote: >>> On Tue, Jun 22, 2021 at 10:51 AM chao zeng wrote: >>>> >>>> From: Chao Zeng >>>> >>>> When operating the write-protection flash,spi_flash_std_write() and >>>> spi_flash_std_erase() would return wrong result.The flash is protected, >>>> but write or erase the flash would show "OK". >>>> >>>> Check the flash write protection state if the write-protection has enbale >>>> before operating the flash. >>>> >>>> Signed-off-by: Chao Zeng >>>> --- >>> >>> Does it broken on master? if yes can you check in u-boot-spi/next? >>> >>> Jagan. > Ping - how do we proceed here? Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux