Re: [PATCH v10 01/26] mtd: rawnand: sunxi: centralize OOB handling
From: Miquel Raynal
Date: Thu Nov 19 2026 - 07:29:46 EST
On 05/11/2026 at 19:13:20 GMT, sashiko-bot@xxxxxxxxxx wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [High] mtd: rawnand: sunxi: premature oob_ops selection in sunxi_nand_attach_chip()
> - [Medium] mtd: rawnand: sunxi: unaddressed maintainer NACK on vendor OOB layout ops
> --
>
> commit 8fda5c99d9befa1771418516828f040de60c5845
> Author: James Hilliard <james.hilliard1@xxxxxxxxx>
>
> mtd: rawnand: sunxi: centralize OOB handling
>
> This commit centralizes hardware ECC result interpretation, protected OOB
> retrieval, erased-chunk checking, and user-data layout reservation behind
> per-chip sunxi_nfc_oob_ops callbacks for both PIO and DMA paths.
>
>> diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
>> index f41feebe42571..80006d1a33d68 100644
>> --- a/drivers/mtd/nand/raw/sunxi_nand.c
>> +++ b/drivers/mtd/nand/raw/sunxi_nand.c
> [ ... ]
>> @@ -2066,6 +2096,58 @@ static int sunxi_nfc_maximize_user_data(struct
>> nand_chip *nand, uint32_t oobsize
> [ ... ]
>> +/*
>> + * Both modes use the same layout and ECC policy. Scrambled transfers also
>> + * compensate the first two user bytes to keep the on-flash BBM unmodified.
>> + */
>> +static const struct sunxi_nfc_oob_ops sunxi_nfc_plain_oob_ops = {
>> + .min_user_data = sunxi_nfc_oob_min_user_data,
>> + .init_user_data = sunxi_nfc_oob_init_user_data,
>> + .read_batch = sunxi_nfc_oob_read_batch,
>> + .finish_read = sunxi_nfc_oob_finish_read,
>> +};
>> +
>> +static const struct sunxi_nfc_oob_ops sunxi_nfc_scrambled_plain_bbm_oob_ops = {
>> + .min_user_data = sunxi_nfc_oob_min_user_data,
>> + .init_user_data = sunxi_nfc_oob_init_user_data,
>> + .transform_bbm = sunxi_nfc_randomize_bbm,
>> + .read_batch = sunxi_nfc_oob_read_batch,
>> + .finish_read = sunxi_nfc_oob_finish_read,
>> +};
>
> [Severity: Medium]
> As reported by Miquel Raynal on v6 [1], the series adding support for the
> vendor-specific Allwinner randomized OOB layout was declined due to
> maintainability concerns and kernel policy against vendor-specific NAND
> layouts, with an invitation to submit only the standalone fixes outside of
> the randomized layout support.
I hereby confirm that I do not which to merge the support for this
layout.
Please drop it from your series.
Thanks,
Miquèl