get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2221945,
    "url": "http://patchwork.ozlabs.org/api/patches/2221945/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260410-sdxi-base-v1-9-1d184cb5c60a@amd.com/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api",
        "name": "Linux PCI development",
        "link_name": "linux-pci",
        "list_id": "linux-pci.vger.kernel.org",
        "list_email": "linux-pci@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260410-sdxi-base-v1-9-1d184cb5c60a@amd.com>",
    "list_archive_url": null,
    "date": "2026-04-10T13:07:19",
    "name": "[09/23] dmaengine: sdxi: Start functions on probe, stop on remove",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "138ad67921888b3a3fd5131a2f5a977cf7ea34b3",
    "submitter": {
        "id": 91626,
        "url": "http://patchwork.ozlabs.org/api/people/91626/?format=api",
        "name": "Nathan Lynch via B4 Relay",
        "email": "devnull+nathan.lynch.amd.com@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260410-sdxi-base-v1-9-1d184cb5c60a@amd.com/mbox/",
    "series": [
        {
            "id": 499458,
            "url": "http://patchwork.ozlabs.org/api/series/499458/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=499458",
            "date": "2026-04-10T13:07:10",
            "name": "dmaengine: Smart Data Accelerator Interface (SDXI) basic support",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499458/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221945/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221945/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-52320-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pci@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=aRGKWaj2;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-52320-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"aRGKWaj2\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\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 4fsccN28Vrz1yGS\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 23:10:44 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 59647305615F\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 13:07:57 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 937023A7F4F;\n\tFri, 10 Apr 2026 13:07:50 +0000 (UTC)",
            "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D93738F24D;\n\tFri, 10 Apr 2026 13:07:50 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPS id 14C56C19425;\n\tFri, 10 Apr 2026 13:07:50 +0000 (UTC)",
            "from aws-us-west-2-korg-lkml-1.web.codeaurora.org\n (localhost.localdomain [127.0.0.1])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id 0D9F5F44858;\n\tFri, 10 Apr 2026 13:07:50 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775826470; cv=none;\n b=Oegb+CM8Xh8EQs29k5wD6eg2cEbrlUkxzfFM/seHqqME3ydWvab9Zxl8TQluFS1JATrgm8CjMm2IPS09uOjK2PIZcfm2KPO75TVsXdv0JM1RcqVz2/++y28JwLr7gsw9Lw31dVxMTD8/CBmHBiNBbQyo/JbvCnbXm8Q0cAAj334=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775826470; c=relaxed/simple;\n\tbh=V269iSWamQ+V3xAvUpVPYoSFAHipEOt7nBe12tvebDI=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=a17rHpRDucM9Fh4qbN0fbQRTchJQML1+COmTRsuCdKp2sz9zU8GNwfwrRIW2tGkIe9WAmLLh6DQ7wCovuoDcOaR4PQRDbMkx3a2Oszh0CLnphpYlFONjfMW7JjLMFsSMOtE/62Kljp6n484Uca62U5OeZpzJiv5nIgcoZw39tho=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=aRGKWaj2; arc=none smtp.client-ip=10.30.226.201",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775826470;\n\tbh=V269iSWamQ+V3xAvUpVPYoSFAHipEOt7nBe12tvebDI=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From;\n\tb=aRGKWaj2FrTRTP20mqOTeI0dgl8qk57a8yGgLw7Q9cuc5rurpI0N6HuqHeb4a0KWp\n\t etLvh5etLSsqBI0lr2VkSoXv6UcjZVQfIWTzg+fXY4IJuFx0mCHDl+5TcxRxiaxXhk\n\t 1Qfp8Y5nFbeNex3tOsprEy5rXA94op18Y07tjjfJq2rpQa301Q4BNd3OCwDmg+4NJr\n\t E5FYQx0odMgvvU7Dhi5wf6I7xXDfE4OnAPPg41F9AiMKjBKB6TThdKNo2JA002mdZQ\n\t A7VifAKEpIbZ2oGE++12aXgOGH4IX5crd7XY4cxblsgU91cP4nQscdHGhwntco6kb2\n\t Xib6F5q3CpSlw==",
        "From": "Nathan Lynch via B4 Relay <devnull+nathan.lynch.amd.com@kernel.org>",
        "Date": "Fri, 10 Apr 2026 08:07:19 -0500",
        "Subject": "[PATCH 09/23] dmaengine: sdxi: Start functions on probe, stop on\n remove",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pci@vger.kernel.org",
        "List-Id": "<linux-pci.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260410-sdxi-base-v1-9-1d184cb5c60a@amd.com>",
        "References": "<20260410-sdxi-base-v1-0-1d184cb5c60a@amd.com>",
        "In-Reply-To": "<20260410-sdxi-base-v1-0-1d184cb5c60a@amd.com>",
        "To": "Vinod Koul <vkoul@kernel.org>",
        "Cc": "Wei Huang <wei.huang2@amd.com>,\n Mario Limonciello <mario.limonciello@amd.com>,\n Bjorn Helgaas <bhelgaas@google.com>,\n Jonathan Cameron <jonathan.cameron@huawei.com>,\n Stephen Bates <Stephen.Bates@amd.com>, PradeepVineshReddy.Kodamati@amd.com,\n John.Kariuki@amd.com, linux-pci@vger.kernel.org,\n linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,\n Nathan Lynch <nathan.lynch@amd.com>",
        "X-Mailer": "b4 0.15.2",
        "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1775826467; l=4243;\n i=nathan.lynch@amd.com; s=20260410; h=from:subject:message-id;\n bh=tB3lqNofDjvSRvVs4sn03HUYBVpXqToogjCQBXepPAM=;\n b=b5aLYMANEMiSYqDAU4NLy+2HAooZQ0C2iqepz1Ikojjx9AT7Fb74R8g9wi+JuP/T0Da713jc9\n dIsCjDhA5gnCofDaMil2HHZzDQUIlR6/RknaonzuUQpSxTa4Lm6rT89",
        "X-Developer-Key": "i=nathan.lynch@amd.com; a=ed25519;\n pk=PK4ozhq+/z9/2Jl5rgDmvHa9raVomv79qM8p1RAFpEw=",
        "X-Endpoint-Received": "by B4 Relay for nathan.lynch@amd.com/20260410 with\n auth_id=728",
        "X-Original-From": "Nathan Lynch <nathan.lynch@amd.com>",
        "Reply-To": "nathan.lynch@amd.com"
    },
    "content": "From: Nathan Lynch <nathan.lynch@amd.com>\n\nFollowing admin context setup in the previous patch, drive each SDXI\nfunction to active state during probe. This is done by writing\nGSRV_ACTIVE to MMIO_CTL0.fn_gsr and polling MMIO_STS0.fn_gsv until the\nfunction reaches GSV_ACTIVE or an error state. A 1-second timeout has\nbeen sufficient in practice so far.\n\nIntroduce sdxi_unregister() to stop the function during remove and wire\nit up via the pci_driver .remove callback.\n\nCo-developed-by: Wei Huang <wei.huang2@amd.com>\nSigned-off-by: Wei Huang <wei.huang2@amd.com>\nSigned-off-by: Nathan Lynch <nathan.lynch@amd.com>\n---\n drivers/dma/sdxi/device.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++-\n drivers/dma/sdxi/pci.c    |  6 +++++\n drivers/dma/sdxi/sdxi.h   |  1 +\n 3 files changed, 62 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/dma/sdxi/device.c b/drivers/dma/sdxi/device.c\nindex 636abc410dcd..145aa098c269 100644\n--- a/drivers/dma/sdxi/device.c\n+++ b/drivers/dma/sdxi/device.c\n@@ -67,6 +67,49 @@ static void sdxi_write_fn_gsr(struct sdxi_dev *sdxi, enum sdxi_fn_gsr cmd)\n \tsdxi_write64(sdxi, SDXI_MMIO_CTL0, ctl0);\n }\n \n+static int sdxi_dev_start(struct sdxi_dev *sdxi)\n+{\n+\tunsigned long deadline;\n+\tenum sdxi_fn_gsv status;\n+\n+\tstatus = sdxi_dev_gsv(sdxi);\n+\tif (status != SDXI_GSV_STOP) {\n+\t\tsdxi_err(sdxi,\n+\t\t\t \"can't activate busy device (unexpected gsv: %s)\\n\",\n+\t\t\t gsv_str(status));\n+\t\treturn -EIO;\n+\t}\n+\n+\tsdxi_write_fn_gsr(sdxi, SDXI_GSRV_ACTIVE);\n+\n+\tdeadline = jiffies + msecs_to_jiffies(1000);\n+\tdo {\n+\t\tstatus = sdxi_dev_gsv(sdxi);\n+\t\tsdxi_dbg(sdxi, \"%s: function state: %s\\n\", __func__, gsv_str(status));\n+\n+\t\tswitch (status) {\n+\t\tcase SDXI_GSV_ACTIVE:\n+\t\t\tsdxi_dbg(sdxi, \"activated\\n\");\n+\t\t\treturn 0;\n+\t\tcase SDXI_GSV_ERROR:\n+\t\t\tsdxi_err(sdxi, \"went to error state\\n\");\n+\t\t\treturn -EIO;\n+\t\tcase SDXI_GSV_INIT:\n+\t\tcase SDXI_GSV_STOP:\n+\t\t\t/* transitional states, wait */\n+\t\t\tfsleep(1000);\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tsdxi_err(sdxi, \"unexpected gsv %u, giving up\\n\", status);\n+\t\t\treturn -EIO;\n+\t\t}\n+\t} while (time_before(jiffies, deadline));\n+\n+\tsdxi_err(sdxi, \"activation timed out, current status %u\\n\",\n+\t\tsdxi_dev_gsv(sdxi));\n+\treturn -ETIMEDOUT;\n+}\n+\n /* Get the device to the GSV_STOP state. */\n static int sdxi_dev_stop(struct sdxi_dev *sdxi)\n {\n@@ -197,7 +240,11 @@ static int sdxi_fn_activate(struct sdxi_dev *sdxi)\n \tif (err)\n \t\treturn err;\n \n-\treturn 0;\n+\t/*\n+\t * SDXI 1.0 4.1.8.9: Set MMIO_CTL0.fn_gsr to GSRV_ACTIVE and\n+\t * wait for MMIO_STS0.fn_gsv to reach GSV_ACTIVE or GSV_ERROR.\n+\t */\n+\treturn sdxi_dev_start(sdxi);\n }\n \n static int sdxi_create_dma_pool(struct sdxi_dev *sdxi, struct dma_pool **pool,\n@@ -250,3 +297,10 @@ int sdxi_register(struct device *dev, const struct sdxi_bus_ops *ops)\n \n \treturn sdxi_device_init(sdxi);\n }\n+\n+void sdxi_unregister(struct device *dev)\n+{\n+\tstruct sdxi_dev *sdxi = dev_get_drvdata(dev);\n+\n+\tsdxi_dev_stop(sdxi);\n+}\ndiff --git a/drivers/dma/sdxi/pci.c b/drivers/dma/sdxi/pci.c\nindex f3f8485e50e3..8e4dfde078ff 100644\n--- a/drivers/dma/sdxi/pci.c\n+++ b/drivers/dma/sdxi/pci.c\n@@ -67,6 +67,11 @@ static int sdxi_pci_probe(struct pci_dev *pdev,\n \treturn sdxi_register(&pdev->dev, &sdxi_pci_ops);\n }\n \n+static void sdxi_pci_remove(struct pci_dev *pdev)\n+{\n+\tsdxi_unregister(&pdev->dev);\n+}\n+\n static const struct pci_device_id sdxi_id_table[] = {\n \t{ PCI_DEVICE_CLASS(PCI_CLASS_ACCELERATOR_SDXI, 0xffffff) },\n \t{ }\n@@ -77,6 +82,7 @@ static struct pci_driver sdxi_driver = {\n \t.name = \"sdxi\",\n \t.id_table = sdxi_id_table,\n \t.probe = sdxi_pci_probe,\n+\t.remove = sdxi_pci_remove,\n \t.sriov_configure = pci_sriov_configure_simple,\n };\n \ndiff --git a/drivers/dma/sdxi/sdxi.h b/drivers/dma/sdxi/sdxi.h\nindex bbc14364a5c9..426101875334 100644\n--- a/drivers/dma/sdxi/sdxi.h\n+++ b/drivers/dma/sdxi/sdxi.h\n@@ -75,6 +75,7 @@ static inline struct device *sdxi_to_dev(const struct sdxi_dev *sdxi)\n #define sdxi_err(s, fmt, ...) dev_err(sdxi_to_dev(s), fmt, ## __VA_ARGS__)\n \n int sdxi_register(struct device *dev, const struct sdxi_bus_ops *ops);\n+void sdxi_unregister(struct device *dev);\n \n static inline u64 sdxi_read64(const struct sdxi_dev *sdxi, enum sdxi_reg reg)\n {\n",
    "prefixes": [
        "09/23"
    ]
}