Skip to contentSkip to conversation

PCI: Add d3cold and device-specific reset for Qualcomm devices

PATCH Superseded Jose Ignacio Tornos Martinez 3 participants 8 messages Jun 2 – Jun 3

Subsystems (4)

v6 of 15 Superseded Latest is v15 →

lore
Share & tools
lore
#0 lore raw

v6 cover PCI: Add d3cold and device-specific reset for Qualcomm devices

Some PCIe devices lack working reset methods for VFIO passthrough scenarios. These devices typically have no FLR, advertise NoSoftRst+ (blocking PM reset), and have broken or unavailable bus reset. When a VM crashes, VFIO cannot reset the device for reuse without a working reset method.

This series addresses the problem by adding general d3cold infrastructure and device-specific reset for Qualcomm devices:

**Patch 1/3: d3cold reset method**
Adds D3cold as a general reset method with strict _PR3 requirement. Only attempts true power cycling via platform control (ACPI _PR3), never falls back to D3hot. This provides genuine power-off reset on platforms that support it.

**Patch 2/3: device-specific reset for Qualcomm devices**
Adds device-specific reset entries for Qualcomm ath11k/ath12k WiFi and SDX62/SDX65 modems using D3cold power cycling with automatic D3hot fallback. Uses pci_set_power_state(D3cold) which automatically falls back to D3hot on platforms without _PR3. Extracts shared pci_dev_d3cold_d0_cycle() helper to avoid code duplication with general d3cold method. Device-specific reset is position #1 in reset hierarchy, providing immediate working reset for these Qualcomm devices.

**Patch 3/3: Qualcomm quirk_no_bus_reset**
Disables broken bus reset for Qualcomm devices. Testing proves this is
device-specific: MediaTek MT7925e works correctly with bus reset using the same passive M.2-to-PCIe adapters where Qualcomm devices fail, confirming PERST# is properly wired and the issue is not deployment-specific. Acts as safety net to prevent broken SBR if users override via sysfs.

v6: - Patch 1/3 and 3/3 unchanged from v5
- For patch 2/3, fix double IOMMU handling for device-specific reset:
remove pci_dev_reset_iommu_prepare/done from pci_dev_d3cold_d0_cycle() helper, keep in pci_d3cold_reset() caller
- Qualcomm maintainers CC'd
v5: https://lore.kernel.org/all/[email protected]/

Jose Ignacio Tornos Martinez (3):
PCI: Add d3cold as general reset method
PCI: Add device-specific reset for Qualcomm devices
PCI: Disable broken bus reset on Qualcomm devices

--
2.53.0

#1 lore raw

PATCH v6 1/3 PCI: Add d3cold as general reset method

Add D3cold power cycle as a general PCI reset method for single-function devices on platforms with ACPI _PR3 power resources. This provides true power cycle reset capability when the platform can physically cut power to the device.

The implementation strictly requires _PR3 to be present - the platform must be able to control device power. This ensures d3cold only attempts true power cycling, not falling back to D3hot transitions.

D3cold reset is placed at the end of the reset hierarchy since it requires specific platform support and should be tried after standard methods.

Reset hierarchy with this change:
1. device_specific
2. acpi
3. flr
4. af_flr
5. pm (D3hot via config space, checks NoSoftRst)
6. bus (SBR)
7. cxl_bus
8. d3cold (NEW - true power cycle, requires _PR3)

This benefits:
- Platforms with _PR3 support
- Single-function devices needing true power cycle
- VFIO passthrough scenarios where FLR/PM unavailable

---
v6: code unchanged from v5
v5: https://lore.kernel.org/all/[email protected]/

 drivers/pci/pci.c   | 50 +++++++++++++++++++++++++++++++++++++++++++++
 include/linux/pci.h |  2 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
drivers/pci/pci.c +50 -0
index 8f7cfcc00090..096868f80cd4 100644
@@ -4491,6 +4491,55 @@ static int pci_pm_reset(struct pci_dev *dev, bool probe)
 	return ret;
 }
 
+/**
+ * pci_d3cold_reset - Put device into D3cold and back to D0 for reset
+ * @dev: PCI device to reset
+ * @probe: if true, check if D3cold reset is supported; if false, perform reset
+ *
+ * Reset the device by transitioning through D3cold (actual power removal via
+ * platform power control) and back to D0. This requires ACPI _PR3 power
+ * resources to be present - the platform must be able to physically cut power
+ * to the device.
+ *
+ * Only available for single-function devices to avoid affecting other
+ * functions in multi-function devices.
+ *
+ * Returns 0 if device can be/was reset this way, -ENOTTY if not supported,
+ * or other negative error code on failure.
+ */
+static int pci_d3cold_reset(struct pci_dev *dev, bool probe)
+{
+	int ret;
+
+	if (dev->multifunction)
+		return -ENOTTY;
+
+	if (!pci_pr3_present(dev))
+		return -ENOTTY;
+
+	if (probe)
+		return 0;
+
+	if (dev->current_state != PCI_D0)
+		return -EINVAL;
+
+	ret = pci_dev_reset_iommu_prepare(dev);
+	if (ret) {
+		pci_err(dev, "failed to stop IOMMU for a PCI reset: %d\n", ret);
+		return ret;
+	}
+
+	ret = pci_set_power_state(dev, PCI_D3cold);
+	if (ret)
+		goto done;
+
+	ret = pci_set_power_state(dev, PCI_D0);
+
+done:
+	pci_dev_reset_iommu_done(dev);
+	return ret;
+}
+
 /**
  * pcie_wait_for_link_status - Wait for link status change
  * @pdev: Device whose link to wait for.
@@ -5065,6 +5114,7 @@ const struct pci_reset_fn_method pci_reset_fn_methods[] = {
 	{ pci_pm_reset, .name = "pm" },
 	{ pci_reset_bus_function, .name = "bus" },
 	{ cxl_reset_bus_function, .name = "cxl_bus" },
+	{ pci_d3cold_reset, .name = "d3cold" },
 };
 
 /**
include/linux/pci.h +1 -1
index 2c4454583c11..1ca7b880ead7 100644
@@ -51,7 +51,7 @@
 			       PCI_STATUS_PARITY)
 
 /* Number of reset methods used in pci_reset_fn_methods array in pci.c */
-#define PCI_NUM_RESET_METHODS 8
+#define PCI_NUM_RESET_METHODS 9
 
 #define PCI_RESET_PROBE		true
 #define PCI_RESET_DO_RESET	false
Signature · 1 line
2.54.0
#2 lore raw

Re: [PATCH v6 1/3] PCI: Add d3cold as general reset method

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [Critical] pci_d3cold_reset() can falsely return success without actually power-cycling the device if…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Critical] pci_d3cold_reset() can falsely return success without actually power-cycling the device if ACPI power resources are shared, leaking device state across resets.
- [High] pci_d3cold_reset() calls pci_set_power_state(dev, PCI_D0) without waiting for the PCIe link to retrain and the device to become ready, causing immediate config space accesses to fail and breaking the reset process.
- [High] pci_d3cold_reset() does not prevent execution on bridges, allowing a single-function reset to unintentionally tear down an entire downstream hierarchy.
--

commit 7e36b6b44c0f04c412af5d637f17c6d81f5c01ff
Author: Jose Ignacio Tornos Martinez <[email protected]>

PCI: Add d3cold as general reset method

Add D3cold power cycle as a general PCI reset method for single-function devices on platforms with ACPI _PR3 power resources. This provides true power cycle reset capability when the platform can physically cut power to the device.

Quoted 4 lines
drivers/pci/pci.c +0 -0
index 8f7cfcc000901..096868f80cd4c 100644

[ ... ]

Quoted 6 lines
drivers/pci/pci.c +2 -0
@@ -4491,6 +4491,55 @@ static int pci_pm_reset(struct pci_dev *dev, bool probe)
 	return ret;
 }
 
+/**
+ * pci_d3cold_reset - Put device into D3cold and back to D0 for reset

[ ... ]

drivers/pci/pci.c static int pci_pm_reset(struct pci_dev *dev, bool probe) · line 4515

Quoted 7 lines

+ */

drivers/pci/pci.c +6 -0
+static int pci_d3cold_reset(struct pci_dev *dev, bool probe)
+{
+	int ret;
+
+	if (dev->multifunction)
+		return -ENOTTY;

[Severity: High]
Does this code allow bridges to be power-cycled, tearing down downstream links?

A single-function device can be a PCIe root port or switch downstream port. If a reset is invoked on such a bridge and it has an ACPI _PR3 power resource controlling slot power, transitioning the bridge to D3cold would physically cut power to all downstream devices on its secondary bus.

Should we check pci_is_bridge(dev) to ensure function-level resets are scoped to the targeted function and do not inflict collateral power loss on downstream hierarchies?

Quoted 3 lines
drivers/pci/pci.c +3 -0
+
+	if (!pci_pr3_present(dev))
+		return -ENOTTY;

[ ... ]

drivers/pci/pci.c static int pci_pm_reset(struct pci_dev *dev, bool probe) · line 4534

Quoted 9 lines
drivers/pci/pci.c +9 -0
+	ret = pci_dev_reset_iommu_prepare(dev);
+	if (ret) {
+		pci_err(dev, "failed to stop IOMMU for a PCI reset: %d\n", ret);
+		return ret;
+	}
+
+	ret = pci_set_power_state(dev, PCI_D3cold);
+	if (ret)
+		goto done;

[Severity: Critical]
Could this return false success without actually power-cycling the device if ACPI power resources are shared?

ACPI power resources use reference counting, so if the power resource is shared with another active device, the reference count is decremented but power is not physically cut. The device merely transitions to D3hot.

If the device supports the NoSoftRst property, it will retain its complete internal state across the cycle. Is there a way to verify physical power was actually removed before returning success, to avoid leaking state when scrubbing devices for assignments?

drivers/pci/pci.c

Quoted 2 lines
drivers/pci/pci.c +2 -0
+
+	ret = pci_set_power_state(dev, PCI_D0);

[Severity: High]
Can this transition to D0 fail because the link hasn't been given time to retrain?

A transition from D3cold to D0 is a Fundamental Reset. When pci_set_power_state() calls pci_power_up(), it executes the platform power-on method and immediately performs a configuration read on PCI_PM_CTRL without delay or Configuration Request Retry Status (CRS) polling.

Because the link is not fully trained, the read hits CRS or returns 0xFFFF, causing pci_power_up() to return -EIO and immediately abort the reset.

Unlike pci_pm_reset(), this function also lacks an explicit pci_dev_wait() invocation, which would leave the device uninitialized if the PCI subsystem attempts to restore configuration on an unresponsive link.

Quoted 5 lines
drivers/pci/pci.c +5 -0
+
+done:
+	pci_dev_reset_iommu_done(dev);
+	return ret;
+}

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH v6 2/3 PCI: Add device-specific reset for Qualcomm devices

In reply to Jose Ignacio Tornos Martinez

Some Qualcomm PCIe devices (ath11k WiFi, ath12k WiFi, SDX62/SDX65 modems) lack working reset methods for VFIO passthrough scenarios. These devices have no FLR capability, advertise NoSoftRst+ (blocking PM reset), and have broken bus reset.

The problem manifests in VFIO passthrough scenarios:

- ath11k WiFi (17cb:1103): Normal VM operation works fine, including clean shutdown/reboot. However, when the VM terminates uncleanly (crash, force-off), VFIO attempts to reset the device before it can be assigned to another VM. Without a working reset method, the device remains in an undefined state, preventing reuse.

- ath12k WiFi (17cb:1107): Same behavior as ath11k.

- SDX62/SDX65 5G modems (17cb:0308): Never successfully initialize even on first VM assignment without proper reset capability.

Add device-specific reset entries for these Qualcomm devices using D3cold power cycling with automatic D3hot fallback. The implementation uses pci_set_power_state(D3cold) which automatically falls back to D3hot on platforms without ACPI _PR3 power resources. While not a complete reset (BARs preserved), testing shows D3hot transition provides sufficient reset for VFIO reuse.

Extract a shared pci_dev_d3cold_d0_cycle() helper function to avoid code duplication between pci_d3cold_reset() (strict _PR3 requirement) and the new reset_d3cold_d3hot() device-specific reset (automaticfallback). The helper handles IOMMU preparation, performs the power cycle via pci_set_power_state(), and cleans up IOMMU state.

Device-specific reset is position #1 in the reset hierarchy, so these Qualcomm devices will use power cycling as their primary reset method, with the general d3cold method (position #8) available as a fallback on _PR3-capable platforms if users override via sysfs.

---
v6: Fix double IOMMU handling for device-specific reset: remove
pci_dev_reset_iommu_prepare/done from pci_dev_d3cold_d0_cycle() helper, keep in pci_d3cold_reset() caller
v5: https://lore.kernel.org/all/[email protected]/

 drivers/pci/pci.c    | 37 +++++++++++++++++++++++++++----------
 drivers/pci/pci.h    |  1 +
 drivers/pci/quirks.c | 19 +++++++++++++++++++
 3 files changed, 47 insertions(+), 10 deletions(-)
drivers/pci/pci.c +27 -10
index 096868f80cd4..f7a7443287fd 100644
@@ -4491,6 +4491,32 @@ static int pci_pm_reset(struct pci_dev *dev, bool probe)
 	return ret;
 }
 
+/**
+ * pci_dev_d3cold_d0_cycle - Perform D3cold->D0 power cycle
+ * @dev: Device to power cycle
+ *
+ * Common helper to perform D3cold->D0 power cycle for reset methods.
+ * Attempts D3cold transition with automatic fallback to D3hot on platforms
+ * without ACPI _PR3 power resources.
+ *
+ * Caller must handle IOMMU preparation/cleanup if needed.
+ *
+ * Returns 0 on success, negative error code on failure.
+ */
+int pci_dev_d3cold_d0_cycle(struct pci_dev *dev)
+{
+	int ret;
+
+	if (dev->current_state != PCI_D0)
+		return -EINVAL;
+
+	ret = pci_set_power_state(dev, PCI_D3cold);
+	if (ret)
+		return ret;
+
+	return pci_set_power_state(dev, PCI_D0);
+}
+
 /**
  * pci_d3cold_reset - Put device into D3cold and back to D0 for reset
  * @dev: PCI device to reset
@@ -4520,22 +4546,13 @@ static int pci_d3cold_reset(struct pci_dev *dev, bool probe)
 	if (probe)
 		return 0;
 
-	if (dev->current_state != PCI_D0)
-		return -EINVAL;
-
 	ret = pci_dev_reset_iommu_prepare(dev);
 	if (ret) {
 		pci_err(dev, "failed to stop IOMMU for a PCI reset: %d\n", ret);
 		return ret;
 	}
 
-	ret = pci_set_power_state(dev, PCI_D3cold);
-	if (ret)
-		goto done;
-
-	ret = pci_set_power_state(dev, PCI_D0);
-
-done:
+	ret = pci_dev_d3cold_d0_cycle(dev);
 	pci_dev_reset_iommu_done(dev);
 	return ret;
 }
drivers/pci/pci.h +1 -0
index 4a14f88e543a..a9942787de9e 100644
@@ -234,6 +234,7 @@ void pci_init_reset_methods(struct pci_dev *dev);
 int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
 int pci_bus_error_reset(struct pci_dev *dev);
 int pci_try_reset_bridge(struct pci_dev *bridge);
+int pci_dev_d3cold_d0_cycle(struct pci_dev *dev);
 
 struct pci_cap_saved_data {
 	u16		cap_nr;
drivers/pci/quirks.c +19 -0
index e49136ac5dbf..70f3b0f26799 100644
@@ -4237,6 +4237,22 @@ static int reset_hinic_vf_dev(struct pci_dev *pdev, bool probe)
 	return 0;
 }
 
+/*
+ * Device-specific reset method via D3cold/D3hot power cycle.
+ *
+ * Some devices lack working FLR, advertise NoSoftRst+ (blocking PM reset),
+ * and have broken bus reset. This function provides device-specific reset via
+ * power cycling, attempting D3cold with automatic fallback to D3hot on platforms
+ * without ACPI _PR3 power resources.
+ */
+static int reset_d3cold_d3hot(struct pci_dev *dev, bool probe)
+{
+	if (probe)
+		return 0;
+
+	return pci_dev_d3cold_d0_cycle(dev);
+}
+
 static const struct pci_dev_reset_methods pci_dev_reset_methods[] = {
 	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82599_SFP_VF,
 		 reset_intel_82599_sfp_virtfn },
@@ -4252,6 +4268,9 @@ static const struct pci_dev_reset_methods pci_dev_reset_methods[] = {
 		reset_chelsio_generic_dev },
 	{ PCI_VENDOR_ID_HUAWEI, PCI_DEVICE_ID_HINIC_VF,
 		reset_hinic_vf_dev },
+	{ PCI_VENDOR_ID_QCOM, 0x1103, reset_d3cold_d3hot },  /* ath11k */
+	{ PCI_VENDOR_ID_QCOM, 0x1107, reset_d3cold_d3hot },  /* ath12k */
+	{ PCI_VENDOR_ID_QCOM, 0x0308, reset_d3cold_d3hot },  /* SDX62/SDX65 */
 	{ 0 }
 };
 
Signature · 1 line
2.54.0
#4 lore raw

Re: [PATCH v6 2/3] PCI: Add device-specific reset for Qualcomm devices

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:

New issues:
- [High] Missing Device Initialization and CRS Polling Wait in pci_dev_d3cold_d0_cycle
- [Medium] Commit message contradiction regarding IOMMU preparation

Pre-existing issues:
- [High] IOMMU and ATS unconditionally disrupted during sysfs reset_method capabilities probe --

commit 8b985d62d4b41384aa769fbbb431c482aeb82ae9
Author: Jose Ignacio Tornos Martinez <[email protected]>

PCI: Add device-specific reset for Qualcomm devices

This patch adds device-specific reset methods for some Qualcomm PCIe devices (ath11k, ath12k, SDX62/SDX65) that lack working reset methods for VFIO passthrough. It introduces a shared pci_dev_d3cold_d0_cycle helper function that attempts D3cold with automatic fallback to D3hot on platforms without ACPI _PR3 power resources.

Quoted 5 lines

Extract a shared pci_dev_d3cold_d0_cycle() helper function to avoid code duplication between pci_d3cold_reset() (strict _PR3 requirement) and the new reset_d3cold_d3hot() device-specific reset (automaticfallback). The helper handles IOMMU preparation, performs the power cycle via pci_set_power_state(), and cleans up IOMMU state.

[Severity: Medium]
The commit message states "The helper handles IOMMU preparation", but the helper code documentation states "Caller must handle IOMMU preparation/cleanup if needed" and leaves IOMMU handling to the caller. Could the commit message be updated to reflect the implemented code logic?

[ ... ]

Quoted 23 lines
drivers/pci/pci.c +15 -0
index 096868f80cd4c..f7a7443287fdf 100644
@@ -4491,6 +4491,32 @@ static int pci_pm_reset(struct pci_dev *dev, bool probe)
 	return ret;
 }
 
+/**
+ * pci_dev_d3cold_d0_cycle - Perform D3cold->D0 power cycle
+ * @dev: Device to power cycle
+ *
+ * Common helper to perform D3cold->D0 power cycle for reset methods.
+ * Attempts D3cold transition with automatic fallback to D3hot on platforms
+ * without ACPI _PR3 power resources.
+ *
+ * Caller must handle IOMMU preparation/cleanup if needed.
+ *
+ * Returns 0 on success, negative error code on failure.
+ */
+int pci_dev_d3cold_d0_cycle(struct pci_dev *dev)
+{
+	int ret;

drivers/pci/pci.c static int pci_pm_reset(struct pci_dev *dev, bool probe) · line 4518

Quoted 10 lines
drivers/pci/pci.c +10 -0
+
+	if (dev->current_state != PCI_D0)
+		return -EINVAL;
+
+	ret = pci_set_power_state(dev, PCI_D3cold);
+	if (ret)
+		return ret;
+
+	return pci_set_power_state(dev, PCI_D0);
+}

[Severity: High]
Does this function need to wait for device readiness (CRS) before returning?

Unlike pci_pm_reset() which polls with pci_dev_wait(), this returns immediately after the D3hot->D0 transition. Since this targets the endpoint directly and bypasses bridge-level pci_bridge_wait_for_secondary_bus() delays, if the device internally resets during the transition and returns CRS (0xFFFF), will pci_set_full_power_state() incorrectly mask the state and return success prematurely?

If so, could this cause subsequent configuration accesses by VFIO to fail while the hardware is still initializing?

[ ... ]

Quoted 13 lines
drivers/pci/quirks.c +5 -0
index caaed1a01dc02..2380a29970736 100644
@@ -4237,6 +4237,22 @@ static int reset_hinic_vf_dev(struct pci_dev *pdev, bool probe)
 	return 0;
 }
 
+/*
+ * Device-specific reset method via D3cold/D3hot power cycle.
+ *
+ * Some devices lack working FLR, advertise NoSoftRst+ (blocking PM reset),
+ * and have broken bus reset. This function provides device-specific reset via

drivers/pci/quirks.c static int reset_hinic_vf_dev(struct pci_dev *pdev, bool probe) · line 4254

Quoted 10 lines
drivers/pci/quirks.c +10 -0
+ * power cycling, attempting D3cold with automatic fallback to D3hot on platforms
+ * without ACPI _PR3 power resources.
+ */
+static int reset_d3cold_d3hot(struct pci_dev *dev, bool probe)
+{
+	if (probe)
+		return 0;
+
+	return pci_dev_d3cold_d0_cycle(dev);
+}

[Severity: High]
This is a pre-existing issue, but since the commit message suggests overriding via sysfs, will querying these reset methods cause IOMMU faults for running devices?

When userspace reads or writes to /sys/bus/pci/devices/.../reset_method, the kernel calls reset methods with probe = true. In __pci_dev_specific_reset(), it unconditionally executes pci_dev_reset_iommu_prepare(dev) before checking the probe flag:

drivers/pci/quirks.c:__pci_dev_specific_reset() {
    ...
    ret = pci_dev_reset_iommu_prepare(dev);
    if (ret)
        return ret;
    // then calls i->reset(dev, probe);
    ...
}

Since pci_dev_reset_iommu_prepare() temporarily tears down PASID domains and halts translations, will querying the reset methods for an actively running device like ath11k disrupt ongoing DMA operations and cause system crashes?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#5 lore raw

Re: [PATCH v6 2/3] PCI: Add device-specific reset for Qualcomm devices

In reply to Jose Ignacio Tornos Martinez
Quoted 1 line · Jose Ignacio Tornos Martinez

Some Qualcomm PCIe devices (ath11k WiFi, ath12k WiFi, SDX62/SDX65 modems)

Throughout your series you refer to ath11k and ath12k as if they are devices. They are not. They are device drivers, each of which supports a large number of devices.

Quoted 7 lines

lack working reset methods for VFIO passthrough scenarios. These devices have no FLR capability, advertise NoSoftRst+ (blocking PM reset), and have broken bus reset.

The problem manifests in VFIO passthrough scenarios:

- ath11k WiFi (17cb:1103): Normal VM operation works fine, including

17cb:1103 is WCN6855

Quoted 6 lines

clean shutdown/reboot. However, when the VM terminates uncleanly (crash, force-off), VFIO attempts to reset the device before it can be assigned to another VM. Without a working reset method, the device remains in an undefined state, preventing reuse.

- ath12k WiFi (17cb:1107): Same behavior as ath11k.

17cb:1107 is WCN7850

Quoted 3 lines

- SDX62/SDX65 5G modems (17cb:0308): Never successfully initialize even on first VM assignment without proper reset capability.

...

drivers/pci/quirks.c static const struct pci_dev_reset_methods pci_dev_reset_methods[] = { · line 4271

Quoted 5 lines
drivers/pci/quirks.c +1 -0
@@ -4252,6 +4268,9 @@ static const struct pci_dev_reset_methods pci_dev_reset_methods[] = {
 		reset_chelsio_generic_dev },
 	{ PCI_VENDOR_ID_HUAWEI, PCI_DEVICE_ID_HINIC_VF,
 		reset_hinic_vf_dev },
+	{ PCI_VENDOR_ID_QCOM, 0x1103, reset_d3cold_d3hot },  /* ath11k */

s/ath11k/WCN6855/

drivers/pci/quirks.c static const struct pci_dev_reset_methods pci_dev_reset_methods[] = { · line 4272

Quoted 1 line
drivers/pci/quirks.c +1 -0
+	{ PCI_VENDOR_ID_QCOM, 0x1107, reset_d3cold_d3hot },  /* ath12k */

s/ath12k/WCN7850/

drivers/pci/quirks.c static const struct pci_dev_reset_methods pci_dev_reset_methods[] = { · line 4276

Quoted 4 lines
drivers/pci/quirks.c +1 -0
+	{ PCI_VENDOR_ID_QCOM, 0x0308, reset_d3cold_d3hot },  /* SDX62/SDX65 */
 	{ 0 }
 };
 

same guidance applies to the 3/3 patch

/jeff

#6 lore raw

Re: [PATCH v6 2/3] PCI: Add device-specific reset for Qualcomm devices

Hello Jeff,

Thank you for the feedback.
I incorrectly referred to the drivers instead of the actual device names. I'll send v7 with the corrections.

Thanks

Best regards
José Ignacio

#7 lore raw

PATCH v6 3/3 PCI: Disable broken bus reset on Qualcomm devices

In reply to Jose Ignacio Tornos Martinez

Some Qualcomm PCIe devices (ath11k WiFi, ath12k WiFi, SDX62/SDX65 modems) do not properly support Secondary Bus Reset (SBR).

Testing confirms this is device-specific, not deployment-specific:
MediaTek MT7925e successfully uses bus reset through the same passive M.2-to-PCIe adapters where Qualcomm devices fail, proving PERST# is properly wired through the adapters.

This quirk acts as a safety net, preventing the broken bus reset from being attempted if users override reset methods (device_specific or d3cold when available) via sysfs.

---
v6: code unchanged from v5
v5: https://lore.kernel.org/all/[email protected]/

 drivers/pci/quirks.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/pci/quirks.c +3 -0
index 000000000000..111111111111 100644
@@ -3789,6 +3789,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0030, quirk_no_bus_reset);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0032, quirk_no_bus_reset);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003e, quirk_no_bus_reset);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_QCOM, 0x1103, quirk_no_bus_reset); /* ath11k */
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_QCOM, 0x1107, quirk_no_bus_reset); /* ath12k */
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_QCOM, 0x0308, quirk_no_bus_reset); /* SDX62/SDX65 */
 

/*
* Root port on some Cavium CN8xxx chips do not successfully complete a bus
--
2.53.0