FAILED: patch "[PATCH] cxl/pci: Use the Device GPF DVSEC for restricted endpoints" failed to apply to 6.18-stable tree
Subsystems (2)
Sasha Levin
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x d2654fa0d841fa36ffa76577f83a2810d643ae19
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From d2654fa0d841fa36ffa76577f83a2810d643ae19 Mon Sep 17 00:00:00 2001
From: Guixin Liu <[email protected]>
Date: Thu, 8 Oct 2026 11:46:12 +0800
Subject: [PATCH] cxl/pci: Use the Device GPF DVSEC for restricted endpoints
cxl_gpf_get_dvsec() picks between the Port and the Device GPF DVSEC from the PCIe type of the given device, and only a plain endpoint counts as a device. A restricted CXL device is an endpoint too, but it falls into the port case and is probed for the Port GPF DVSEC instead of the Device GPF DVSEC.
On an RCD, dirty shutdown tracking therefore never arms: the DVSEC lookup in cxl_nvdimm_arm_dirty_shutdown_tracking() fails, the dirty shutdown count stays invalid, and the warning complains about a missing Port GPF DVSEC on a device.
Treat restricted endpoints as devices.
--- drivers/cxl/core/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cxl/core/pci.c +2 -1
@@ -819,7 +819,8 @@ u16 cxl_gpf_get_dvsec(struct device *dev)return 0 ; pdev =to_pci_dev (dev); -if (pci_pcie_type (pdev) ==PCI_EXP_TYPE_ENDPOINT ) +if (pci_pcie_type (pdev) ==PCI_EXP_TYPE_ENDPOINT || +is_cxl_restricted (pdev)) is_port = false; dvsec = pci_find_dvsec_capability(pdev, PCI_VENDOR_ID_CXL,
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/1 cxl/pci: Use the Device GPF DVSEC for restricted endpoints
From: Guixin Liu <[email protected]>
[ Upstream commit d2654fa0d841fa36ffa76577f83a2810d643ae19 ]
cxl_gpf_get_dvsec() picks between the Port and the Device GPF DVSEC from the PCIe type of the given device, and only a plain endpoint counts as a device. A restricted CXL device is an endpoint too, but it falls into the port case and is probed for the Port GPF DVSEC instead of the Device GPF DVSEC.
On an RCD, dirty shutdown tracking therefore never arms: the DVSEC lookup in cxl_nvdimm_arm_dirty_shutdown_tracking() fails, the dirty shutdown count stays invalid, and the warning complains about a missing Port GPF DVSEC on a device.
Treat restricted endpoints as devices.
--- drivers/cxl/core/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cxl/core/pci.c +2 -1
@@ -819,7 +819,8 @@ u16 cxl_gpf_get_dvsec(struct device *dev)return 0 ; pdev =to_pci_dev (dev); -if (pci_pcie_type (pdev) ==PCI_EXP_TYPE_ENDPOINT ) +if (pci_pcie_type (pdev) ==PCI_EXP_TYPE_ENDPOINT || +pci_pcie_type (pdev) ==PCI_EXP_TYPE_RC_END ) is_port = false; dvsec = pci_find_dvsec_capability(pdev, PCI_VENDOR_ID_CXL,
Signature · 1 line
2.53.0