get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2220287,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220287/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260406-mtk-spi-nor-improvements-v1-7-66f675cbbd3e@baylibre.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260406-mtk-spi-nor-improvements-v1-7-66f675cbbd3e@baylibre.com>",
    "date": "2026-04-06T20:13:33",
    "name": "[7/8] spi: mtk_snor: fix zeroed data in DMA read bounce path",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "003879f91594aa5523af29fd76ccbd50747f2ef6",
    "submitter": {
        "id": 87228,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/87228/?format=api",
        "name": "David Lechner",
        "email": "dlechner@baylibre.com"
    },
    "delegate": {
        "id": 161331,
        "url": "http://patchwork.ozlabs.org/api/1.1/users/161331/?format=api",
        "username": "dlech",
        "first_name": "David",
        "last_name": "Lechner",
        "email": "dlechner@baylibre.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260406-mtk-spi-nor-improvements-v1-7-66f675cbbd3e@baylibre.com/mbox/",
    "series": [
        {
            "id": 498893,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/498893/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=498893",
            "date": "2026-04-06T20:13:26",
            "name": "spi: mtk_snor: various fixes and improvements",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498893/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2220287/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2220287/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "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 unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=cX232ebJ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20251104.gappssmtp.com\n header.i=@baylibre-com.20251104.gappssmtp.com header.b=\"cX232ebJ\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=dlechner@baylibre.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\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 4fqLD75wr0z1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 06:15:19 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id EFA8884105;\n\tMon,  6 Apr 2026 22:14:52 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 7A69C83C2B; Mon,  6 Apr 2026 22:14:46 +0200 (CEST)",
            "from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com\n [IPv6:2607:f8b0:4864:20::32b])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id AD49284129\n for <u-boot@lists.denx.de>; Mon,  6 Apr 2026 22:14:39 +0200 (CEST)",
            "by mail-ot1-x32b.google.com with SMTP id\n 46e09a7af769-7d556c1a79eso5559336a34.3\n for <u-boot@lists.denx.de>; Mon, 06 Apr 2026 13:14:39 -0700 (PDT)",
            "from [127.0.1.1] ([2600:8803:e7e4:500:90d7:b13f:c53:8ca3])\n by smtp.gmail.com with ESMTPSA id\n 006d021491bc7-68597f6c7bdsm2642044eaf.3.2026.04.06.13.14.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 06 Apr 2026 13:14:37 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1775506478;\n x=1776111278;\n darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=Qu3c4s/89QU8gqEtybf2wBrHTswUYO3W72yymMWaZpE=;\n b=cX232ebJ/1JisVA6Fv5My3IvcPmxeE1U+Uvh6N6r0miIsJXmfS5QgCCePP47Jzm0pp\n +IDObtXODY2QFCuR3iZUbB5Jx0wDCwV5S+Fb/cgFwTSqNcbTEuIwcWiXk8cLDsBh/d/n\n uoGH8WT/Wpb/H/FKW8nQneq+epjSxwLl3TAkYPy5XR3Msz2bViNoAzIBvMZUDm1BIZp2\n mBw9OcSpz/1fhYHnVZ2KIblsZ5wt8miSKTJ9pNH6vYI6zZO7elkEuj+muDcbjGEF6xP8\n JQ5wRQl5+otrkWLux8KIfN3lbTLd5hKIgjVFxvO0do6gQGBRj2VjRMvKrLriHNp1kEp5\n opmA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775506478; x=1776111278;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=Qu3c4s/89QU8gqEtybf2wBrHTswUYO3W72yymMWaZpE=;\n b=QdOU6Knfr050jwPAOXYLcX8ixd7vmQg0jHJExQnlHbuTprPOOovOdxj1Zr54iy51av\n jpSspm5Iyy/bcIG5eamDuaVMW2GAFpRkbwfdc3zU5UCghvOj4RwXAworzWtAPnsyTPYK\n XqcH01/jvlg+PuNYN18rkrXhm60Sp1Ke59XCAUJ+qQb4d9pnRxvOIeOS/RuokKPTMNtu\n MmuB1JVdFErzoovoeOOFDGZmGQ2ZP45INE80IwnT0ikwGrrtRsMhQF5UJoBZ4kESRl+g\n yfi73XstzZE+hvl4WLQ1q8SwcVTWU4+A7kRPt9Fkg+w5hSCQ6fs9Osud7ztypQy91iKv\n azaA==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCU8zsftxrSbRcc8muVpKl6U4lfAHySSfA2MvUjmA6jZG46IOn2+bIeaySu3ykNNoxPtHrsefbk=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YzV+cT8VlhSORCKPRnBpTUdmsf/76VDOzwWzspurjreEbxGz+Jq\n cwLorabPZw/WSQrXuwrazKKqOAE/BJtvxW78jMZmdDYifSM36Q603dX8V4rDdF6Ru/mGcVaQshI\n lnZpt",
        "X-Gm-Gg": "AeBDiesOvbN8Wx5n2mtIaEQrvKPdQtf37B1p+V5OZ0wLmqGnGajZy50MUIHUD9WAjCr\n FXikfD4HiZy3s/PfPHR/WPVHFLmy5ihgtdJ9NNsxrcy9tyoGpmxdqA9RKB5APLa+fBWBCBQhRxy\n Zrxe5QAochHqOQ5eDkbCBiP+U8XPCjQGDh0XNtNvofFT0n+pA4A6H4B+5mAfj8V92AS2j/o5DL4\n 9NT7sTt0kY1cQD08pct8SAMji7VCUfaJRIvaeKqaIDdeQGmqLP1Ws7fubWlp36/W6CyCc8pAlen\n VHM28WJDmXnlVvXqy0AOvcpedHlNj2oLQU2/a5cyt+fKok05UnT8/io1RzVdRqmIVcCFIWe7IhR\n tcm2Hs34N/iKbpqhWHPYOjnuW6rsePqzMoS3W4KrinUCkbhqxpc4LKQlxvwblrQV2zl6qx77v+Q\n zWif0OU9IyCcc6kOLVrEs/E49JVW0=",
        "X-Received": "by 2002:a05:6820:1842:b0:67b:f12a:dfcb with SMTP id\n 006d021491bc7-6822103c55fmr7303982eaf.60.1775506478211;\n Mon, 06 Apr 2026 13:14:38 -0700 (PDT)",
        "From": "David Lechner <dlechner@baylibre.com>",
        "Date": "Mon, 06 Apr 2026 15:13:33 -0500",
        "Subject": "[PATCH 7/8] spi: mtk_snor: fix zeroed data in DMA read bounce path",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260406-mtk-spi-nor-improvements-v1-7-66f675cbbd3e@baylibre.com>",
        "References": "<20260406-mtk-spi-nor-improvements-v1-0-66f675cbbd3e@baylibre.com>",
        "In-Reply-To": "\n <20260406-mtk-spi-nor-improvements-v1-0-66f675cbbd3e@baylibre.com>",
        "To": "Ryder Lee <ryder.lee@mediatek.com>, Weijie Gao <weijie.gao@mediatek.com>,\n Chunfeng Yun <chunfeng.yun@mediatek.com>,\n Igor Belwon <igor.belwon@mentallysanemainliners.org>,\n GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,\n Tom Rini <trini@konsulko.com>",
        "Cc": "Julien Stephan <jstephan@baylibre.com>, u-boot@lists.denx.de,\n David Lechner <dlechner@baylibre.com>,\n Macpaul Lin <macpaul.lin@mediatek.com>",
        "X-Mailer": "b4 0.16-dev",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=1828; i=dlechner@baylibre.com;\n h=from:subject:message-id;\n bh=Ym/43kEQ32E/Ssd910K4K9MkAObkG/hxqt9ER0AK6ng=;\n b=owEBhAF7/pANAwAKAcLMIAH/AY/AAcsmYgBp1BQZQ5hgipq3t+9DbSZ9u8lKTpfM/p/uyeS77\n ZzxlpWGOg6JAUoEAAEKADQWIQTsGNmeYg6D1pzYaJjCzCAB/wGPwAUCadQUGRYcZGxlY2huZXJA\n YmF5bGlicmUuY29tAAoJEMLMIAH/AY/AZjwH/2i/tySorGfaUiIdtXxLZVlDo7juU+GLgtbbO3e\n 4J6HlKTsmHaolNu8XHLX0FmPIetqy+V7HQfYsPBLxYI/DTIw2d7iyFAwwsLLUgOCelIE4ILxgDQ\n NX4NYyFgTAHYvL5tB4KrC/GWcrMZlyFC3m9P4KAlK+Nz370N13H64Uts8eXJVYTer2oGTT4gzJu\n K75GLmtScxPiYHTT765VNbbCnvrZyLWv6KDrxDGJ7bGRA2dOysEnlIO2EkRXjWfXw9Rfuk3OFME\n g9gbRDObv0nm88hoV8W0rDNld9HmWcg9VVWfTQs4WW5ZyllkReOiqO35F6f5zSm5CiBrFbrjJn2\n G7KY=",
        "X-Developer-Key": "i=dlechner@baylibre.com; a=openpgp;\n fpr=8A73D82A6A1F509907F373881F8AF88C82F77C03",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "From: Macpaul Lin <macpaul.lin@mediatek.com>\n\nImplement proper bounce buffer handling for the read path to fix zeroed\ndata when using DMA. In the bounce path, map the bounce buffer with\ndma_map_single(), perform DMA using bounce_dma, then copy data from the\nbounce buffer to the user buffer, and finally unmap with\ndma_unmap_single().\n\nSigned-off-by: Macpaul Lin <macpaul.lin@mediatek.com>\nSigned-off-by: David Lechner <dlechner@baylibre.com>\n---\n drivers/spi/mtk_snor.c | 17 ++++++++++++++---\n 1 file changed, 14 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/spi/mtk_snor.c b/drivers/spi/mtk_snor.c\nindex 649bca5716c..21ac115e3c3 100644\n--- a/drivers/spi/mtk_snor.c\n+++ b/drivers/spi/mtk_snor.c\n@@ -274,6 +274,7 @@ static int mtk_snor_read_bounce(struct mtk_snor_priv *priv,\n {\n \tunsigned int rdlen;\n \tint ret;\n+\tdma_addr_t bounce_dma;\n \n \tif (op->data.nbytes & MTK_NOR_DMA_ALIGN_MASK)\n \t\trdlen = (op->data.nbytes + MTK_NOR_DMA_ALIGN) &\n@@ -281,11 +282,21 @@ static int mtk_snor_read_bounce(struct mtk_snor_priv *priv,\n \telse\n \t\trdlen = op->data.nbytes;\n \n-\tret = mtk_snor_dma_exec(priv, op->addr.val, rdlen,\n-\t\t\t\t(dma_addr_t)priv->buffer);\n+\t/* Map bounce buffer for DMA */\n+\tbounce_dma = dma_map_single(priv->buffer, rdlen, DMA_FROM_DEVICE);\n+\tif (dma_mapping_error(priv->dev, bounce_dma)) {\n+\t\tdev_err(priv->dev, \"bounce buffer dma map failed\\n\");\n+\t\treturn -EINVAL;\n+\t}\n \n-\tif (!ret)\n+\tret = mtk_snor_dma_exec(priv, op->addr.val, rdlen, bounce_dma);\n+\t/* Ensure DMA writes are visible to CPU and copy the requested bytes */\n+\tif (!ret) {\n+\t\t/* Synchronize cached data to CPU visible memory if needed */\n \t\tmemcpy(op->data.buf.in, priv->buffer, op->data.nbytes);\n+\t}\n+\t/* Unmap bounce buffer regardless of success/failure */\n+\tdma_unmap_single(bounce_dma, rdlen, DMA_FROM_DEVICE);\n \n \treturn ret;\n }\n",
    "prefixes": [
        "7/8"
    ]
}