Received: by 10.192.165.148 with SMTP id m20csp754395imm; Fri, 20 Apr 2018 15:15:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx49VBl99qucCQPFbt1Psm+eu5ZEFKFslxAAY6WAhc1wNp98I/H6Gwfq9W/FpFC1kGj5id757 X-Received: by 10.98.35.11 with SMTP id j11mr1744422pfj.177.1524262532298; Fri, 20 Apr 2018 15:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524262532; cv=none; d=google.com; s=arc-20160816; b=HFe7/dIAhaYnbVU//9X439AEi0K65zk0tCiqSOKPzFdC1xNPprG+FiXWarufTr64m+ sxhlWuiLQwZVGH9vkJVLNd7H6BEgYVIvjKGAiytetHNnzh2+JWffMdrVwWAV5GU7P4He rRLaXgNQ6r/V/h3AGA2SgFVEVd8PKQ1ejQqATO6iiJWLAOUfAZ45kDUdlwAahvIPVCtE o8ekfgoJqmSBqYxhTQJC+fb9BD36111Z61pwh417AbZj97KZ9MYujJfNs15tQaiULkA/ 3rfisw4+2N34NVSuwFeGymPKK26umx9qCe2nYB7KdsWhXhaItnEJyUJ+KkpLfDP7SDJl 6VfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=THr/JWkFeSuBxiKJsB3xBZRiXStahJIMT+4iLbGehP8=; b=BI+TlXwT/Px1jG9+lnMUYHbEVRRsNWwN2sT+0MDh6yTPeQm5t6slX14QnVWl59ReYA fsBvJcRwKZtAxfznt3qYp0zpJqnl/yBdd5oIyissIiRwPrw62oefJr+y+oETtG79qMC/ l54MMU4hFBCwqf8J0pRtya/290fW5sxqxFszEWb1ot5M9pHal0KjQ43qjgcdDNzVyeCu 5ioTRC2Gx2DR6y3dwXhOMZQgkNiicnJuCh6IAVFmt5nwfrWtaqV4rn3uXbnXOWDtdTBy KUHj57XzK5m0ZejhZzPAcM5ifhPJ/SsbCVP/95U6CMWTm3mN0BPfeKDDKd0Ca4Kiidif ZD/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si1678405pgp.298.2018.04.20.15.14.55; Fri, 20 Apr 2018 15:15:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753072AbeDTWKi (ORCPT + 99 others); Fri, 20 Apr 2018 18:10:38 -0400 Received: from mail.bootlin.com ([62.4.15.54]:52705 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752647AbeDTWKh (ORCPT ); Fri, 20 Apr 2018 18:10:37 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 013602071B; Sat, 21 Apr 2018 00:10:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id B531920376; Sat, 21 Apr 2018 00:10:34 +0200 (CEST) Date: Sat, 21 Apr 2018 00:10:28 +0200 From: Boris Brezillon To: NeilBrown Cc: Cyrille Pitchen , Marek Vasut , David Woodhouse , "Brian Norris" , Boris Brezillon , Richard Weinberger , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mtd: spi-nor: clear Winbond Extended Address Reg on switch to 3-byte addressing. Message-ID: <20180421001028.544f5d09@bbrezillon> In-Reply-To: <87efj9pnyk.fsf@notabene.neil.brown.name> References: <874lkmw54j.fsf@notabene.neil.brown.name> <87sh7wrq8p.fsf@notabene.neil.brown.name> <20180420215440.7b078f6c@bbrezillon> <87efj9pnyk.fsf@notabene.neil.brown.name> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 21 Apr 2018 07:28:19 +1000 NeilBrown wrote: > On Fri, Apr 20 2018, Boris Brezillon wrote: > > > Hi Neil, > > > > On Mon, 16 Apr 2018 09:42:30 +1000 > > NeilBrown wrote: > > > >> Winbond spi-nor flash 32MB and larger have an 'Extended Address > >> Register' as one option for addressing beyond 16MB (Macronix > >> has the same concept, Spansion has EXTADD bits in the Bank Address > >> Register). > >> > >> According to section > >> 8.2.7 Write Extended Address Register (C5h) > >> > >> of the Winbond W25Q256FV data sheet (256M-BIT SPI flash) > >> > >> The Extended Address Register is only effective when the device is > >> in the 3-Byte Address Mode. When the device operates in the 4-Byte > >> Address Mode (ADS=1), any command with address input of A31-A24 > >> will replace the Extended Address Register values. It is > >> recommended to check and update the Extended Address Register if > >> necessary when the device is switched from 4-Byte to 3-Byte Address > >> Mode. > >> > >> So the documentation suggests clearing the EAR after switching to > >> 3-byte mode. Experimentation shows that the EAR is *always* one after > >> the switch to 3-byte mode, so clearing the EAR is mandatory at > >> shutdown for a subsequent 3-byte-addressed reboot to work. > >> > >> Note that some SOCs (e.g. MT7621) do not assert a reset line at normal > >> reboot, so we cannot rely on hardware reset. The MT7621 does assert a > >> reset line at watchdog-reset. > >> > >> Signed-off-by: NeilBrown > > > > We should probably backport the fix. Can you add a Fixes and Cc-stable > > tag? > > It's a bit weird having Fixes when this isn't a regression, but I guess > it doesn't hurt. Well, I thought you wanted this patch to be backported to stable releases, hence my suggestion. Of course it's not a regression, since the bug is here from the beginning, but nonetheless it's fixing a bug. > I chose > Fixes: 59b356ffd0b0 ("mtd: m25p80: restore the status of SPI flash when exiting") > as this patch it useless without that one. Not sure that's how Fixes should be used. IIUC, it should point to the first commit where the bug was introduced, so I guess it's 0aa87b7563f1 ("mtd: m25p80: add support for the windbond w25q256 chip") in this case. Now, if you want to restrict the kernel releases this patch should be backported to, you can use the '# vX.Y+' suffix in your Cc-stable tag. > > I also fixed the comment and have resent. Thanks.