Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229796/?format=api
{ "id": 2229796, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229796/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260428182454.464655-2-fabio.m.de.francesco@linux.intel.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.1/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 }, "msgid": "<20260428182454.464655-2-fabio.m.de.francesco@linux.intel.com>", "date": "2026-04-28T18:24:34", "name": "[1/2] PCI/CXL: Allow PM Init to complete on cxl_bus reset if ACS SV enabled", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f260bb55f366f0879cf9231ca8c58200e18e298c", "submitter": { "id": 88588, "url": "http://patchwork.ozlabs.org/api/1.1/people/88588/?format=api", "name": "Fabio M. De Francesco", "email": "fabio.m.de.francesco@linux.intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260428182454.464655-2-fabio.m.de.francesco@linux.intel.com/mbox/", "series": [ { "id": 501923, "url": "http://patchwork.ozlabs.org/api/1.1/series/501923/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=501923", "date": "2026-04-28T18:24:34", "name": "[1/2] PCI/CXL: Allow PM Init to complete on cxl_bus reset if ACS SV enabled", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501923/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2229796/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229796/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-pci+bounces-53347-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=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=D1Xf9Png;\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-53347-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=\"D1Xf9Png\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=198.175.65.15", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.intel.com" ], "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 4g4plb5jx7z1xrS\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 04:25:47 +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 0CD6730A851B\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 18:25:09 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 2CA1C47AF56;\n\tTue, 28 Apr 2026 18:25:08 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [198.175.65.15])\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 943BE47AF69;\n\tTue, 28 Apr 2026 18:25:06 +0000 (UTC)", "from fmviesa002.fm.intel.com ([10.60.135.142])\n by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2026 11:25:06 -0700", "from fdefranc-mobl3.ger.corp.intel.com (HELO\n fdefranc-mobl3.intel.com) ([10.245.246.9])\n by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2026 11:25:03 -0700" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777400708; cv=none;\n b=gf9+TvFTFOE4WqhJMrzAwKRdtrXSsQBHAn43dCRUizlUXFJ3biVHPiFXxLbaFi4LQOMtBlxIbJpgn+oHw66g5wA13lvAjhFbFBPdvY0RDikvNpo1qXzFkNt34L/K8w9xoFJp1du79099RMvwemDNY2mq8nBcdvKb6NMFfit79Ak=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777400708; c=relaxed/simple;\n\tbh=JsL35ixH94B5ed9EelASawTU6bGn09a6QoHRha3fisY=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Ah3mLuoyc7KEzT8hPN3AWSdxlve3Knkmhfbo12ubX74w3Mv5N6nZrqUkqDcMoAXYu1npA4xYcvVmO65Kl9tKEJ8qSRed9d9yryIkinVEHDDuwHM5GzOgiOZXfrm/CUa8hKf5bK4YPsn8fJhGuP/Xi0tHs9VnrhbX4/Xgl7dWiuw=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com;\n spf=pass smtp.mailfrom=linux.intel.com;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.b=D1Xf9Png; arc=none smtp.client-ip=198.175.65.15", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1777400706; x=1808936706;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=JsL35ixH94B5ed9EelASawTU6bGn09a6QoHRha3fisY=;\n b=D1Xf9PngVDX7gq1bVO9V4yrVyudvbzCXUZvustH3tk2ynsxrI2qnJDVi\n AQC3/NRvRWULvsmJyntfaLiDGutt0C5/mCshDNgMHdd7ozlvwttv3/deb\n xzNJo434wcc1xq59FfsAVYF2u9454IWuY+X3Zh1kUNMakLjBu/b5N9whD\n xPd9VfJkz1+t1Qjj17SzOTLtwDstv1A4ln7IuY/IqYxlnJiXGqyn547RI\n Bu1VdleANqVQkCvlYanz7+OVr09OTzHiKCD+vQgkyUUpgBIN1KGFtdjfT\n uScx1Tcm4ezQf5pl4hTTR6OEsE/3IdbyclbQxIuHUoYZLQvAeX47cY5p/\n Q==;", "X-CSE-ConnectionGUID": [ "thWpROWmRLSsHGwNUsOxUQ==", "Brs6jUiJRKuvj63DQKsJpA==" ], "X-CSE-MsgGUID": [ "6kzPJOWUTi23zPnEMIbGOA==", "lotBDMDxSACOzQ7BEjCz0g==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11770\"; a=\"81927211\"", "E=Sophos;i=\"6.23,204,1770624000\";\n d=\"scan'208\";a=\"81927211\"", "E=Sophos;i=\"6.23,204,1770624000\";\n d=\"scan'208\";a=\"257352897\"" ], "X-ExtLoop1": "1", "From": "\"Fabio M. De Francesco\" <fabio.m.de.francesco@linux.intel.com>", "To": "linux-cxl@vger.kernel.org", "Cc": "Davidlohr 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\tBjorn Helgaas <bhelgaas@google.com>,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\t\"Fabio M. De Francesco\" <fabio.m.de.francesco@linux.intel.com>", "Subject": "[PATCH 1/2] PCI/CXL: Allow PM Init to complete on cxl_bus reset if\n ACS SV enabled", "Date": "Tue, 28 Apr 2026 20:24:34 +0200", "Message-ID": "<20260428182454.464655-2-fabio.m.de.francesco@linux.intel.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260428182454.464655-1-fabio.m.de.francesco@linux.intel.com>", "References": "<20260428182454.464655-1-fabio.m.de.francesco@linux.intel.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" }, "content": "CXL r4.0 sec 8.1.5.1 Implementation Note describes a scenario in which\nissuing a Secondary Bus Reset on a CXL Downstream Port leaves the\nPort Power Management Initialization Complete bit unset when the PCIe\nAccess Control Service (ACS) Source Validation bit (SV) is enabled on\nthe Downstream Port. The spec states that another SBR alone will not\nfacilitate recovery and shows a software recovery sequence.\n\nImplement the sequence by extending cxl_reset_bus_function() to save,\nclear, and restore ACS SV and Bus Master Enable (BME) on the Downstream\nPort around the SBR with the use of helpers.\n\nThe wait inside pci_bridge_secondary_bus_reset() covers the 100 ms\nreferenced by the spec. The helpers return when ACS SV is not enabled on\nthe Downstream Port.\n\nSigned-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>\n---\n drivers/pci/pci.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 49 insertions(+)", "diff": "diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c\nindex 8f7cfcc00090..047d3b4508a5 100644\n--- a/drivers/pci/pci.c\n+++ b/drivers/pci/pci.c\n@@ -4930,10 +4930,55 @@ static int pci_reset_bus_function(struct pci_dev *dev, bool probe)\n \treturn rc;\n }\n \n+static void cxl_disable_acs_sv_bme(struct pci_dev *bridge, u16 *saved_cmd,\n+\t\t\t\t u16 *saved_acs_ctrl)\n+{\n+\tif (!bridge->acs_cap)\n+\t\treturn;\n+\n+\tpci_read_config_word(bridge, bridge->acs_cap + PCI_ACS_CTRL,\n+\t\t\t saved_acs_ctrl);\n+\tif (!(*saved_acs_ctrl & PCI_ACS_SV))\n+\t\treturn;\n+\n+\tpci_read_config_word(bridge, PCI_COMMAND, saved_cmd);\n+\tif (*saved_cmd & PCI_COMMAND_MASTER)\n+\t\tpci_clear_master(bridge);\n+\n+\tpci_write_config_word(bridge, bridge->acs_cap + PCI_ACS_CTRL,\n+\t\t\t *saved_acs_ctrl & ~PCI_ACS_SV);\n+}\n+\n+static void cxl_restore_acs_sv_bme(struct pci_dev *bridge, u16 saved_cmd,\n+\t\t\t\t u16 saved_acs_ctrl)\n+{\n+\tif (!bridge->acs_cap || !(saved_acs_ctrl & PCI_ACS_SV))\n+\t\treturn;\n+\n+\tpci_write_config_word(bridge, bridge->acs_cap + PCI_ACS_CTRL,\n+\t\t\t saved_acs_ctrl);\n+\tif (saved_cmd & PCI_COMMAND_MASTER)\n+\t\tpci_set_master(bridge);\n+}\n+\n+/**\n+ * cxl_reset_bus_function - SBR for a child of a CXL downstream port\n+ * @dev: child device whose upstream bridge is a CXL downstream port\n+ * @probe: if true, only check whether the reset is supported\n+ *\n+ * Issues an SBR on @dev's parent bus. Temporarily sets the CXL Port\n+ * DVSEC Unmask SBR bit across the reset. When ACS Source Validation\n+ * is enabled on the bridge, also temporarily clears Bus Master Enable\n+ * and ACS Source Validation, per CXL r4.0 sec 8.1.5.1.\n+ *\n+ * Return: 0 on success, -ENOTTY if the reset cannot be issued, or an\n+ * errno from the reset path.\n+ */\n static int cxl_reset_bus_function(struct pci_dev *dev, bool probe)\n {\n \tstruct pci_dev *bridge;\n \tu16 dvsec, reg, val;\n+\tu16 saved_cmd = 0, saved_acs_ctrl = 0;\n \tint rc;\n \n \tbridge = pci_upstream_bridge(dev);\n@@ -4957,6 +5002,8 @@ static int cxl_reset_bus_function(struct pci_dev *dev, bool probe)\n \t\treturn rc;\n \t}\n \n+\tcxl_disable_acs_sv_bme(bridge, &saved_cmd, &saved_acs_ctrl);\n+\n \tif (reg & PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR) {\n \t\tval = reg;\n \t} else {\n@@ -4971,6 +5018,8 @@ static int cxl_reset_bus_function(struct pci_dev *dev, bool probe)\n \t\tpci_write_config_word(bridge, dvsec + PCI_DVSEC_CXL_PORT_CTL,\n \t\t\t\t reg);\n \n+\tcxl_restore_acs_sv_bme(bridge, saved_cmd, saved_acs_ctrl);\n+\n \tpci_dev_reset_iommu_done(dev);\n \treturn rc;\n }\n", "prefixes": [ "1/2" ] }