get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2215914,
    "url": "http://patchwork.ozlabs.org/api/patches/2215914/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260325143555.451852-3-herve.codina@bootlin.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": "<20260325143555.451852-3-herve.codina@bootlin.com>",
    "list_archive_url": null,
    "date": "2026-03-25T14:35:29",
    "name": "[v6,02/27] of: dynamic: Fix overlayed devices not probing because of fw_devlink",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ddc3c2b766867a80720adce1797372a0362e74c0",
    "submitter": {
        "id": 81983,
        "url": "http://patchwork.ozlabs.org/api/people/81983/?format=api",
        "name": "Herve Codina",
        "email": "herve.codina@bootlin.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260325143555.451852-3-herve.codina@bootlin.com/mbox/",
    "series": [
        {
            "id": 497453,
            "url": "http://patchwork.ozlabs.org/api/series/497453/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=497453",
            "date": "2026-03-25T14:35:27",
            "name": "lan966x pci device: Add support for SFPs",
            "version": 6,
            "mbox": "http://patchwork.ozlabs.org/series/497453/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2215914/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2215914/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51073-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=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=FZ4i1own;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-51073-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=\"FZ4i1own\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=185.171.202.116",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=bootlin.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\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 4fgqYq74f7z1xy3\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 01:49:35 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 6C30931497BE\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 14:37:20 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1C5283E317C;\n\tWed, 25 Mar 2026 14:36:58 +0000 (UTC)",
            "from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116])\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 759F53A452D;\n\tWed, 25 Mar 2026 14:36:56 +0000 (UTC)",
            "from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n\tby smtpout-04.galae.net (Postfix) with ESMTPS id 0C6C1C580B2;\n\tWed, 25 Mar 2026 14:37:23 +0000 (UTC)",
            "from mail.galae.net (mail.galae.net [212.83.136.155])\n\tby smtpout-01.galae.net (Postfix) with ESMTPS id 34573601FA;\n\tWed, 25 Mar 2026 14:36:55 +0000 (UTC)",
            "from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id E0A7A10451A72;\n\tWed, 25 Mar 2026 15:36:37 +0100 (CET)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774449418; cv=none;\n b=H+EhZ1N5/BArk/j+9q9ScXwi25aDX+hrzG9wvONmsU+4pSRTqldDDZ7uQhgkP5zyQB3wfMsQ5qpbA6Setzj1/VsvJKl9Ws8pw+q/HXTY95rO+uYiD+Xj1VCKJQyzKXgsZFH2uT7aAR/i8Y/Fxc4PqmUApoYAaaXtzWFelJme39w=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774449418; c=relaxed/simple;\n\tbh=ELGRYLKuygkGfQqF1xaCp2fy8ZYCsjD3GfCuUCSoLgI=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=gLGOtbPmrUiY4e8Yj9ngZuP+MpvNOUeAQ8KX+RHT8qQwVvjl0Xfz6ssb+PkNhkCA4XnSFrXYIYmTUiZc72zs0HDTVBpeecUOJ2B93mWJxeyVxDSoG+SP+tGN/VFabc+R15hpNf/YcI0RR7zhE8mkTUXdI7yTiaRHF+cflT2pgTc=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com;\n spf=pass smtp.mailfrom=bootlin.com;\n dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=FZ4i1own; arc=none smtp.client-ip=185.171.202.116",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;\n\tt=1774449412; h=from:subject:date:message-id:to:cc:mime-version:\n\t content-transfer-encoding:in-reply-to:references;\n\tbh=e66ZQnhCt52Yibqi7nOR45Pvk80W8g1E8vl6pyJHbMg=;\n\tb=FZ4i1ownWnZlcO6echlt3He9lacUD3OtK1ESVkQBGJdxIaeUAg5DhQar1BIOX1ngtCyuvF\n\tHpQN/pZ8Rvolp6VKJVoDRZOu84w4cDwJ4fbWj6n/40MI3s6GwSwHXCrpD8Ux3R2bGRb+c9\n\tYZO3pVL0ca75D17F+SeHxBlgG5d1vMfwQ+JwMF0Yb356cE328akPZtJYRGEbwVdM35PhHO\n\ty+0QXt9Zoi6UOgYUDRO6HkOjNFnk04zwchEKQ4V8z3aabB2PqmqmUEND1fDVloFY8pQ+M7\n\tW9KxUk+LZD82hvJt88ZtB8unLGMbRnRKbUSk1VxQKFRNgobJcpQopx1UOCH9jA==",
        "From": "Herve Codina <herve.codina@bootlin.com>",
        "To": "Andrew Lunn <andrew@lunn.ch>,\n\tRob Herring <robh@kernel.org>,\n\tKrzysztof Kozlowski <krzk+dt@kernel.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tGeert Uytterhoeven <geert+renesas@glider.be>,\n\tKalle Niemi <kaleposti@gmail.com>,\n\tMatti Vaittinen <mazziesaccount@gmail.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\t\"Rafael J. Wysocki\" <rafael@kernel.org>,\n\tDanilo Krummrich <dakr@kernel.org>,\n\tFrank Li <Frank.Li@nxp.com>,\n\tSascha Hauer <s.hauer@pengutronix.de>,\n\tPengutronix Kernel Team <kernel@pengutronix.de>,\n\tFabio Estevam <festevam@gmail.com>,\n\tMichael Turquette <mturquette@baylibre.com>,\n\tStephen Boyd <sboyd@kernel.org>,\n\tAndi Shyti <andi.shyti@kernel.org>,\n\tWolfram Sang <wsa+renesas@sang-engineering.com>,\n\tPeter Rosin <peda@axentia.se>,\n\tArnd Bergmann <arnd@arndb.de>,\n\tHerve Codina <herve.codina@bootlin.com>,\n\tSaravana Kannan <saravanak@kernel.org>,\n\tBjorn Helgaas <bhelgaas@google.com>,\n\tCharles Keepax <ckeepax@opensource.cirrus.com>,\n\tRichard Fitzgerald <rf@opensource.cirrus.com>,\n\tDavid Rhodes <david.rhodes@cirrus.com>,\n\tLinus Walleij <linusw@kernel.org>,\n\tUlf Hansson <ulf.hansson@linaro.org>,\n\tMark Brown <broonie@kernel.org>,\n\tLen Brown <lenb@kernel.org>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tDaniel Scally <djrscally@gmail.com>,\n\tHeikki Krogerus <heikki.krogerus@linux.intel.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tDavidlohr Bueso <dave@stgolabs.net>,\n\tJonathan Cameron <jonathan.cameron@huawei.com>,\n\tDave Jiang <dave.jiang@intel.com>,\n\tAlison Schofield <alison.schofield@intel.com>,\n\tVishal Verma <vishal.l.verma@intel.com>,\n\tIra Weiny <ira.weiny@intel.com>,\n\tDan Williams <dan.j.williams@intel.com>,\n\tShawn Guo <shawnguo@kernel.org>",
        "Cc": "Wolfram Sang <wsa@kernel.org>,\n\tlinux-kernel@vger.kernel.org,\n\tdriver-core@lists.linux.dev,\n\timx@lists.linux.dev,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-clk@vger.kernel.org,\n\tlinux-i2c@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-sound@vger.kernel.org,\n\tpatches@opensource.cirrus.com,\n\tlinux-gpio@vger.kernel.org,\n\tlinux-pm@vger.kernel.org,\n\tlinux-spi@vger.kernel.org,\n\tlinux-acpi@vger.kernel.org,\n\tlinux-cxl@vger.kernel.org,\n\tAllan Nielsen <allan.nielsen@microchip.com>,\n\tHoratiu Vultur <horatiu.vultur@microchip.com>,\n\tSteen Hegelund <steen.hegelund@microchip.com>,\n\tLuca Ceresoli <luca.ceresoli@bootlin.com>,\n\tThomas Petazzoni <thomas.petazzoni@bootlin.com>,\n\tSaravana Kannan <saravanak@google.com>",
        "Subject": "[PATCH v6 02/27] of: dynamic: Fix overlayed devices not probing\n because of fw_devlink",
        "Date": "Wed, 25 Mar 2026 15:35:29 +0100",
        "Message-ID": "<20260325143555.451852-3-herve.codina@bootlin.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260325143555.451852-1-herve.codina@bootlin.com>",
        "References": "<20260325143555.451852-1-herve.codina@bootlin.com>",
        "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-Transfer-Encoding": "8bit",
        "X-Last-TLS-Session-Version": "TLSv1.3"
    },
    "content": "From: Saravana Kannan <saravanak@google.com>\n\nWhen an overlay is applied, if the target device has already probed\nsuccessfully and bound to a device, then some of the fw_devlink logic\nthat ran when the device was probed needs to be rerun. This allows newly\ncreated dangling consumers of the overlayed device tree nodes to be\nmoved to become consumers of the target device.\n\nFixes: 1a50d9403fb9 (\"treewide: Fix probing of devices in DT overlays\")\nReported-by: Herve Codina <herve.codina@bootlin.com>\nCloses: https://lore.kernel.org/lkml/CAMuHMdXEnSD4rRJ-o90x4OprUacN_rJgyo8x6=9F9rZ+-KzjOg@mail.gmail.com/\nCloses: https://lore.kernel.org/all/20240221095137.616d2aaa@bootlin.com/\nCloses: https://lore.kernel.org/lkml/20240312151835.29ef62a0@bootlin.com/\nSigned-off-by: Saravana Kannan <saravanak@google.com>\nLink: https://lore.kernel.org/lkml/20240411235623.1260061-3-saravanak@google.com/\n[Herve: Rebase on top of recent kernel]\n[Herve: Add the call to driver_deferred_probe_trigger()]\nSigned-off-by: Herve Codina <herve.codina@bootlin.com>\nTested-by: Kalle Niemi <kaleposti@gmail.com>\nTested-by: Geert Uytterhoeven <geert+renesas@glider.be>\n---\n drivers/base/core.c    | 83 +++++++++++++++++++++++++++++++++++++-----\n drivers/of/overlay.c   | 15 ++++++++\n include/linux/fwnode.h |  1 +\n 3 files changed, 90 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/base/core.c b/drivers/base/core.c\nindex 791f9e444df8..019fda47d089 100644\n--- a/drivers/base/core.c\n+++ b/drivers/base/core.c\n@@ -235,6 +235,79 @@ static void __fw_devlink_pickup_dangling_consumers(struct fwnode_handle *fwnode,\n \t\t__fw_devlink_pickup_dangling_consumers(child, new_sup);\n }\n \n+static void fw_devlink_pickup_dangling_consumers(struct device *dev)\n+{\n+\tstruct fwnode_handle *child;\n+\n+\tguard(mutex)(&fwnode_link_lock);\n+\n+\tfwnode_for_each_available_child_node(dev->fwnode, child)\n+\t\t__fw_devlink_pickup_dangling_consumers(child, dev->fwnode);\n+\t__fw_devlink_link_to_consumers(dev);\n+}\n+\n+/**\n+ * fw_devlink_refresh_fwnode - Recheck the tree under this firmware node\n+ * @fwnode: The fwnode under which the fwnode tree has changed\n+ *\n+ * This function is mainly meant to adjust the supplier/consumer dependencies\n+ * after a fwnode tree overlay has occurred.\n+ */\n+void fw_devlink_refresh_fwnode(struct fwnode_handle *fwnode)\n+{\n+\tstruct device *dev;\n+\n+\t/*\n+\t * Find the closest ancestor fwnode that has been converted to a device\n+\t * that can bind to a driver (bus device).\n+\t */\n+\tfwnode_handle_get(fwnode);\n+\tdo {\n+\t\tif (fwnode->flags & FWNODE_FLAG_NOT_DEVICE)\n+\t\t\tcontinue;\n+\n+\t\tdev = get_dev_from_fwnode(fwnode);\n+\t\tif (!dev)\n+\t\t\tcontinue;\n+\n+\t\tif (dev->bus)\n+\t\t\tbreak;\n+\n+\t\tput_device(dev);\n+\t} while ((fwnode = fwnode_get_next_parent(fwnode)));\n+\n+\t/*\n+\t * If none of the ancestor fwnodes have (yet) been converted to a device\n+\t * that can bind to a driver, there's nothing to fix up.\n+\t */\n+\tif (!fwnode)\n+\t\treturn;\n+\n+\tWARN(device_is_bound(dev) && dev->links.status != DL_DEV_DRIVER_BOUND,\n+\t     \"Don't multithread overlaying and probing the same device!\\n\");\n+\n+\t/*\n+\t * If the device has already bound to a driver, then we need to redo\n+\t * some of the work that was done after the device was bound to a\n+\t * driver. If the device hasn't bound to a driver, running things too\n+\t * soon would incorrectly pick up consumers that it shouldn't.\n+\t */\n+\tif (dev->links.status == DL_DEV_DRIVER_BOUND) {\n+\t\tfw_devlink_pickup_dangling_consumers(dev);\n+\t\t/*\n+\t\t * Some of dangling consumers could have been put previously in\n+\t\t * the deferred probe list due to the unavailability of their\n+\t\t * suppliers. Those consumers have been picked up and some of\n+\t\t * their suppliers links have been updated. Time to re-try their\n+\t\t * probe sequence.\n+\t\t */\n+\t\tdriver_deferred_probe_trigger();\n+\t}\n+\n+\tput_device(dev);\n+\tfwnode_handle_put(fwnode);\n+}\n+\n static DEFINE_MUTEX(device_links_lock);\n DEFINE_STATIC_SRCU(device_links_srcu);\n \n@@ -1312,16 +1385,8 @@ void device_links_driver_bound(struct device *dev)\n \t * child firmware node.\n \t */\n \tif (dev->fwnode && dev->fwnode->dev == dev) {\n-\t\tstruct fwnode_handle *child;\n-\n \t\tfwnode_links_purge_suppliers(dev->fwnode);\n-\n-\t\tguard(mutex)(&fwnode_link_lock);\n-\n-\t\tfwnode_for_each_available_child_node(dev->fwnode, child)\n-\t\t\t__fw_devlink_pickup_dangling_consumers(child,\n-\t\t\t\t\t\t\t       dev->fwnode);\n-\t\t__fw_devlink_link_to_consumers(dev);\n+\t\tfw_devlink_pickup_dangling_consumers(dev);\n \t}\n \tdevice_remove_file(dev, &dev_attr_waiting_for_supplier);\n \ndiff --git a/drivers/of/overlay.c b/drivers/of/overlay.c\nindex c1c5686fc7b1..4e45f3414c2c 100644\n--- a/drivers/of/overlay.c\n+++ b/drivers/of/overlay.c\n@@ -185,6 +185,15 @@ static int overlay_notify(struct overlay_changeset *ovcs,\n \treturn 0;\n }\n \n+static void overlay_fw_devlink_refresh(struct overlay_changeset *ovcs)\n+{\n+\tfor (int i = 0; i < ovcs->count; i++) {\n+\t\tstruct device_node *np = ovcs->fragments[i].target;\n+\n+\t\tfw_devlink_refresh_fwnode(of_fwnode_handle(np));\n+\t}\n+}\n+\n /*\n  * The values of properties in the \"/__symbols__\" node are paths in\n  * the ovcs->overlay_root.  When duplicating the properties, the paths\n@@ -951,6 +960,12 @@ static int of_overlay_apply(struct overlay_changeset *ovcs,\n \t\tpr_err(\"overlay apply changeset entry notify error %d\\n\", ret);\n \t/* notify failure is not fatal, continue */\n \n+\t/*\n+\t * Needs to happen after changeset notify to give the listeners a chance\n+\t * to finish creating all the devices they need to create.\n+\t */\n+\toverlay_fw_devlink_refresh(ovcs);\n+\n \tret_tmp = overlay_notify(ovcs, OF_OVERLAY_POST_APPLY);\n \tif (ret_tmp)\n \t\tif (!ret)\ndiff --git a/include/linux/fwnode.h b/include/linux/fwnode.h\nindex 097be89487bf..a921ca2fe940 100644\n--- a/include/linux/fwnode.h\n+++ b/include/linux/fwnode.h\n@@ -228,6 +228,7 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup,\n \t\t    u8 flags);\n void fwnode_links_purge(struct fwnode_handle *fwnode);\n void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);\n+void fw_devlink_refresh_fwnode(struct fwnode_handle *fwnode);\n bool fw_devlink_is_strict(void);\n \n #endif\n",
    "prefixes": [
        "v6",
        "02/27"
    ]
}