Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4626700rwl; Tue, 28 Mar 2023 09:10:43 -0700 (PDT) X-Google-Smtp-Source: AK7set9uPdKhVqoCLgSDwX+RuW0+B99Bp+jgRiBwd8MBGDSXTw/r8LoPGTgeai0lRcwAvZSOZSbv X-Received: by 2002:a17:90a:31c:b0:23f:ec0f:aab8 with SMTP id 28-20020a17090a031c00b0023fec0faab8mr17401922pje.40.1680019843571; Tue, 28 Mar 2023 09:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680019843; cv=none; d=google.com; s=arc-20160816; b=Us88ZZxvbmqMk8/cBTjxP/kRe7fw+QuGSX7t5RAq47Iu/mpSydw8vqVSutnGJKiQQ3 q2Sl/0k8y+GxhQQ5L/8Gm4yngmC+H9QWmgtj4afjMcJXCxy7R+bljdsKg7QKhQp1eQ9A Ub176rA+0inijYSNzYSSQat8B9tktIJSoqvE+rQ4JwNoA0CJ8ukqlWChJhtNpm3NuUJX umhhxIoQoowgj80QcC9xHysGTdTMsmWotDxECDZBoFSUniU8fzxMlmtVMDFDZfaP/40E 9rwNj7mIrcFLgAZ6VKjL5AodBIT/rzDyin+F2oiZXOCUjHnvGUNuAAvvIobU6Ef3XWvq 61yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=+9QzWAPZdJiLUFjtZdhRNkgT3cxt2ae3HLNCpRJ9kPU=; b=KDCK8resSYUXQwFnrx/t57x0ezcxnf/QqeZ/u1OnhjlLw+tuaWuvf/h21g928OvOiJ l7XKMrgOM4Ru/RbBbZUJdAsx/LNg29hXPzy6IiZNXdnvAh7Sjq18sc/uX33qbGw+kJ31 YSAsINMGbZvxycaAdEbzWCAQDYPfcAIJCxNhBJoMEk7iArNW8W9qZad1Z8kpCIF0nZK1 45xli8EYEx+yj1qaCOjmyZoEgVGlv3T9Uv0Mu9xl4EgMP1KHZe8l0qJVlBuB8HviqiU0 d6mA/byYEG7C/qY1XG8D+YPntjOR/9gRqzYZIKyaXROQE3dFUtXxmNN+ELrM47lx3HEm 4Ysw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b="PwgMmjo/"; 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 h8-20020a170902f54800b0019f239f4966si15419813plf.568.2023.03.28.09.10.30; Tue, 28 Mar 2023 09:10:43 -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="PwgMmjo/"; 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 S232823AbjC1P7s (ORCPT + 99 others); Tue, 28 Mar 2023 11:59:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232530AbjC1P7r (ORCPT ); Tue, 28 Mar 2023 11:59:47 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C08DF187 for ; Tue, 28 Mar 2023 08:59:44 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id B5DBB5FD14; Tue, 28 Mar 2023 18:59:41 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1680019181; bh=+9QzWAPZdJiLUFjtZdhRNkgT3cxt2ae3HLNCpRJ9kPU=; h=Message-ID:Date:MIME-Version:Subject:From:To:Content-Type; b=PwgMmjo/Kxzg/W6eWz0KRU0W4mpnwLI0b2PGpnnEHBendI5jN+SPPADZbqqLV6euH ODQIzsGZOr4FywYx22t44lrXwORZSrVAnhznj8BlSlHtvlvU3l0UTZpU/jFgJMtymK /aV2tVjrcNWOdy7PmlSZ0OXpohPZ0cLuNnWbpl2MX+YdNLhH+rWfpVB+MLnf/28Rwp 9Bkr8/nD29zsgiPZgEDYFr8dUvoXOjWiaY2T1bUnJHO7G3oh55KWzgA3kGk4QwZN6U VE3a6Rq98oPpBFqZ89orGrucuBj8ixwkMLXkruYhGlFVCnqvpd47E1W9kKnLOWLcST xpUmrL6S9Xi5w== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Tue, 28 Mar 2023 18:59:40 +0300 (MSK) Message-ID: <81632eee-533e-5e44-1520-5321a06c6797@sberdevices.ru> Date: Tue, 28 Mar 2023 18:56:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v1] mtd: rawnand: meson: fix bitmask for length in command word Content-Language: en-US From: Arseniy Krasnov To: Martin Blumenstingl CC: Liang Yang , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Neil Armstrong , Kevin Hilman , Jerome Brunet , Jianxin Pan , Yixun Lan , , , , , , References: In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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/03/28 12:08:00 #21021610 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 Hello! @Miquel Raynal, what is the status of this patch? Thanks, Arseniy On 23.03.2023 10:57, Arseniy Krasnov wrote: > > > On 22.03.2023 23:10, Martin Blumenstingl wrote: >> Hello Arseniy, >> >> thank you for submitting this fix! > Thanks! >> >> On Wed, Mar 22, 2023 at 7:45 PM 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 flash controller") >>> Signed-off-by: Arseniy Krasnov >> This matches what I can see in the old vendor driver, so: > Moreover it was clear that mask of 0x3f is too small for length of data in > bytes, for example for 2048 + OOB size. >> Acked-by: Martin Blumenstingl >> >> [...] >>> - cmd = (len & GENMASK(5, 0)) | scrambler | DMA_DIR(dir); >>> + cmd = (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). > Exactly, 'len' is only for raw access. >> 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 > Ack > > Thanks, Arseniy >> >> >> Best regards, >> Martin