Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4687213rwl; Tue, 28 Mar 2023 09:56:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZTENEIncw91Go2pravmc2LOYt3NrXNQNSP1fHIBWVa7Z7MKJDnudT+evJlpQpM3PTdXJq5 X-Received: by 2002:a17:907:2c78:b0:8ee:babc:d40b with SMTP id ib24-20020a1709072c7800b008eebabcd40bmr15728361ejc.58.1680022593914; Tue, 28 Mar 2023 09:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680022593; cv=none; d=google.com; s=arc-20160816; b=kQXMvwMJwlmgSDTlggwBUyagSx11fNDw1n/codyYd8LvNDNYc9yAEubnt+JKuCx8JN X+uAiqtQqTQU9uVWDeAtWslQK5t1xIIbWkM3U3KkUYnxRBJ8yZg5rb3IcpIh7GNzXAR0 +ZTBtMVFFwHnIpUJZZ1e3XBl9US7rg9k/y/+J6jcK75LpbWJ8cbkzZTJyMYcz3mqP8jG UhdubEIKIghzNK+VbAKQRxHN5v4Hpi7HFMrk7xRWstNa3UOy+fd9jjinEesHJCu03mwU 7OQpQ7nagy7A5J1UMwoxrVMTJyA8RKSzAVlhV6q+L7GUJtm179y1ORiGJl/r7XM/fQcG zkvA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=5lHjQqz2bvwIGLCUjlFOvqonsd4AdNqo2rm07pQiMA8=; b=eR2mROqJeLXrsKdOOszIzfEMhmP2PbJzhv/MvsYIq3+QtvKJB4zaL1wXwBc6FVI2NM 2evTrYPHlZ5ORa6ZmsjXohQrO90n3VLCLGj/Ke+Yg5lr9Dvd/fyedGWorUhmTC3g2zs7 dskk6hgYptu750C5VwmNGr8uX6tUgKOA89ECfiOxSWwWZ7p1G/41HstJ8fOwVN51Od+f 1zNk7nl+Emp4LUMCFzpf2scFyLim/iJwUsh9fctQ49p6SpibFTFK1Roj3BNlvUxbusGI 8gU8TDmWxUqKo96HTLhEPM3XUvurW2iDqR+G0te9Q01olA6Cp+Trpi2TYOc89yex600V kbVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="emu/aTRE"; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id uz29-20020a170907119d00b00923a472118csi25517958ejb.547.2023.03.28.09.56.08; Tue, 28 Mar 2023 09:56:33 -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=@bootlin.com header.s=gm1 header.b="emu/aTRE"; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231591AbjC1Quk (ORCPT + 99 others); Tue, 28 Mar 2023 12:50:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231401AbjC1Qug (ORCPT ); Tue, 28 Mar 2023 12:50:36 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 539328A49 for ; Tue, 28 Mar 2023 09:50:07 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 459EBE0003; Tue, 28 Mar 2023 16:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1680022205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5lHjQqz2bvwIGLCUjlFOvqonsd4AdNqo2rm07pQiMA8=; b=emu/aTREplUYi19S5EGm8XKbz3GPz+d1zNFOUlGxHZKKsmHqfjSKxkSfntMCFy3G9k2nJ9 +aPkpUlsl7W6O7lLUMQibPVkV2YtOjJsWhpPS+ZxmJSDr82SHQU/zx6IUis2pD7KWBhEQ1 oGhnJoCRen3yih668hv1cKBQkom6UxBhwpyFZQ8iWZ+0Igtnqtqn9i2luhum0Si0OBZBLL yx6zs8+mK72ue65SBHTqgd4alxk5u7LQ0pq5lxIbYoO3xS1G3JA/vclPMcJoyOYwEZdh/T ApK5aGSilBv3p3tEL1oWSBOzIkItKlOL14M9w9ak+Dt26FzbJZU4MNEnnxxT/Q== Date: Tue, 28 Mar 2023 18:50:01 +0200 From: Miquel Raynal To: Arseniy Krasnov Cc: Martin Blumenstingl , Liang Yang , Richard Weinberger , Vignesh Raghavendra , Neil Armstrong , Kevin Hilman , Jerome Brunet , Jianxin Pan , Yixun Lan , , , , , , Subject: Re: [PATCH v1] mtd: rawnand: meson: fix bitmask for length in command word Message-ID: <20230328185001.5661132b@xps-13> In-Reply-To: <81632eee-533e-5e44-1520-5321a06c6797@sberdevices.ru> References: <81632eee-533e-5e44-1520-5321a06c6797@sberdevices.ru> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hi Arseniy, avkrasnov@sberdevices.ru wrote on Tue, 28 Mar 2023 18:56:19 +0300: > Hello! >=20 > @Miquel Raynal, what is the status of this patch? Please, it's been 6 days, there is also a maintainer (Liang) in between, I'm fine with the patch but it was too late to take it as part of my previous fixes PR. As said earlier today on the mailing list to Christophe I will make another fixes PR next week (I'll wait for the current one to be part of the next -rc tag). By the way any reason not to have Cc'ed stable? >=20 > Thanks, Arseniy >=20 > On 23.03.2023 10:57, Arseniy Krasnov wrote: > >=20 > >=20 > > On 22.03.2023 23:10, Martin Blumenstingl wrote: =20 > >> Hello Arseniy, > >> > >> thank you for submitting this fix! =20 > > Thanks! =20 > >> > >> On Wed, Mar 22, 2023 at 7:45=E2=80=AFPM Arseniy Krasnov > >> wrote: =20 > >>> > >>> Valid mask is 0x3FFF, without this patch the following problems were > >>> found: > >>> > >>> 1) [ 0.938914] Could not find a valid ONFI parameter page, trying > >>> bit-wise majority to recover it > >>> [ 0.947384] ONFI parameter recovery failed, aborting > >>> > >>> 2) Read with disabled ECC mode was broken. > >>> > >>> Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NA= ND flash controller") > >>> Signed-off-by: Arseniy Krasnov =20 > >> This matches what I can see in the old vendor driver, so: =20 > > Moreover it was clear that mask of 0x3f is too small for length of data= in > > bytes, for example for 2048 + OOB size. =20 > >> Acked-by: Martin Blumenstingl > >> > >> [...] =20 > >>> - cmd =3D (len & GENMASK(5, 0)) | scrambler | DMA_DIR(d= ir); > >>> + cmd =3D (len & GENMASK(13, 0)) | scrambler | DMA_DIR(= dir); =20 > >> My understanding of the vendor driver is that this "len" is only used > >> for "raw" access (my own words: any access that doesn't use the HW ECC > >> engine). =20 > > Exactly, 'len' is only for raw access. =20 > >> As a future improvement (no need to update re-send this patch) it > >> would be great to have a #define with a meaningful name for > >> "GENMASK(13, 0)" (maybe something like NFC_CMD_RAW_LENGTH) as it's > >> used in multiple places now =20 > > Ack > >=20 > > Thanks, Arseniy =20 > >> > >> > >> Best regards, > >> Martin =20 Thanks, Miqu=C3=A8l