Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4820172rwl; Tue, 28 Mar 2023 11:43:55 -0700 (PDT) X-Google-Smtp-Source: AKy350YrLqglWluvyp2bftRbXLU84h84t5E2KV+ZSYOR8MQ1hwpLhC8iZE96UxlYwfBAmWaw/TmB X-Received: by 2002:a17:90b:4b10:b0:23d:41:3582 with SMTP id lx16-20020a17090b4b1000b0023d00413582mr16733182pjb.8.1680029035598; Tue, 28 Mar 2023 11:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680029035; cv=none; d=google.com; s=arc-20160816; b=qlCPgetSApJsqXgJeJWy/T3gJQkh7KqqdrZHbdeNofgRaCANDGphmIWpMfKU9Rjh2f C50ITHiyQ3afukEW1T7xOl8Ns8/oXrcaoACAk0BldIPZvVIPHxCXb1nGL/yfHqnIlt8V tbwTt/cVy6tsZfHSbEsJ6RpTCJqmZ1+jh69qcgx6Vd1iKZopw6kgeJZBqTF78rAu+Erx nW+wTRIcH6zO1467SOimDtWC1577JcsiaOO+QZLlDQyV68ezJhEf1sojJAEBnq6R7tZO iGCriA92XAlgFcrkHt/s5+o9xw3h58XK/Q+IpmrW4T3xICjQ1wipeQIdxUyMrI6nwwBs stZA== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=FKSXkxzpcregzzfc8LNxNe/imIDwFEKPHvMo25ayGiM=; b=SOu1aVtLwIDB9MVovuK1OvCoApn6eoujZU6lQsy3+ZNp3Iq+o9moxhYfii1JGv4NsP jR+b4aPhsdFdR4Jxw5tHFxCHN6O6YuduHFQT6PGnszQAuZtDxcBz9s1IcK9CfXbgdyvG W6A2uMiXj4ttl1lLuK4VEiXlZxtDbE6sonFd3gNvPeWWfeDqk+41dkX5lqtGSKb6suk1 Zf8HargSnMFsdp7NlLWKlyR3ZnhgZQhg8PtDgg/NREuFC79RpyyHVs5RD88cvq0cAIKq 5IFOA3qPhxmQ9q1OiX9Ti8aZOPrwM9rjw+WF+kohiyDWDv+2XP/C+OiZ+7oJGm0dMoa1 aybg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=iXw7Hw10; 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 a21-20020a17090a481500b00233e0c4d614si8805185pjh.148.2023.03.28.11.43.42; Tue, 28 Mar 2023 11:43: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=iXw7Hw10; 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 S229813AbjC1SkE (ORCPT + 99 others); Tue, 28 Mar 2023 14:40:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbjC1Sj7 (ORCPT ); Tue, 28 Mar 2023 14:39:59 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 403211BF0 for ; Tue, 28 Mar 2023 11:39:56 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 723C35FD11; Tue, 28 Mar 2023 21:39:53 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1680028793; bh=FKSXkxzpcregzzfc8LNxNe/imIDwFEKPHvMo25ayGiM=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; b=iXw7Hw10rLCW8FE+ohGYVDEi5BPwn9CzmW24kCubDHroJ9I0mByvJHUvph0hWISOx K9dnq2VX+iH4mHwzQ8Bt1D5+yFILTbJ9MrQA0bz1m3VilQGhA/NwNHzsIpo8DHnaXa tToouWFKFGfVI+nLhBL+amSRF6ZVRWrPAz5AE8b1AakRLlkVGO6jSjyTAWxHzE4o36 1SIwj+3A480u2QvibB2uikV2Tl/oUN/f3JuqvsFeclMrhzpRr5JNjb3RkAOCv1RGhx 2kfbDT4ejK0bVZWlDsR5I9X+zJzWSdytWWiTV1PdZmys89l6ipHJ0Sr+CHHtuw+q6s weW82HhJ5YrxQ== 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 21:39:52 +0300 (MSK) Message-ID: Date: Tue, 28 Mar 2023 21:36:27 +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 To: Miquel Raynal CC: Martin Blumenstingl , Liang Yang , Richard Weinberger , Vignesh Raghavendra , Neil Armstrong , Kevin Hilman , Jerome Brunet , Jianxin Pan , Yixun Lan , , , , , , References: <81632eee-533e-5e44-1520-5321a06c6797@sberdevices.ru> <20230328185001.5661132b@xps-13> From: Arseniy Krasnov In-Reply-To: <20230328185001.5661132b@xps-13> 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 16:12:00 #21022880 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 On 28.03.2023 19:50, Miquel Raynal wrote: > Hi Arseniy, > > avkrasnov@sberdevices.ru wrote on Tue, 28 Mar 2023 18:56:19 +0300: > >> Hello! >> >> @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). Thanks for details, sure no problem for PR on the next week! Yes, Liang is a maintainer, but i didn't see any feedbacks from him on my previous fixes for this driver. > > By the way any reason not to have Cc'ed stable? Sorry, what do You mean? I've included linux-mtd mailing lists, there is one more list for mtd reviews? I will appreciate if You can point me Thanks, Arseniy > >> >> 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 > > > Thanks, > Miquèl