| Message ID | 20261105-submit-sunxi-nand-vendor-oob-layout-v1-v10-23-dca1f6ed29a8@gmail.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-27282-sunxi=pue.re@lists.linux.dev>
X-Original-To: noreply@patchwork.local
Delivered-To: noreply@patchwork.local
Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mxe881.netcup.net (Postfix) with ESMTPS id 8F6F41C241D
for <noreply@patchwork.local>; Thu, 5 Nov 2026 20:01:36 +0100 (CET)
Authentication-Results: mxe881;
dkim=pass header.d=gmail.com;
spf=pass (sender IP is 172.105.105.114)
smtp.mailfrom=linux-sunxi+bounces-27282-noreply=patchwork.local@lists.linux.dev
smtp.helo=tor.lore.kernel.org
Received-SPF: pass (mxe881: domain of lists.linux.dev designates
172.105.105.114 as permitted sender) client-ip=172.105.105.114;
envelope-from=linux-sunxi+bounces-27282-noreply=patchwork.local@lists.linux.dev;
helo=tor.lore.kernel.org;
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org
[100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 973C72F720
for <noreply@patchwork.local>; Thu, 5 Nov 2026 18:56:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793904967;
b=WP9k4OPvLZiQcbey8Ne56qiRf+2ZqRrKqqByVLLYuTXAWgfzYP4MxgI7A8ppDcCDQ2AR
k+A6UsgRqzic1CJwA5ayBpNEZ1GCI/14V5tEmTkf+V+V6IbsQ++3QP0jMnOjyxF9QzERk
DXxVhijAjfz+X4u/hUOMioQGtJlZuK9doptatkA3HeRDJ3/2luvF9kEqO/uiMQv92WrHf
ZKZ7bq1eHR/uxjhLHoNLQh4U59CZNknBGpWnw7e2lopYOmgx3v6kj92VoDN2AqYUK3WGT
TdUQuGWnup+6BELk2ySr2a1zaXyB+nd7zPzWoyYy3OaR8JRjjKeNl9Zr2ucsjyFBolA==
ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793904967;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:From:Date:Subject:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding:
Message-Id:References:In-Reply-To:To:Cc:X-Mailer;
bh=F8PJ7Wj/MurY/COKSMskXdHgUwbyiv0TEDO/uX+R0bU=;
b=4qfDKSnLZ79BFsZJe0/1e6ZLIL0wpgTkoMMcBZ7uZgbu6sJY//WirjfJDkb9KgMmcD6O
Cp/iCQ68kjHUAUiY3LcRNL1sPURu3uAeKjXJp0aQbSBeDNqw+PfUDw2LrfLF9PR5Tf0M3
+dAud+W7qD7cO4g7/P2NWJ2dZ94WQ07XrtODQG6fSGWdduSc/zE8+XZIFkbvzTfGdMyRd
B5DL4802RuqIz8uY9mtFBF2xsyGb5SyHAVscPgtdy8a4MtlTz1EpRxIdGLWBcXIzp0Mue
krJVYu1cS/HYTBZyL2nlyPxmCt0wpkkF8+2c1lM49DQsxILKc4F3LnvR2Qz0kOAy05Q==
ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20260707 header.b=ePbfsBne;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FDEA608363A;
Thu, 5 Nov 2026 18:56:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key,
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20260707 header.b=ePbfsBne
X-Original-To: linux-sunxi@lists.linux.dev
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.remote-ip=209.85.161.46
ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793904967;
b=f9+8Vmj9ovWUls5zJIS9c55wUSo509hTsJjdZDzqQBsFD3Anw1bagnHQxB6NZ8Q75T6v
FZqAXLVRiFm3rkj+332OtNw3I9dRiF0eez79rl/AZdnu7r43lj8y/wcKZctTlzLur9CaY
ExhO+KpowvQgfRiu09fwMa+qzXpXTnYhUAdep4tFbP6Q3dcrt5locd5qrM+x742MsYmwb
SKkpvnnOs6lDXuNDTckTseMvqSsUXEI4c0NFsWojrCccLYL2NyKLBb67igB3txXg5JHpz
B+fR70mxWNDT3GLzfZeLIBRVCqThiXn3C5w/zv/GEyAfowx+lYFEetuXS/lrJXlVdjA==
ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793904967;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:
Message-Id:References:In-Reply-To:To:Cc:X-Mailer;
bh=F8PJ7Wj/MurY/COKSMskXdHgUwbyiv0TEDO/uX+R0bU=;
b=qmf4m7v1N3Qc4ohsWTQA9xVJ8YQ8+JL3DqogaRiYNYETpGuh9pzmLZ5lXuLWsB86n8Ar
UvVJBZAASo/kEeYy248/IbdIriNZWurxsjupYA+BExgzkaVXFvLmQ/7BLU9VYLxjvLiKD
0WcEyJlerUvRf9jl+WU3S9kH+Z17RpcCd9PIwDxdnVvm4WUeR2rcygSH38yUALx3DGjGq
BhI7mzWWWRFNcRJJY1xSaDw+Lk4U0i8vFwQjtDhEVIVJMldhX3PYcYi4hfVbSkajiheoR
GhhSYlYoIFT5iBKyP7g6/0zd2xYjlXbqhspVUIvS5hwSxOZ3+ZkRY/3wkHYCm++HyPw==
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20260707 header.b=ePbfsBne;
arc=none smtp.remote-ip=209.85.161.46
Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com
[209.85.161.46])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest
SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1712D606A337
for <linux-sunxi@lists.linux.dev>; Thu, 5 Nov 2026 18:56:06 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1712D606A337
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=gmail.com
Received: by mail-oo1-f46.google.com with SMTP id
006d021491bc7-6f8a519e215so1084573eaf.1
for <linux-sunxi@lists.linux.dev>;
Thu, 05 Nov 2026 10:56:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793904966; x=1794509766;
darn=lists.linux.dev;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:content-type:mime-version:subject:date:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=F8PJ7Wj/MurY/COKSMskXdHgUwbyiv0TEDO/uX+R0bU=;
b=ePbfsBneSS7MF2ambGNIoEm+8UHP+fFAHXDCZzy43alE3/ICmiCHflZQ1EinMrYiXN
2xo8XkFVpXBkpJD2bcUJ72i+w0Hjz2do/ueu0rhrLr5F6yPUAezcva3XfzWCt8BV+j8D
ah/qojfXyAsVLAAZqZsSeEci7XCOjjt9pPdD3Gn+pqwwfbWQPpcs/mHRpXZQZGGT+yvF
6xtdcyAjY1WEaBVTYpXdh2T2zMdrEo2VgUi8tBpaqshzRiC+n/YPTPuQCwiVZ/GVJ4WO
Tflu74lTY1ydGkONd2KRzU2627k2Wjfs0r9DE2XTQAb2RUtid7rSvygAS1YOVPDm/fP6
sPhw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793904966; x=1794509766;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:content-type:mime-version:subject:date:from:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=F8PJ7Wj/MurY/COKSMskXdHgUwbyiv0TEDO/uX+R0bU=;
b=cGrPw5whVBwGKGDDtU4LkWwphKmkBPhgh3GmzoUV9Mb7qYCXZWIKn7lEz3wHyJC4mZ
jRsst3KAHSWy+M3QFlFD31V4uDam3hWy3MZe1pB8xQJq0h0DzutY3yxMZvwq541WDlLZ
4ScotEuvMD21fc7F2Ue1AoijeRZbB9VfWzt5vQpG4Ew5VifhytQoFDnB9rIHbQ4SHQ03
IKBEFNb9jhZO5k3DNsIlddVZElA98eqqu3HwE4+JqehmWNqlpW+76mQBOBmlkzr5rMzq
Z0rOc9DH8L+cbyzmSS5IBkc3BWSsIU/kVWOG4iGKYl1bz+qvc2PHntJLp7lDwzPFssao
RnlQ==
X-Forwarded-Encrypted: i=1;
AKwUvBxUhV7V5w6mAahL76dZIjnG9F5bpUqnTygO6XwVuvEnrSr7OOufEYGxWCMV7M0NH4BqiCmBVkIR6SE1oQ==@lists.linux.dev
X-Gm-Message-State: APuU4Z9zmEQ4594NkcBsaM3J6P/JDoOFefu/qOVqiJe4QRcsx3twQ8Qz
EQLb0cHvhdJaBdN0fvYId3OYxFfFdPGh1JG7WEAN2R1FLm2Zvj7/MiyU
X-Gm-Gg: AYBFou0kVTwQ9B8Sdre25zMTlnhxicKkQBhefjwlAIDrLT3gJM9LL0KmL7lJk5rOcdz
uHoqgd6N1TfXz3V46XeqicR3y4dSo9Bgd4dd6FB/WUo7F3H7JvmVyEQ55sILz135ZZ15MI8mk9x
bPjq0O+yrjpV489IYrxTt2OJP+Yk1MK01r96nMFw1KY0zGXAb5SXn9q2iO8kVfRmUoa3WSgL+vt
BtwjCs6AD9pNMNFkXc322LYi/vJctgAqbSaeinNUsLbSS8GlH0Y94iRX+HpoNoe5UJXG2YGaIs0
XTTkui4VFQ9dcpl4AkaEesH2JLmopUO5x2vK+RxaejbELPLX2ZPx7tXC/TpNjV2gxnoJNDg5QGk
QC2GRQu5B2UDJrElOcF0BuM92S4tNxpfY5TJTTeogtHSGwd9+6iTas9YRJJI/NCGcXNFe+ckJmS
hXXvXS+MSf36wNuNqehtgvH0jzsgCT1d6w2qO52Ee6nCfj4Y8ubPhss/YXXa6Kee4JeiTUpST9d
v2bHLHHacNyWCrN1zg7lFYs9AJTmE0Cw3I1tWhChWu6cJfUqZhuPsFYLQRWI4pLCgbRfbRLH3xF
Gc1WFFZHA49SMtrIQ5DiFHFvsarmaJAwaeMNrVcXWlsE2ia1sgoVY5WafVu5tIDreS3bIBRY24C
SkKZrmkBfB6hMTdVM5HvnThfp84Zy3P6Rjjvoly2H4eL0VpZTenlmNEUS2K1A2NRAun7YIMwql2
xCH8482oEjnJ23LpMN9VMv5Iso/RTrkyLHYgrD6v2Ncf9ABbRsbhVYcLrTIBgKqgl0pN7Win0Zd
g==
X-Received: by 2002:a05:6820:151b:b0:716:e9e0:543f with SMTP id
006d021491bc7-716e9e05899mr67251eaf.11.1793904965992;
Thu, 05 Nov 2026 10:56:05 -0800 (PST)
Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49])
by smtp.gmail.com with ESMTPSA id
006d021491bc7-716e99465dbsm115897eaf.0.2026.11.05.10.56.04
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 05 Nov 2026 10:56:05 -0800 (PST)
From: James Hilliard <james.hilliard1@gmail.com>
Date: Thu, 05 Nov 2026 11:55:39 -0700
Subject: [PATCH v10 23/26] mtd: rawnand: sunxi: avoid redundant column
changes for extra OOB
X-Mailing-List: linux-sunxi@lists.linux.dev
List-Id: <linux-sunxi.lists.linux.dev>
List-Post: <mailto:linux-sunxi@lists.linux.dev>
List-Help: <mailto:linux-sunxi+help@lists.linux.dev>
List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev>
List-Owner: <mailto:linux-sunxi+owner@lists.linux.dev>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id:
<20261105-submit-sunxi-nand-vendor-oob-layout-v1-v10-23-dca1f6ed29a8@gmail.com>
References:
<20261105-submit-sunxi-nand-vendor-oob-layout-v1-v10-0-dca1f6ed29a8@gmail.com>
In-Reply-To:
<20261105-submit-sunxi-nand-vendor-oob-layout-v1-v10-0-dca1f6ed29a8@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>, Steven Rostedt <rostedt@goodmis.org>,
Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>,
James Hilliard <james.hilliard1@gmail.com>
Cc: Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>, Maxime Ripard <mripard@kernel.org>,
Richard Genoud <richard.genoud@bootlin.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Brian Norris <computersforpeace@gmail.com>, linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
devicetree@vger.kernel.org
X-Mailer: b4 0.15.2
X-Rspamd-Server: rspamd-worker-8404
X-Spamd-Result: default: False [-3.29 / 15.00];
BAYES_HAM(-5.50)[100.00%];
SUSPICIOUS_RECIPS(1.50)[];
HFILTER_HELO_IP_A(1.00)[tor.lore.kernel.org];
MAILLIST(-0.18)[generic];
MIME_GOOD(-0.10)[text/plain];
HAS_LIST_UNSUB(-0.01)[];
FREEMAIL_CC(0.00)[kernel.org,gmail.com,sholland.org,bootlin.com,socionext.com,lists.infradead.org,lists.linux.dev,vger.kernel.org];
RCVD_COUNT_FIVE(0.00)[6];
RSPAMD_EMAILBL_FAIL(0.00)[jameshilliard1.gmail.com:query timed out];
FROM_HAS_DN(0.00)[];
RCPT_COUNT_TWELVE(0.00)[25];
TAGGED_RCPT(0.00)[dt];
FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev];
ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG];
TAGGED_FROM(0.00)[bounces-27282-noreply=patchwork.local];
MID_RHS_MATCH_FROM(0.00)[];
TO_DN_SOME(0.00)[];
FREEMAIL_FROM(0.00)[gmail.com];
R_SPF_DNSFAIL(0.00)[temporary DNS error];
FORGED_SENDER_MAILLIST(0.00)[];
MSBL_EBL_FAIL(0.00)[jameshilliard1@gmail.com:query timed out];
MAILSPIKE_FAIL(0.00)[172.105.105.114:query timed out];
FORGED_RECIPIENTS_MAILLIST(0.00)[];
FREEMAIL_TO(0.00)[bootlin.com,nod.at,ti.com,linutronix.de,kernel.org,goodmis.org,pengutronix.de,gmail.com];
RCVD_TLS_LAST(0.00)[];
MIME_TRACE(0.00)[0:+];
RCVD_VIA_SMTP_AUTH(0.00)[]
X-Rspamd-Queue-Id: 8F6F41C241D
X-MORS-Enabled: yes
X-MORS-DOMAIN: patchwork.local
X-MORS-HOSTING: hosting172546
X-MORS-USER: hosting172546
X-getmail-retrieved-from-mailbox: INBOX
|
| Series |
mtd: rawnand: sunxi: fix transfers and support randomized OOB
|
|
Commit Message
James Hilliard
Nov. 5, 2026, 6:55 p.m. UTC
Extra OOB is the spare-area tail after the last ECC step's protected
user data and parity. The PIO write loop tracks cur_off as an absolute
NAND column, starting at zero in the main-data area. The extra-OOB
helper instead compares it with an offset relative to the OOB start. It
therefore requests a column change even when the last step has already
reached the tail.
Add mtd->writesize to the comparison, as the read helper already does.
The comparison and the column-change command then refer to the same
byte. Keep the command when the cursor differs or is unknown, including
the DMA path, which passes no cursor. No transferred data or OOB layout
changes.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
drivers/mtd/nand/raw/sunxi_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 11fdc10c7f14..c9135c8abf54 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -1718,7 +1718,7 @@ static int sunxi_nfc_hw_ecc_write_extra_oob(struct nand_chip *nand, if (len <= 0) return 0; - if (!cur_off || *cur_off != offset) { + if (!cur_off || *cur_off != (offset + mtd->writesize)) { ret = nand_change_write_column_op(nand, offset + mtd->writesize, NULL, 0, false); if (ret)