Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6662651rwl; Wed, 22 Mar 2023 13:45:23 -0700 (PDT) X-Google-Smtp-Source: AK7set9lKRGtpCQAT6JLgQ9ciq6vDCLA7WlzS4pZqFQMrYjmy5o3DFOokYRMtLhRmH6d3g1Flyyd X-Received: by 2002:a17:906:7102:b0:8b1:806b:7dbb with SMTP id x2-20020a170906710200b008b1806b7dbbmr8663403ejj.51.1679517923508; Wed, 22 Mar 2023 13:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679517923; cv=none; d=google.com; s=arc-20160816; b=CVtb6lhphJ1p0ANSmB86LbmE1oWkyyNOwYI53NE4sVs4M4c0CsKU+VoFf2dRLtWyjW +1QBYVTiuptCTfFKtwgZkq/c+aJRrxOPs8ZlhA0IpFWV55PBgdQzhtoOF/DOoCaWs1li c1nwpwgwvmnyZIL8/J08srjfYeByjZRAbSqQgI0B9YHxWiOP5Zspgy03KjQpYgLv5fQV P8TFhRJzbyITR5peb4DwQgpa9OIpvlxMySbWo53Mkm/U38Ct/1HtQG7gRtFyB1BF/3wd gJoG5avmuXbTfTPBdcV2LOKLgDhoDNnu6300JMGkyKIDqDtZoZ/sPljzY3vrE6ACS2FW 2Qiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KO+RxVHj93oqiOjN3tvlrX0xqusRwNw2CRPttJ0nsbE=; b=bwbCGCuBg8Kwu9EarxwdD4Rors8Ki0xmG4UlBcVzdTmUiH6RvnzexgMJuhm9CJs5KL vGq+AOwR6u5YaZYERUTosROpRU1uUmWnHpGiic60z2uCIR4u1T6wvRVMC5a3habPJ1ko 3ue2miKhrYeYOhg2T+QO7hUubxm6SDO1v+1jrygf0j+kPEVrh9qsucjMnXsu7rjtwtQY 5kihU5aaEJeyqvIbXVBPFRUdMuMNHndAY5yuFlnPEjRGVK/3mvCDwks/GPuVKMhEXZHE knimOHPW4DuP9bA175He/srLakdyzc3WpQzv0uazY84oXwtxkaQV+Rh2vnvwgnyMqfWb N+kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=ABLAaBlm; 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=googlemail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m20-20020a1709060d9400b009266f9b9f3esi10873115eji.756.2023.03.22.13.44.58; Wed, 22 Mar 2023 13:45:23 -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=@googlemail.com header.s=20210112 header.b=ABLAaBlm; 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=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231991AbjCVUg2 (ORCPT + 99 others); Wed, 22 Mar 2023 16:36:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230365AbjCVUgQ (ORCPT ); Wed, 22 Mar 2023 16:36:16 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE9044B5 for ; Wed, 22 Mar 2023 13:27:58 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id t14so20268725ljd.5 for ; Wed, 22 Mar 2023 13:27:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; t=1679516876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KO+RxVHj93oqiOjN3tvlrX0xqusRwNw2CRPttJ0nsbE=; b=ABLAaBlml2CVEbKVXZ6gb2MwAz/+zu5By/LFaNE559Prxj8vk60R4XXSfSdRKCD5nF NN0CBT4LtsdxHmDyPRsdxk9lndq3nVljDC4UHT6vGLPVPNsu1LHMY3Ih5Z72QREpepHH r2NXYsms2/gHfFN9hL3O4ISCteI4itgoPeJvxpGXnHJ53EAF/OsGdq4D183hH5dvHDLk Inf0oXdOw9WEh80ykgiS3SBsSUO/6rzbUM/6Tb8ooM5u+Oqu/mA8IZs6DjtoxMt23pOQ caHO4OI0YnENkFJiGC9Bcwklb7Rk+DUZv8f9UwP4p4drvdMIiQ8ZC2u4qFljy0t+s1wj dC3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679516876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KO+RxVHj93oqiOjN3tvlrX0xqusRwNw2CRPttJ0nsbE=; b=OKflfdV3pf9F7ZUFU46z1DyEVyC+QJuPS9F9cDHNPF4lETBFW06qQKjhjYuQlSFX/G En5rWWmoKEh3OLb62eAhSzOgnvRpDp0nNj1FQWCmIiWWb7IKsMokBw5z3I+2ZNilrF1Z gQ9nviiwzOPhmxx/jSigMC6hAPk6Z4Igr09ofYdKc5v9STfuTFLCZHjl6N5OJ7kWHSWo 5oGOxy2prRNW/od36LCMuq5P+BHNDwKyKVVnpoCWSUmKhQE2YwBKQcKR58DLz5jO/2GB 4zrowmc+gYPMWcjRryHAu4jDqQCGeYqBVVz45709ZjqAc+/bWMIcs/mHFiMeMjX8ccAF CBEQ== X-Gm-Message-State: AO0yUKXC4cwucRye1HJfVgHtoyN2zcYHLhnNwq5VOcUQb8+kSZL22kPb XBWi4zQFOOS1Pr9WI1mQg8/yZuO6DcUPoWwYLZb3slO0Ey0= X-Received: by 2002:a17:907:788e:b0:932:4577:6705 with SMTP id ku14-20020a170907788e00b0093245776705mr4082690ejc.6.1679515823192; Wed, 22 Mar 2023 13:10:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Martin Blumenstingl Date: Wed, 22 Mar 2023 21:10:12 +0100 Message-ID: Subject: Re: [PATCH v1] mtd: rawnand: meson: fix bitmask for length in command word To: Arseniy Krasnov Cc: Liang Yang , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Neil Armstrong , Kevin Hilman , Jerome Brunet , Jianxin Pan , Yixun Lan , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, oxffffaa@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 Hello Arseniy, thank you for submitting this fix! On Wed, Mar 22, 2023 at 7:45=E2=80=AFPM Arseniy Krasnov wrote: > > 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 NAND f= lash controller") > Signed-off-by: Arseniy Krasnov This matches what I can see in the old vendor driver, so: Acked-by: Martin Blumenstingl [...] > - cmd =3D (len & GENMASK(5, 0)) | scrambler | DMA_DIR(dir); > + cmd =3D (len & GENMASK(13, 0)) | scrambler | DMA_DIR(dir)= ; 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). 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 Best regards, Martin