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 two new reset methods and a device-specific quirk: **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: soft reset method** Adds "soft" reset as absolute last resort when all other methods fail. Performs D3hot→D0 transition without checking NoSoftRst flag. Only becomes available when both pci_pm_reset() and pci_d3cold_reset() return -ENOTTY. Provides "better than nothing" reset for devices that would otherwise have no reset capability. Users retain full policy control via reset_methods sysfs. **Patch 3/3: Qualcomm quirk_no_bus_reset** Disables broken bus reset for Qualcomm ath11k/ath12k WiFi and SDX62/SDX65 modems. 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. mt7925e needs quirk_no_flr to work (https://lore.kernel.org/all/20260511123936.36054-1-jtornosm@redhat.com/) other cards using this adpaters are using flr method with no problem. **Changes in v4:** - Split v3's d3cold method (which fell back to D3hot) into two separate methods based on maintainer feedback (Alex Williamson) - d3cold now strictly requires _PR3, returns -ENOTTY otherwise - New "soft" method handles D3hot transition as last resort - Extracted pci_do_d3hot_transition() helper to avoid code duplication between pci_pm_reset() and pci_soft_reset() - Updated Qualcomm quirk commit message to reference new architecture **Testing:** All testing performed on 2023 desktops with M.2 WiFi cards via passive M.2-to-PCIe adapters in standard PCIe expansion slots (00:1c.x ports). Evidence for device-specific reset issues: - Realtek RTL8922AE: 00:1c.1, reset_method="flr bus", FLR works correctly (Proves FLR signaling works through passive adapters) - MediaTek MT7925e: 00:1c.1, reset_method="bus", bus reset works correctly (Has separate quirk_no_flr patch due to broken FLR, proves PERST# works) - Qualcomm WCN785x: 00:1c.4, reset_method="bus", bus reset FAILS (Same adapters, same slot type - proves device-specific SBR issue) All three devices use identical passive M.2-to-PCIe adapters in standard PCIe expansion slots. The fact that FLR works for Realtek and bus reset works for MediaTek but both fail for their respective broken devices confirms these are device-specific hardware issues, not deployment or adapter issues. D3hot transition testing (documented in detail): - Command register cleared: 0x0002 → 0x0000 → 0x0506 after driver init - BARs preserved: 0x84200004 maintained throughout - Device successfully reusable for VFIO passthrough after VM crash Reset hierarchy after this series: 1. device_specific 2. acpi 3. flr 4. af_flr 5. pm (unchanged - still checks NoSoftRst) 6. bus 7. cxl_bus 8. d3cold (NEW - strict _PR3 requirement) 9. soft (NEW - D3hot last resort) Jose Ignacio Tornos Martinez (3): PCI: Add d3cold as general reset method PCI: Add soft reset method as last resort PCI: Disable broken bus reset on Qualcomm devices -- 2.53.0
© 2016 - 2026 Red Hat, Inc.