get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2194188/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2194188,
    "url": "http://patchwork.ozlabs.org/api/patches/2194188/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/aYbjk7vRA/gMZPSx@DESKTOP-TIT0J8O.localdomain/",
    "project": {
        "id": 3,
        "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api",
        "name": "Linux MTD development",
        "link_name": "linux-mtd",
        "list_id": "linux-mtd.lists.infradead.org",
        "list_email": "linux-mtd@lists.infradead.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<aYbjk7vRA/gMZPSx@DESKTOP-TIT0J8O.localdomain>",
    "list_archive_url": null,
    "date": "2026-02-07T07:02:43",
    "name": "[v2] mtd: nand: realtek-ecc: relax OOB size check to minimum",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e7cf22ff51f327260a3ef10d2d770f0bd2205a58",
    "submitter": {
        "id": 92217,
        "url": "http://patchwork.ozlabs.org/api/people/92217/?format=api",
        "name": "Ahmed Naseef",
        "email": "naseefkm@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/aYbjk7vRA/gMZPSx@DESKTOP-TIT0J8O.localdomain/mbox/",
    "series": [
        {
            "id": 491363,
            "url": "http://patchwork.ozlabs.org/api/series/491363/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=491363",
            "date": "2026-02-07T07:02:43",
            "name": "[v2] mtd: nand: realtek-ecc: relax OOB size check to minimum",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/491363/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2194188/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2194188/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mO9J26Si;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=mLbohfi1;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f7MQW5DwGz1xtV\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 07 Feb 2026 18:04:31 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vocMS-0000000CCFV-0CNT;\n\tSat, 07 Feb 2026 07:04:08 +0000",
            "from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vocMO-0000000CCF4-2J9L\n\tfor linux-mtd@lists.infradead.org;\n\tSat, 07 Feb 2026 07:04:06 +0000",
            "by mail-pf1-x42d.google.com with SMTP id\n d2e1a72fcca58-823075fed75so1706905b3a.1\n        for <linux-mtd@lists.infradead.org>;\n Fri, 06 Feb 2026 23:04:04 -0800 (PST)",
            "from DESKTOP-TIT0J8O.localdomain ([49.47.198.227])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-824418b60easm4250622b3a.55.2026.02.06.23.03.56\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 06 Feb 2026 23:04:02 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From\n\t:Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=zfrTqOSUG7AD+lakq500tzmKNF21DsNTmAF+QN+Ny/E=; b=mO9J26SiYVikGg\n\tcROvERRJxBLjdUoVjp9fFMhVElqUtTQdLegeCfdAgpH1DsXqr6Cl3sTy66D0H8Q807rkbIyXEI7FJ\n\tGCLw6GoGJ3LOeAJD+iV1tVNeV0pCYMM+PCH6GuqJtVMA1c/DHq4db8D9LcpsEjPoTN+/+Re6S/Oh1\n\tB9Whujjh5fp/5CbW33Hi5SifNc2nMWTU3aOEknlDT85BHVbC1N+DGKqxCiGOUrbdwtWpIJhQSOIW4\n\ttGb/3+IYi4rJaI1IsKUpbDkx9tLnLKW0ITjg+nZ/t6x5Pt8nq0zG55g4QLJAZSlg/ISuzdFNyT09Q\n\t4eQrWXUQJAlkbvyjWrTA==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20230601; t=1770447843; x=1771052643;\n darn=lists.infradead.org;\n        h=content-disposition:mime-version:message-id:subject:to:from:date\n         :from:to:cc:subject:date:message-id:reply-to;\n        bh=09LJ83o11Ex+v61x2aS+6WHjo6AYzF1e7mZQxiT7CPg=;\n        b=mLbohfi1vh3eESZRGsE+8YKGHttTSsj/c9e+QQJswEmPZJZ+UdeHuvCHldUtBVQxQu\n         f3YMEv6taO+itMuKmJ0BbHSWmA6c5zrBy9GNky3/jkLo7S6a1c+wtvE74DDdOlX0B79B\n         Ty9hwDT2CxGJR5ILLEKHzL0CKHUpRMwlz3AtjAysNE5K0r8E4jq2zvXtNMKK0/dvSpnf\n         g5chlpif1l0775bb0NW05DJKF/5sBAAUC1x+QkemBWGjKCe1DT5OOmT26oLe0dhZuiZ3\n         kUO1GdRU+dt49Y71NOK+8PtrBH3YiOusaRm0Ue9yEqV7SaCUBy+ZitgEZ4Lx9ZpvZE6k\n         UHeA=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20230601; t=1770447843; x=1771052643;\n        h=content-disposition:mime-version:message-id:subject:to:from:date\n         :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=09LJ83o11Ex+v61x2aS+6WHjo6AYzF1e7mZQxiT7CPg=;\n        b=a6dihZ5q/d9udm2AS8Al2T7X6e57C9V3prhz1BrCi6C0eXod0TmlXTQJxMkFCGOhyA\n         EWuDx8vBvitI6q+pQ4c9T+y2JbjSLgfsiv1ck79tA8umsXlK6tkf0d/ErTQQlf648dkD\n         rx2PyGHAF9FGWRA/x2AgkshX93tPVm6numx6zrqsNFQMWIrmZlXr16ufhdOyUw65UITs\n         VaMi3x0gzq2qzKs0d5G/ymmFIpTsDn20fSOJLiDnV0GxdWuiQqM8T5rdlQ0oOcv4fi6L\n         RujhZr4XmSMLWQxdvw6+VXFKQa1whsf2gYVoaKQJnSlqiYsE2pljopCzODm8ro79ontc\n         GRew==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCUnbB/707ZuRyTkpExOfPhNEIvBNrofoDRtIuu5qKfEXLCSMBn+sMetnu315DUa/JfA4yVaOtqQaNo=@lists.infradead.org",
        "X-Gm-Message-State": "AOJu0YynEP6hP7oRShaMZ3gskUsYOWjwR+2f6GEj1bcaQ7abWECjBRxK\n\tb7xxY+6CzdZ0CI6qqKwtbmF7Dd5s4jwoFZ+gf948PKhN8sWaTVvJhN+N",
        "X-Gm-Gg": "AZuq6aKNazUtwFaCyaOtvoDQ5hF9I8nJtQtaxWj2jFivZoNFG9ndxUyOk05jJNPikdV\n\tF31goeacK84KWz8G/rD0E50p+/P39jrRXdRJ16v7ZfoZDSwWUJgKBaHLTwGQdrPDXuPQDXlhcKY\n\tOBe87Fygs+CFqlzBaHxWkgDc8Dig2GM5OawLtdPCEqrXyAl7Z2Z90GX9GqZLt91clZm2oOsUgMZ\n\tlNxxAM4XugcJOi/a6/GIFLU2xlrSLDgEGDtoNJPQ32Aa221znKL6yjdHoceUvaXRwKuidirNUKw\n\tWG8/B0lu0fNW9qy6+i6zQobkj9468Usnv23i89XvO1yb7Ah2FNZDm0pG3PiU6ssWcrkIzRKN4C/\n\tNzUl53D08KXoOZ6ecSKsE0zD7myQDAZuc6g92YcOtQfCp7zaocIdsQWtYUbePpNMXTqfaDeqnFY\n\tDzzD+q4FvBazbOezzS+yurq44PI8w/soiubltahTs=",
        "X-Received": "by 2002:a05:6a00:228c:b0:822:69b2:7ed0 with SMTP id\n d2e1a72fcca58-82440c1d429mr5231599b3a.6.1770447843215;\n        Fri, 06 Feb 2026 23:04:03 -0800 (PST)",
        "Date": "Sat, 7 Feb 2026 11:02:43 +0400",
        "From": "Ahmed Naseef <naseefkm@gmail.com>",
        "To": "Miquel@desktop-tit0j8o.localdomain, Raynal@desktop-tit0j8o.localdomain,\n\tmiquel.raynal@bootlin.com, Richard@desktop-tit0j8o.localdomain,\n\tWeinberger@desktop-tit0j8o.localdomain, richard@nod.at,\n\tVignesh@desktop-tit0j8o.localdomain,\n\tRaghavendra@desktop-tit0j8o.localdomain, vigneshr@ti.com,\n\tlinux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tMarkus Stockhausen <markus.stockhausen@gmx.de>, naseefkm@gmail.com",
        "Subject": "[PATCH v2] mtd: nand: realtek-ecc: relax OOB size check to minimum",
        "Message-ID": "<aYbjk7vRA/gMZPSx@DESKTOP-TIT0J8O.localdomain>",
        "MIME-Version": "1.0",
        "Content-Disposition": "inline",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260206_230405_224451_34F6848B ",
        "X-CRM114-Status": "GOOD (  17.48  )",
        "X-Spam-Score": "-2.1 (--)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  The ECC engine strictly validates that flash OOB size\n equals\n    exactly 64 bytes. However,\n some NAND chips have a larger physical OOB while\n    vendor firmware only uses the first 64 bytes for the ECC layout [...]\n Content analysis details:   (-2.1 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail\n provider\n                             [naseefkm(at)gmail.com]\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2607:f8b0:4864:20:0:0:0:42d listed in]\n                             [list.dnswl.org]",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>",
        "List-Post": "<mailto:linux-mtd@lists.infradead.org>",
        "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>",
        "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "The ECC engine strictly validates that flash OOB size equals exactly\n64 bytes. However, some NAND chips have a larger physical OOB while\nvendor firmware only uses the first 64 bytes for the ECC layout. For\nexample the Macronix MX35LF1G24AD found in the Netlink HG323DAC has\n128 byte physical OOB but vendor firmware only uses the first 64\nbytes (24 bytes free + 40 bytes BCH6 parity), leaving bytes 64-127\nunused.\n\nSince the engine only operates on the first 64 bytes of OOB\nregardless of the physical size, change the check from exact match\nto minimum size. Flash with OOB >= 64 bytes works correctly with\nthe engine's 64-byte layout.\n\nSuggested-by: Markus Stockhausen <markus.stockhausen@gmx.de>\nSigned-off-by: Ahmed Naseef <naseefkm@gmail.com>\n---\nOn the Netlink HG323DAC with the Macronix MX35LF1G24AD (ID: 0xc2,\n0x14), the Realtek ECC engine probe fails with:\n\n  spi-nand spi0.0: Macronix SPI NAND was found.\n  spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 128\n  rtl-nand-ecc-engine 1801a600.ecc: only flash geometry data=2048, oob=64 supported\n  nand: No suitable ECC configuration\n  spi-nand spi0.0: probe with driver spi-nand failed with error -22\n\nThe chip has 128 bytes of physical OOB but the OEM firmware only uses\n64 bytes (24 free + 40 BCH6 parity). The OEM bootlog confirms:\n\n  nand: device found, Manufacturer ID: 0xc2, Chip ID: 0x14\n  nand: Macronix\n  nand: 128MiB, SLC, page size: 2048, OOB size: 64\n\nThe rtl9607c GPL sources have no specific entry for chip ID 0x14 in\nthe Macronix SPI NAND table and fall back to the default 64-byte\nspare configuration with BCH6 ECC.\n\nI verified this by booting an OpenWrt initramfs with the ECC engine\ndisabled and inspecting raw OOB via nanddump --noecc --oob. Both\nthe env and kernel partitions confirm the OEM layout uses only the\nfirst 64 bytes:\n\n  - OOB[0:23]:   24 bytes free  (4 steps x 6 bytes)\n  - OOB[24:63]:  40 bytes BCH6 parity (4 steps x 10 bytes)\n  - OOB[64:127]: unused (all 0xFF)\n\nThis matches the engine's expected format exactly. Since the engine\nonly operates on the first 64 bytes, the relaxation from exact match\nto minimum size is safe for any flash with OOB >= 64.\n\nChanges in v2:\n  - Reorder Suggested-by before Signed-off-by\n  - Update driver comment per Markus's review\n\n drivers/mtd/nand/ecc-realtek.c | 18 ++++++++++--------\n 1 file changed, 10 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/mtd/nand/ecc-realtek.c b/drivers/mtd/nand/ecc-realtek.c\nindex 0046da37e..7d003fd72 100644\n--- a/drivers/mtd/nand/ecc-realtek.c\n+++ b/drivers/mtd/nand/ecc-realtek.c\n@@ -17,10 +17,12 @@\n  * - BCH12 : Generate 20 ECC bytes from 512 data bytes plus 6 free bytes\n  *\n  * It can run for arbitrary NAND flash chips with different block and OOB sizes. Currently there\n- * are only two known devices in the wild that have NAND flash and make use of this ECC engine\n- * (Linksys LGS328C & LGS352C). To keep compatibility with vendor firmware, new modes can only\n- * be added when new data layouts have been analyzed. For now allow BCH6 on flash with 2048 byte\n- * blocks and 64 bytes oob.\n+ * are a few known devices in the wild that make use of this ECC engine\n+ * (Linksys LGS328C, LGS352C & Netlink HG323DAC). To keep compatibility with vendor firmware,\n+ * new modes can only be added when new data layouts have been analyzed. For now allow BCH6 on\n+ * flash with 2048 byte blocks and at least 64 bytes oob. Some vendors make use of\n+ * 128 bytes OOB NAND chips (e.g. Macronix MX35LF1G24AD) but only use BCH6 and thus the first\n+ * 64 bytes of the OOB area. In this case the engine leaves any extra bytes unused.\n  *\n  * This driver aligns with kernel ECC naming conventions. Neverthless a short notice on the\n  * Realtek naming conventions for the different structures in the OOB area.\n@@ -39,7 +41,7 @@\n  */\n \n #define RTL_ECC_ALLOWED_PAGE_SIZE \t2048\n-#define RTL_ECC_ALLOWED_OOB_SIZE\t64\n+#define RTL_ECC_ALLOWED_MIN_OOB_SIZE\t64\n #define RTL_ECC_ALLOWED_STRENGTH\t6\n \n #define RTL_ECC_BLOCK_SIZE \t\t512\n@@ -310,10 +312,10 @@ static int rtl_ecc_check_support(struct nand_device *nand)\n \tstruct mtd_info *mtd = nanddev_to_mtd(nand);\n \tstruct device *dev = nand->ecc.engine->dev;\n \n-\tif (mtd->oobsize != RTL_ECC_ALLOWED_OOB_SIZE ||\n+\tif (mtd->oobsize < RTL_ECC_ALLOWED_MIN_OOB_SIZE ||\n \t    mtd->writesize != RTL_ECC_ALLOWED_PAGE_SIZE) {\n-\t\tdev_err(dev, \"only flash geometry data=%d, oob=%d supported\\n\",\n-\t\t\tRTL_ECC_ALLOWED_PAGE_SIZE, RTL_ECC_ALLOWED_OOB_SIZE);\n+\t\tdev_err(dev, \"only flash geometry data=%d, oob>=%d supported\\n\",\n+\t\t\tRTL_ECC_ALLOWED_PAGE_SIZE, RTL_ECC_ALLOWED_MIN_OOB_SIZE);\n \t\treturn -EINVAL;\n \t}\n \n",
    "prefixes": [
        "v2"
    ]
}