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 17309C433F5 for ; Thu, 4 Nov 2021 16:07:09 +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 3C60460D43 for ; Thu, 4 Nov 2021 16:07:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3C60460D43 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.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 DF2A1836A4; Thu, 4 Nov 2021 17:07:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="QUDvTSbz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B39FB836A7; Thu, 4 Nov 2021 17:07:03 +0100 (CET) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D59E3836A1 for ; Thu, 4 Nov 2021 17:06:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x834.google.com with SMTP id s1so4529220qta.13 for ; Thu, 04 Nov 2021 09:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ODj2h9JN/GcaVKvf7HtUrSqqZvDSdyJoPvmZc9G9fTk=; b=QUDvTSbzys4KnT3MkatyqzHLrWFbF2GcxUmaE9A1GVPTawY/qPXJB0t2p+Zz3bsdie 6Fp18OwtCd0gBjbXlDSlQPKweK1ScwhytRFoIIMXd9zH+XufjvU+WYuCs+dzNqEyFLoY eV2MXBeRjrBW89c0VQu8rxw//i2+MN/DcMQd8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ODj2h9JN/GcaVKvf7HtUrSqqZvDSdyJoPvmZc9G9fTk=; b=Gn4p9kDlyUZ7HwOxmF73NV4GVfB6rJHZ42AsIBvwuMUtdSyUMaWYSo6yksF85BVb1x qeblz0Ngh06HzsQA6fVEap8a0ICHfpFG3TqHf7ObaXt1+pTDg7nNzXRXMAQWGoXFB4MX FO+jtK73Vj9DdKEQ7z9sk67cfhsstBrEvYrQ86nGPRU9rSYe8bQpg2EBCCB674rhcBTZ a8hwqR2YoCMsZM0mLbcdxjP2531xLhBNUVci2S2V7lWYdRVrqhXqhlpsF1KtbK/vtbxZ gNUySey9ETV2bxAnAvCoA6vCQyH7TcuiUIu6pBVTcxm3tXT4Qh5p2lCNhWcGEpcNb2tu xBHQ== X-Gm-Message-State: AOAM530wlVBgPRFSqP/wPhoYJbYpKMb4IE21EZWLMYfjFTEmFBX7zjPq gyqCPZTiskFV8autSuJIroAayQ== X-Google-Smtp-Source: ABdhPJwKhwjra8J/m0wNnMLK+8G/yBt37cfkB6DAIURsQQ9/Yf6Am/s20XtupuPWZqV+xWiNNYkNlQ== X-Received: by 2002:a05:622a:40f:: with SMTP id n15mr14041087qtx.159.1636042017463; Thu, 04 Nov 2021 09:06:57 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-e134-a4dd-2b9a-4388.res6.spectrum.com. [2603:6081:7b01:cbda:e134:a4dd:2b9a:4388]) by smtp.gmail.com with ESMTPSA id v12sm3917091qtq.62.2021.11.04.09.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 09:06:56 -0700 (PDT) Date: Thu, 4 Nov 2021 12:06:54 -0400 From: Tom Rini To: Jan Kiszka Cc: chaochao2021666 , Jagan Teki , U-Boot-Denx , Vignesh R , Chao Zeng Subject: Re: [PATCH] sf: Querying write-protect status before operating the flash Message-ID: <20211104160654.GN24579@bill-the-cat> References: <20210622052126.49853-1-chaochao2021666@163.com> <50e1e113.2ed6.17bc3c269af.Coremail.chaochao2021666@163.com> <17d14fef-de26-f3ca-f1dd-de011e011bde@siemens.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rv4E5+MVpMkdzVF3" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett 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 --rv4E5+MVpMkdzVF3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 03, 2021 at 01:18:42PM +0100, Jan Kiszka wrote: > On 04.10.21 15:36, Jan Kiszka wrote: > > 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 feat= ure=E3=80=82 > >>> > >>> > >>> 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.g= it > >> > >> 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" wro= te: > >>>> 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 protec= ted, > >>>>> 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. > >> > >=20 > > Ping - how do we proceed here? > >=20 > > Jan > >=20 >=20 > Ping=C2=B2 - who can help to move this forward? I've put this in my to-watch bundle, if Jagan doesn't chime in soon. Thanks! --=20 Tom --rv4E5+MVpMkdzVF3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmGEBRsACgkQFHw5/5Y0 tyz6RAwAqgoU0Xx6ytUt2dcs/JvEkDllMeJzBYV7ohBYiXd62rSHmyKdLInIzXw/ ia+stao+NHIdOlNdx0n+e/GxkazUWOwrjp366wCBaJYnTJybTKoRetnarosPtgwP 5I16iMUGEgxD7ZBwpQ8pYP05IVfWGD67eLfjCNQejQKS/eJLNHJOTaTVBTwkkXON rDBod347yzu+mF4yYgBkyUtazCRrJwadSpiktmND7M1EkGpmrPEuuQyx4IBwm5wx 3ezkEevu7GCMruZ2Ym34JovC7fcJ+eQ8VX5ye86/8r6emQSrf3Hi/xePWj0cyG0O I9l5+hsoF6ju51fn/y7OWhCr0mgT8QfSGrlursDt/gPk4wORaBDUCg41cRJGCUMI zMsI6UthPQbqKG2j6IRUOasOp8r/8xEEJSG1pc+hQFbxZe0QWLh0uVAhXDzZZUqc BHX2+TlY8V0VGbTmEoaVaNBA0Cid4BUs8Bq/dD7U3kNHiwnRAarJ5Tx7wbcy0Bal 5N0PLFFe =plNC -----END PGP SIGNATURE----- --rv4E5+MVpMkdzVF3--