Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5958886pxb; Thu, 27 Jan 2022 03:28:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqwbKtOuO6Qh1Nqrns9H3Ggc8W9hn5RnaC/KUGiLNQtpk4D6ZXpE8F9pqdpZTIQtqaGHIM X-Received: by 2002:a17:906:478c:: with SMTP id cw12mr2557088ejc.214.1643282925786; Thu, 27 Jan 2022 03:28:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643282925; cv=none; d=google.com; s=arc-20160816; b=A1+NvrCI/2F9eywzSOz7LU+RmH7cD9YM9EETbuRPGFoKWTnnukr1ouf7AAW+MfAFBm n1toeg7ERxi3zDwcvHFlMePn2gVCt6qMxgDfCyrlNn2LZWzDTXlkNJwejrzhRB9nPBnk klbGz/kxzU0//ezprCIygx5dj+sZJ3/pSf/zdZ+iFCljyVt//7/wNdNSBywdG3bQrF5j aiJOhvfCaIcC5l8oe5eBxhj3hWvHarFsCdQ0PVnvlaLXnZgpzkIJpMipv6u4saYVeEuL alseyH8cSaxo3XYpp95p8/P0JEgNQSIfTLJInSEMaSQqF4q+TCG/o3STn824q2jmLNyA RnOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hRMJPfL0SdlUA7JGQQjBSw0AH6s07oqCQEUd/TBpC3w=; b=EsidL2ZTbroZSi9yJhFFawiUTRK0ILXBqF/VmASismevSW566gd+faxmv89gafw2IR MSHnlcyd7AIOMWDqMP95hZgvGncCvVbb/4E7CYaMIWtBF9+lxZXp8ho859LxD/E0nO1W oYH68bZgd+5p2YFBcRE72XzRGLkTOCUdpbuZvLn0vgvkrfGqryGxWFsnQ5w99muhtFGz 41s22YQFH3hEgPsX/bM90r0X+WIoJ2M/BtpgyRXOXH8TLC6/BJrPAEerNE06rcmqp4FO jFo4y0YRNpNWmTq6VNEOceJuD8MpR5F3qyp3HjcDm5AssBE5ZncrX/zyLkgmRCY80DkR Eu5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ERgk+by2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si1513475edd.407.2022.01.27.03.28.20; Thu, 27 Jan 2022 03:28:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ERgk+by2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235768AbiA0Dbm (ORCPT + 99 others); Wed, 26 Jan 2022 22:31:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbiA0Dbl (ORCPT ); Wed, 26 Jan 2022 22:31:41 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86A79C06161C for ; Wed, 26 Jan 2022 19:31:41 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id y17so1353743plg.7 for ; Wed, 26 Jan 2022 19:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hRMJPfL0SdlUA7JGQQjBSw0AH6s07oqCQEUd/TBpC3w=; b=ERgk+by2NOrioElQxrR9n30LSsNqLx1xgpdw6eLUwxZ4cxVwTTZ85jCKJY1Rjfdmn9 f2jlNkWWQZyCA2Pak8xGNdy8WYx8DYnxmg5mQx4btafQJ+X013Uo1W9Nlh17wcH3Wmy0 ZUN+aBEFmWlzvF6qzEdL+ITtOPlLO9hg0UUxM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hRMJPfL0SdlUA7JGQQjBSw0AH6s07oqCQEUd/TBpC3w=; b=NY26sh35Hm1zp8GEc8zGqIzd9WsBQLMXFkjELKUDfOPwew17ySBandWDmwVCtHrTUW SsPn5s/HHlTk8RxGuHlPwxmI4wXOBAqHLG5u86FYyX8SD0OvrxAbrlbRkak9xwBAgsb3 HE+MMfGNyXX78KnGFIcfRAzYDKQ8BzB9zvXRLUHfpMUokLODbdtGzUizgz8a0aBId6b0 mtgcXqA4axZZU90bWV2caWgS66ffqlcSfC7yDuhLiFpxpo2sKwqUbqgKb8DbmNTYhNpw WBTiFhxhBvUQoh+sDfpxiGwPaIqw/oDmGpj+4FWUDBQsPJRmTWI9h1xKb80sfETeTHeM iUAA== X-Gm-Message-State: AOAM532e0PHL0pfLFwU/cF2vObdZWOLtlAf4NpkgO4PW8EmRizWGK/vR sd0mSLgPKTegOdoSOVArUKc6XBJXNYK8B8mV/vbE7fVPs5Kq0w== X-Received: by 2002:a17:902:d512:: with SMTP id b18mr2205929plg.24.1643254301062; Wed, 26 Jan 2022 19:31:41 -0800 (PST) MIME-Version: 1.0 References: <20220126073227.3401275-1-chentsung@chromium.org> <8625876c695685fc5409997403130194@walle.cc> In-Reply-To: <8625876c695685fc5409997403130194@walle.cc> From: Chen-Tsung Hsieh Date: Thu, 27 Jan 2022 11:31:30 +0800 Message-ID: Subject: Re: [RESEND PATCH] mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check() To: Michael Walle Cc: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 6:38 AM Michael Walle wrote: > Out of curiosity, on what flash did you discover this? It's Winbond W25Q64JWZPIM https://www.winbond.com/hq/product/code-storage-flash-memory/serial-nor-flash/?__locale=en&partNo=W25Q64JW We are verifying the write protection on W25Q64JWZPIM and run into an issue that spi_nor_sr_unlock() always return success even if HW & SW write protection are both enabled.