Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2731536rdb; Fri, 22 Sep 2023 07:04:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEAvEyLqOTs+kzDj7yTxQvS0lrPPFq12mCO2vh3Kvszv/Ub1OCEYHFWRodLEe8GnO1rUqbZ X-Received: by 2002:a17:902:6909:b0:1c4:1cd3:803a with SMTP id j9-20020a170902690900b001c41cd3803amr7325284plk.54.1695391484600; Fri, 22 Sep 2023 07:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695391484; cv=none; d=google.com; s=arc-20160816; b=tEFPG2y7OfCeZvOrZT/PsQjlvCcVVzFHOceGSI1XfubU6Al9IUTPKX33V6oIjxml7/ iNGlKWwKPOxMzgOtukRq9Snrri0EySZJbApfI2mZTzpwNUCzU6hMaKHtWoxWx++qiQLI ei6KGWtcMl7fdTjM95iuegroUQM7h7SOdHQhDszxfbTDdWAC9mRh+Bbvi+YSfYtUaRfH ifVrbBCy0KTMynPNchveHlqITpIZTCTAh57l/4oWbGTok2z0skOoqBcDfdfvyuyvT+DK j/TG8ZjEpoPXfa7VYB3eup1d7QKVv5/MowOTBa/Tq1W0BEf3d6XrJFmC15sE93NROBKF Tn2Q== 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=pExq5EY/86tUqekvDpJYB6m3SynqP56IDF4E/AB4Z5k=; fh=DosVOt3G0NyWcGbJCCfq9XQdMfJp7IK1S5DfXvkY6nk=; b=Lsb2PR9NUlqq1e12FqeTAYP45/VkR4QqZKiRRtcMjIZ+pW55QSGHk3mUs3FuNyxYj/ jtC0RXUYZ0oAM9dbfI6QRKmJ2FoisutgFnW2DKXcKg2VHNPDTOU9ZM4Mf4RU8bvtRl+E RBm4fHVklSc8XKnAdzBim9xnl3pJm1NQZHT95JtCb1QCvGso/K9bM7LSF6GhKUyg/1e1 JvSBNVHQFKFhZSThExT5lCTVl0rVStZAWNeg0Vehc59j1dGd4dWs+4qobMeOF6p0/2VQ nVIs9MeD4bif2HKPvmEGftrRLl9ZrrYdml9jkp3THTuuSYpA7j4oZs+6t7cC0s+YgUOP 029g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=CStiiwB6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ca37-20020a056a0206a500b00578a43e3b0bsi4456142pgb.655.2023.09.22.07.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 07:04:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=CStiiwB6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0EEB98360A2E; Fri, 22 Sep 2023 07:04:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233569AbjIVOES (ORCPT + 99 others); Fri, 22 Sep 2023 10:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233368AbjIVOEQ (ORCPT ); Fri, 22 Sep 2023 10:04:16 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32E38F7 for ; Fri, 22 Sep 2023 07:04:07 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id C79AD24000A; Fri, 22 Sep 2023 14:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695391445; 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=pExq5EY/86tUqekvDpJYB6m3SynqP56IDF4E/AB4Z5k=; b=CStiiwB68UhFaWNyJvW23wdDSD3ddwH74WFVgCG8U6545bJhHiRYjRaS4ZcEqiDpvQPYIH tMrGKNyuwQ8Xx+2UbGKbJUnn0wbXn/KylVZzA9nXKFW4/4AjzqDJ38ccV4/agKr4NNPBRF /LsM+yKlMcGtAU7+nrXZfUbEfdd+HqnDMlyLvex/uEw1bb+V1WCPlSfvmxJrH5AcVYyxOa +MiK5TE1w+uMP1GTp+A7Hmss0wDLYiMb3f6sQ1Zbi28zQkXidzbls8tZnliF73aYRQ31IA qaUP8cNWZlvj0TzysxwcUVKXgZUO/nFKSg9S61fFAuAB0hWZweEWKz4yFZhqzA== Date: Fri, 22 Sep 2023 16:04:00 +0200 From: Miquel Raynal To: Rouven Czerwinski Cc: Martin =?UTF-8?B?SHVuZGViw7hsbA==?= , =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= , Richard Weinberger , Vignesh Raghavendra , JaimeLiao , kernel@pengutronix.de, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Alexander Shiyan Subject: Re: [PATCH] mtd: rawnand: check nand support for cache reads Message-ID: <20230922160400.034ee828@xps-13> In-Reply-To: <20230922100116.145090-1-r.czerwinski@pengutronix.de> References: <20230922100116.145090-1-r.czerwinski@pengutronix.de> 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-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 22 Sep 2023 07:04:26 -0700 (PDT) Hi Rouven, Thanks a lot for the investigation and the patch! r.czerwinski@pengutronix.de wrote on Fri, 22 Sep 2023 12:01:13 +0200: Would you mind changing the title to "mtd: rawnand: Ensure the nand chip supports cached reads" > Both the JEDEC and ONFI specification say that read cache sequential > support is an optional command. I clearly overlooked that part, just checking the set/get_features() entries as usual, good catch. > This means that we not only need to > check whether the individual controller implements the command, we also The controller itself does not implement the command, but may or may not support it (can you please update the sentence?). > need to check the parameter pages for both ONFI and JEDEC NAND flashes > before enabling sequential cache reads. >=20 > This fixes support for NAND flashes which don't support enabling cache > reads, i.e. Samsung K9F4G08U0F or Toshiba TC58NVG0S3HTA00. >=20 > Sequential cache reads are no only available for ONFI and JEDEC devices, > if individual vendors implement this, it needs to be enabled per vendor. Agreed. > Tested on i.MX6Q with a Samsung NAND flash chip that doesn't support > sequential reads. >=20 > Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads") >=20 Please remove this empty line and instead add: Cc: stable@vger.kernel.org > Signed-off-by: Rouven Czerwinski > --- > @Martin, M=C3=A5ns: > I would appreciate if you could test this on your hardware. That would me much appreciated! I also added Alexander who also had troubles with this patchset, could you check on your setup if that solves the issue? > @Miguel: > I didn't have the time to test this on ONFI/JEDEC devices with support > yet, I'd be fine if you hold off merging this. Of course. I was about to send a revert but that looks a promising fix, let's see how it goes. >=20 > drivers/mtd/nand/raw/nand_base.c | 3 +++ > drivers/mtd/nand/raw/nand_jedec.c | 3 +++ > drivers/mtd/nand/raw/nand_onfi.c | 3 +++ > include/linux/mtd/jedec.h | 3 +++ > include/linux/mtd/onfi.h | 1 + > include/linux/mtd/rawnand.h | 1 + > 6 files changed, 14 insertions(+) >=20 Thanks, Miqu=C3=A8l