Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp508811rwl; Tue, 11 Apr 2023 23:21:55 -0700 (PDT) X-Google-Smtp-Source: AKy350bE63iE+3YIit6ahwyOBssQkENBha9USStHgh70X1TFsOhIjRUQrXvB2lflrnDd9+qAEvKq X-Received: by 2002:a17:906:5e45:b0:94a:6953:602d with SMTP id b5-20020a1709065e4500b0094a6953602dmr961761eju.37.1681280515600; Tue, 11 Apr 2023 23:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681280515; cv=none; d=google.com; s=arc-20160816; b=SKubdk/3cM2amyBEnarfSvN1es+bGKvvxz+cqPVu+vs561Qbu5BbDBoA2Uy3W4RD92 5F//2N2+fMnX/U9jPEOK0vyzhji4/U7msZPut5XTGB3aQEjiJw4OSLGSCn6+RCP2dVAI 4ul5yS4o+n6waHSC07pzy/vBJNXk4zTRBnFMo9PFGsgKuncyRJc2zUxvvVAnxsTH8ORI hPNuGipVpAX4H/rFI7a7ZqmqVk7NUbtXc9mxqoHipevgmrKRIzyhIiOQzypBCzR4MWGj q75YNTKKla6nzHaOpn7f4VhXOtoet3HNrPThiOlVWh/YBz4Xf6/68Z5n3bpooaiGTma0 571w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=u85shc8UtLxBHDVt6LzqD5rR/vx0d1Zu3hb1jox2KPc=; b=sonRGb+CuCbGL5TrPmeEbeBhq13aa+Ri5/RMw7aFHPLHvUJPoCMCT7J2ykkdLTbyXp rziE+zUFVCvliW0eJkiuevDRai37Tnq720oKvwtqkXeB1ZNMiN6llNPYhxS+7gYkeuwn WXZy7nbs+wbKHwjkfzl0EG12y27UeVjfmI4PMjDw129dVDj2sSZMIPjNm30msUbEBRWS XPAi7JbC+YyzOmeTG5Kqcm2tzjBhpL9P3bLatsnAny8UkjmJMX2HXYHJr6UfzsQslMCr JnnNY/Ywm5E/MQQ/0xjrkP6J3NmWPDzofodaKdhYEaK3155A2ETXFpt1m/uBAss8Qr8C mPkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=jRSzYcXt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020aa7ccca000000b0050477debf51si10364555edt.269.2023.04.11.23.21.31; Tue, 11 Apr 2023 23:21:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=jRSzYcXt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbjDLGV0 (ORCPT + 99 others); Wed, 12 Apr 2023 02:21:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjDLGVX (ORCPT ); Wed, 12 Apr 2023 02:21:23 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFCC0AC for ; Tue, 11 Apr 2023 23:21:18 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id BB8835FD5E; Wed, 12 Apr 2023 09:21:15 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1681280475; bh=u85shc8UtLxBHDVt6LzqD5rR/vx0d1Zu3hb1jox2KPc=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=jRSzYcXtKAvpDdJFuPpzbd8quTvf5jXkyOWPvx1u93IurGQB4HnicCsooLM0kZKc4 utC1J8GcsiXtZZi24znZEpaLhCPH07V7fuDNNANb5e1IFYOOUrMjj5wcZZvx2UsHAW dWhI061Mh8CNUOfYmKNl0RbydZjA57gZT7EEKOtPfpV80KlWRLUPVObF3yCxnK82Px qwUWEozm3UKqV8bfOFP/vj7J2ntIniH7ClHTe9AKi39EGo/xfZTd0/+9HrLV08ZHdf mwATFrWEJ+56S7OILJbhHyhBeuSig/vLiin6WxtIATRAqNx7HaqYO0zri3HHeLyam+ 6PTSAQNhewUmQ== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 12 Apr 2023 09:21:13 +0300 (MSK) From: Arseniy Krasnov To: Liang Yang , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Jianxin Pan , Yixun Lan CC: , , Arseniy Krasnov , , , , Subject: [PATCH v1 0/5] refactoring and fix for Meson NAND Date: Wed, 12 Apr 2023 09:16:54 +0300 Message-ID: <20230412061700.1492474-1-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/04/12 04:12:00 #21090163 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, this patchset adds one fix and several refactoring patches. First patch is the most important - it fixes unstable behaviour of Meson driver, for example random ECC errors during reads. I've tested this with mount/ unmount/read/write cases for JFFS2 and nanddump/nandwrite utlities on AXG family (A113X SoC). Source of this update is old vendor's driver. Other patches are refactoring and extra checks, not critical for this driver's reliability. Arseniy Krasnov (5): mtd: rawnand: meson: fix NAND access for read/write mtd: rawnand: meson: replace GENMASK() macro with define mtd: rawnand: meson: check buffer length mtd: rawnand: meson: clear OOB buffer before read mtd: rawnand: meson: remove unneeded bitwise OR with zeroes drivers/mtd/nand/raw/meson_nand.c | 147 ++++++++++++++++++++++++++---- 1 file changed, 127 insertions(+), 20 deletions(-) -- 2.35.0