From patchwork Tue Sep 5 14:56:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kurbanov X-Patchwork-Id: 1829913 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=RJWO5nXJ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sberdevices.ru header.i=@sberdevices.ru header.a=rsa-sha256 header.s=mail header.b=SWyAwGXW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rg7sD02BCz1yg7 for ; Wed, 6 Sep 2023 00:57:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=iXHhtJaklxC8xMQJrQePElheeW9vnyWmCKc+bbqQYTE=; b=RJWO5nXJweq5wH Z8ARA3RBOHFjdvrHdkIX6M4RnWzPIhMuRPRIWwsak51Irb8j7IR5lWvKLz9+sRup+XWlS0Qqjaa10 HUy+KVzKi+pL90GvYDCqlraCltzujt1KHcPgTe8nEe2cBsBS3SY6+qrrcrdeQ0qpXYQLX72ELXOza BAcQNI7UcAH6V4ywQHrS1Nv50hVwS4tvVkgRA1EBGatG5vvrgr0QfdytVyJPc/u5NMXBeFlV5kXMh S8BkeiwiMLDPrchyxCbE9PLpPI4E4yXKwI0wnxb1NNNszpY5m5XB01vltDe5ETZ4TdzOT7vTzbJ+S hn9GaxUcg8e/E9I4LMJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdXUI-006Dps-0B; Tue, 05 Sep 2023 14:57:06 +0000 Received: from mx1.sberdevices.ru ([37.18.73.165]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdXUC-006Dok-2s for linux-mtd@lists.infradead.org; Tue, 05 Sep 2023 14:57:04 +0000 Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 85490100023; Tue, 5 Sep 2023 17:56:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 85490100023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1693925808; bh=j9WIM1QwjBQaTjxYjUQA7Rlw46Hleq4M73BzeKtUxCA=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=SWyAwGXWBWuzrAxrV5mQGBGpQ3HBlWtnGQ8PD7Vwj44nclVuVbHc1rt0Sw8kwO63W BJ7O0cU+1oZr0cBCZ3KmlOHD4/kW6vsxbOMHtvMP8uAjFlrVXionpuQ2eeEs6WG7ur fDVnUrWCMZ3mSnBDQVCHWE+PfiXd1aJuFPA7ue83m6uekxiuTXDzlZK/vvOl56Xh3S kQkoB8JFShEWrRhVj/ufbP8i1GzMw2pC9BUApOtBPnnUXljrWL2lcc2mFxJidYauTk feRbtXIIIdavmzghY6/jwIaE3YEMPJxrYn2tVVb5ouTZN0NrWdGLr5pL+8AB0MrH7f XbYaAVLY4AQrw== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 5 Sep 2023 17:56:48 +0300 (MSK) Received: from CAB-WSD-0004828.sigma.sbrf.ru (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 5 Sep 2023 17:56:46 +0300 From: Martin Kurbanov To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra CC: , , , Martin Kurbanov , Frieder Schrempf Subject: [PATCH v3] mtd: spinand: micron: correct bitmask for ecc status Date: Tue, 5 Sep 2023 17:56:37 +0300 Message-ID: <20230905145637.139068-1-mmkurbanov@sberdevices.ru> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 179666 [Sep 05 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: mmkurbanov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 530 530 ecb1547b3f72d1df4c71c0b60e67ba6b4aea5432, {Tracking_smtp_not_equal_from}, {Tracking_uf_ne_domains}, {Tracking_from_domain_doesnt_match_to}, sberdevices.ru:7.1.1,5.0.1;127.0.0.199:7.1.2;lore.kernel.org:7.1.1;salutedevices.com:7.1.1;100.64.160.123:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:7.1.1,5.0.1, FromAlignment: n, {Tracking_smtp_domain_mismatch}, {Tracking_smtp_domain_2level_mismatch}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean, bases: 2023/09/05 13:24:00 X-KSMG-LinksScanning: Clean, bases: 2023/09/05 13:24:00 X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/09/05 12:20:00 #21804326 X-KSMG-AntiVirus-Status: Clean, skipped X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230905_075702_434319_97531E9F X-CRM114-Status: GOOD ( 13.42 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Valid bitmask is 0x70 in the status register. Fixes: a508e8875e13 ("mtd: spinand: Add initial support for Micron MT29F2G01ABAGD") Signed-off-by: Martin Kurbanov Reviewed-by: Frieder Schrempf List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Valid bitmask is 0x70 in the status register. Fixes: a508e8875e13 ("mtd: spinand: Add initial support for Micron MT29F2G01ABAGD") Signed-off-by: Martin Kurbanov Reviewed-by: Frieder Schrempf --- Changes v3 since v2 at [1]: - Remove the commit for fixing OOB layout. - Add Fixes tag. Changes v2 since v1 at [2]: - Split into two individual patches. - Remove the fix for using only non-protected ECC bytes from OOB area. Links: [1] https://lore.kernel.org/all/20230822122534.872646-1-mmkurbanov@sberdevices.ru/ [2] https://lore.kernel.org/all/20230815161024.810729-1-mmkurbanov@sberdevices.ru/ drivers/mtd/nand/spi/micron.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.40.0 diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c index 50b7295bc922..12601bc4227a 100644 --- a/drivers/mtd/nand/spi/micron.c +++ b/drivers/mtd/nand/spi/micron.c @@ -12,7 +12,7 @@ #define SPINAND_MFR_MICRON 0x2c -#define MICRON_STATUS_ECC_MASK GENMASK(7, 4) +#define MICRON_STATUS_ECC_MASK GENMASK(6, 4) #define MICRON_STATUS_ECC_NO_BITFLIPS (0 << 4) #define MICRON_STATUS_ECC_1TO3_BITFLIPS (1 << 4) #define MICRON_STATUS_ECC_4TO6_BITFLIPS (3 << 4)