{"id":2230408,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2230408/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-aspeed/patch/20260429-winbond-v6-18-rc1-cont-read-v3-1-0f38b3c229ad@bootlin.com/","project":{"id":57,"url":"http://patchwork.ozlabs.org/api/1.1/projects/57/?format=json","name":"Linux ASPEED SoC development","link_name":"linux-aspeed","list_id":"linux-aspeed.lists.ozlabs.org","list_email":"linux-aspeed@lists.ozlabs.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260429-winbond-v6-18-rc1-cont-read-v3-1-0f38b3c229ad@bootlin.com>","date":"2026-04-29T17:56:38","name":"[v3,01/11] mtd: spinand: Drop a too strong limitation","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"93ce5f127c289cce17272267524869be6bd881c2","submitter":{"id":73368,"url":"http://patchwork.ozlabs.org/api/1.1/people/73368/?format=json","name":"Miquel Raynal","email":"miquel.raynal@bootlin.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-aspeed/patch/20260429-winbond-v6-18-rc1-cont-read-v3-1-0f38b3c229ad@bootlin.com/mbox/","series":[{"id":502122,"url":"http://patchwork.ozlabs.org/api/1.1/series/502122/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-aspeed/list/?series=502122","date":"2026-04-29T17:56:39","name":"mtd: spinand: Winbond continuous read support","version":3,"mbox":"http://patchwork.ozlabs.org/series/502122/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2230408/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2230408/checks/","tags":{},"headers":{"Return-Path":"\n <linux-aspeed+bounces-3986-incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-aspeed@lists.ozlabs.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=A0uy++Hp;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linux-aspeed+bounces-3986-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)","lists.ozlabs.org; arc=none smtp.remote-ip=185.246.85.4","lists.ozlabs.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com","lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=A0uy++Hp;\n\tdkim-atps=neutral","lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=bootlin.com\n (client-ip=185.246.85.4; helo=smtpout-03.galae.net;\n envelope-from=miquel.raynal@bootlin.com; receiver=lists.ozlabs.org)"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5QHV1fgZz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 04:07:00 +1000 (AEST)","from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g5QHR3Jrkz2yqT;\n\tThu, 30 Apr 2026 04:06:59 +1000 (AEST)","from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4g5QHQ0Pvjz2yjp\n\tfor <linux-aspeed@lists.ozlabs.org>; Thu, 30 Apr 2026 04:06:57 +1000 (AEST)","from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n\tby smtpout-03.galae.net (Postfix) with ESMTPS id 700B14E42B5D;\n\tWed, 29 Apr 2026 17:57:39 +0000 (UTC)","from mail.galae.net (mail.galae.net [212.83.136.155])\n\tby smtpout-01.galae.net (Postfix) with ESMTPS id 43A3C5FD43;\n\tWed, 29 Apr 2026 17:57:39 +0000 (UTC)","from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id 773411072B168;\n\tWed, 29 Apr 2026 19:57:33 +0200 (CEST)"],"ARC-Seal":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1777486019;\n\tcv=none;\n b=fnCLixlj9bVde0VZqFPfBiTWmbDjQkZof/FgqrAprgEKoetv0kwYo+7Y6dTh6JZQRKt+K+uT3JmYRuB7z7aO+Qb0vtS0Izcufv0XaCkC+84NhLb/6LTNLwxjNO8B7dILfx+OmaXkT+gIzzdVOuwdNlsgJttbVYxIfLuZ9hE1fN96HDwnq3/cutnFNyM1SciQqhFj1dyPxz/PVc8WhNbCV6tagcBIVTwx222/tI0ccD/xvTgrEQDz4qfZeF7/Q9EjNDZpk3FrtsNPzUvx5QX77SVbUNlick7kY3V5q441sKrpBYoemCQ3tUEVMTxPRHLBoC4gFXFAX5qWA4HUZrNE7Q==","ARC-Message-Signature":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1777486019; c=relaxed/relaxed;\n\tbh=yWmmYQ59pDWo8CPH+WDZNUJOtVHq1mv94yrIZNpMFTQ=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=US7vnau/P0RiemORxEk9ofi4zGVO3RUTNmc8WrALfG9ruYw9sd6TfMavihjxvGpsKe8dI+GkaEjz76ICsh4piyaCd7b9Hdeq2X0k5Dfp5YFw7jhvw0nzOhyFWw6a18DGukCN961lgc1+bkQU3chlI2/6LG38MdWDN9fg4ojhoSR7jQ6KZA5m/St+MAD8CMN23SoNA7ZbRkuFdsm6iZdteje4l67EXQWjHhDUdlesuGJr9Pypj3ETPDSOPJFIJrrnj+07gWSrRMxBpfrACDVfHWbuElv1djmU6S45zxKxMtWFBgpCv1j6CYl5SsViP7RptwYUZ7vshyojMoolo74zEw==","ARC-Authentication-Results":"i=1; lists.ozlabs.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com;\n dkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=A0uy++Hp; dkim-atps=neutral;\n spf=pass (client-ip=185.246.85.4; helo=smtpout-03.galae.net;\n envelope-from=miquel.raynal@bootlin.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=bootlin.com","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;\n\tt=1777485457; h=from:subject:date:message-id:to:cc:mime-version:content-type:\n\t content-transfer-encoding:in-reply-to:references;\n\tbh=yWmmYQ59pDWo8CPH+WDZNUJOtVHq1mv94yrIZNpMFTQ=;\n\tb=A0uy++HpVsqXp/AWhYrAI2hp+p7ETugdFS9ytd4dkSCZwTjv36+cFoiIWz21fMnMSR76Pc\n\te9+HB7ILr3sOak88h+392wCRwwauqRweo0aEedItbcLJw5mneGcjRYsFKXfoStHcHckx0G\n\tYdRGnC9kioVwBBtwXgo9e23sCWa5jBacVqwNtOjjGywvq/J3Kk2xPGQJ6jU9zWelyclGMn\n\ta7dCpyogvUIXu6KO4oUR91xBUJDErBJKBAX4/2ba3x4QQEmjuGjYXboWm+Z0S1WSQ1mS/G\n\tEU+q6ezfH6vSeti6bArRAEV8f3ILa5MPp+YtCN06qckkQkyMqihgfsw411IjUQ==","From":"Miquel Raynal <miquel.raynal@bootlin.com>","Date":"Wed, 29 Apr 2026 19:56:38 +0200","Subject":"[PATCH v3 01/11] mtd: spinand: Drop a too strong limitation","X-Mailing-List":"linux-aspeed@lists.ozlabs.org","List-Id":"<linux-aspeed.lists.ozlabs.org>","List-Help":"<mailto:linux-aspeed+help@lists.ozlabs.org>","List-Owner":"<mailto:linux-aspeed+owner@lists.ozlabs.org>","List-Post":"<mailto:linux-aspeed@lists.ozlabs.org>","List-Archive":"<https://lore.kernel.org/linux-aspeed/>,\n  <https://lists.ozlabs.org/pipermail/linux-aspeed/>","List-Subscribe":"<mailto:linux-aspeed+subscribe@lists.ozlabs.org>,\n  <mailto:linux-aspeed+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linux-aspeed+subscribe-nomail@lists.ozlabs.org>","List-Unsubscribe":"<mailto:linux-aspeed+unsubscribe@lists.ozlabs.org>","Precedence":"list","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"\n <20260429-winbond-v6-18-rc1-cont-read-v3-1-0f38b3c229ad@bootlin.com>","References":"\n <20260429-winbond-v6-18-rc1-cont-read-v3-0-0f38b3c229ad@bootlin.com>","In-Reply-To":"\n <20260429-winbond-v6-18-rc1-cont-read-v3-0-0f38b3c229ad@bootlin.com>","To":"Mark Brown <broonie@kernel.org>, Richard Weinberger <richard@nod.at>,\n  Vignesh Raghavendra <vigneshr@ti.com>, Michael Walle <mwalle@kernel.org>,\n  Miquel Raynal <miquel.raynal@bootlin.com>,\n  Takahiro Kuwano <takahiro.kuwano@infineon.com>,\n  Lorenzo Bianconi <lorenzo@kernel.org>, Ray Liu <ray.liu@airoha.com>,\n  Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>, =?utf-8?q?C=C3=A9dric_Le_Goa?=\n\t=?utf-8?q?ter?= <clg@kaod.org>,  Joel Stanley <joel@jms.id.au>,\n Andrew Jeffery <andrew@codeconstruct.com.au>,\n  Avi Fishman <avifishman70@gmail.com>, Tomer Maimon <tmaimon77@gmail.com>,\n  Tali Perry <tali.perry1@gmail.com>, Patrick Venture <venture@google.com>,\n  Nancy Yuen <yuenn@google.com>, Benjamin Fair <benjaminfair@google.com>,\n  Maxime Coquelin <mcoquelin.stm32@gmail.com>,\n  Alexandre Torgue <alexandre.torgue@foss.st.com>, =?utf-8?q?Jonathan_Neusch?=\n\t=?utf-8?q?=C3=A4fer?= <j.neuschaefer@gmx.net>","Cc":"Pratyush Yadav <pratyush@kernel.org>,\n Thomas Petazzoni <thomas.petazzoni@bootlin.com>,\n Steam Lin <STLin2@winbond.com>, Santhosh Kumar K <s-k6@ti.com>,\n linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,\n linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org,\n linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org,\n linux-stm32@st-md-mailman.stormreply.com","X-Mailer":"b4 0.14.3","X-Last-TLS-Session-Version":"TLSv1.3","X-Spam-Status":"No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=disabled\n\tversion=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"},"content":"Since continuous reads may sometimes not be able to go past an erase\nblock boundary, it has been decided not to attempt longer reads and if\nthe user request is bigger, it will be split across eraseblocks.\n\nAs these request will anyway be handled correctly, there is no reason to\nfilter out cases where we would go over a target or a die, so drop this\nlimitation which had a side effect: any request to read more than the\ncontent of an eraseblock would simply not benefit from the continuous\nread feature.\n\nSigned-off-by: Miquel Raynal <miquel.raynal@bootlin.com>\n---\n drivers/mtd/nand/spi/core.c | 19 ++++++-------------\n 1 file changed, 6 insertions(+), 13 deletions(-)","diff":"diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c\nindex 66c90419f6d5..fba3cc213c88 100644\n--- a/drivers/mtd/nand/spi/core.c\n+++ b/drivers/mtd/nand/spi/core.c\n@@ -878,6 +878,12 @@ static int spinand_mtd_continuous_page_read(struct mtd_info *mtd, loff_t from,\n \t * Each data read must be a multiple of 4-bytes and full pages should be read;\n \t * otherwise, the data output might get out of sequence from one read command\n \t * to another.\n+\t *\n+\t * Continuous reads never cross LUN boundaries. Some devices don't\n+\t * support crossing planes boundaries. Some devices don't even support\n+\t * crossing blocks boundaries. The common case being to read through UBI,\n+\t * we will very rarely read two consequent blocks or more, so let's only enable\n+\t * continuous reads when reading within the same erase block.\n \t */\n \tnanddev_io_for_each_block(nand, NAND_PAGE_READ, from, ops, &iter) {\n \t\tret = spinand_select_target(spinand, iter.req.pos.target);\n@@ -968,19 +974,6 @@ static bool spinand_use_cont_read(struct mtd_info *mtd, loff_t from,\n \tnanddev_offs_to_pos(nand, from, &start_pos);\n \tnanddev_offs_to_pos(nand, from + ops->len - 1, &end_pos);\n \n-\t/*\n-\t * Continuous reads never cross LUN boundaries. Some devices don't\n-\t * support crossing planes boundaries. Some devices don't even support\n-\t * crossing blocks boundaries. The common case being to read through UBI,\n-\t * we will very rarely read two consequent blocks or more, so it is safer\n-\t * and easier (can be improved) to only enable continuous reads when\n-\t * reading within the same erase block.\n-\t */\n-\tif (start_pos.target != end_pos.target ||\n-\t    start_pos.plane != end_pos.plane ||\n-\t    start_pos.eraseblock != end_pos.eraseblock)\n-\t\treturn false;\n-\n \treturn start_pos.page < end_pos.page;\n }\n \n","prefixes":["v3","01/11"]}