OpenCloudOS-Kernel/drivers/pci
Ethan Zhao f81be23e2d PCI: Make pci_dev_is_disconnected() helper public for other drivers
commit 39714fd73c6b60a8d27bcc5b431afb0828bf4434 upstream.

Make pci_dev_is_disconnected() public so that it can be called from
Intel VT-d driver to quickly fix/workaround the surprise removal
unplug hang issue for those ATS capable devices on PCIe switch downstream
hotplug capable ports.

Beside pci_device_is_present() function, this one has no config space
space access, so is light enough to optimize the normal pure surprise
removal and safe removal flow.

Intel-SIG: commit 39714fd73c6b PCI: Make pci_dev_is_disconnected() helper
public for other drivers
Backport for SPR/EMR/GNR support.

Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Tested-by: Haorong Ye <yehaorong@bytedance.com>
Signed-off-by: Ethan Zhao <haifeng.zhao@linux.intel.com>
Link: https://lore.kernel.org/r/20240301080727.3529832-2-haifeng.zhao@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
(cherry picked from commit 39714fd73c6b60a8d27bcc5b431afb0828bf4434)
Signed-off-by: Ethan Zhao <haifeng.zhao@linux.intel.com>
2024-06-12 19:28:33 +08:00
..
controller Add support for PCIe endpoint controller support 2024-06-11 21:23:27 +08:00
endpoint PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2024-06-11 21:14:44 +08:00
hotplug PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2024-06-11 21:16:03 +08:00
pcie PCI/RCEC: Fix RCiEP device to RCEC association 2024-06-11 21:18:35 +08:00
switch PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2024-06-11 21:16:03 +08:00
Kconfig PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable 2024-06-11 21:11:38 +08:00
Makefile PCI/MSI: Move MSI/MSI-X init to msi.c 2024-06-11 21:16:14 +08:00
access.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
ats.c PCI/ATS: Cache PRI PRG Response PASID Required bit 2024-06-11 21:11:47 +08:00
bus.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
ecam.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
host-bridge.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
iov.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2024-06-11 21:16:03 +08:00
irq.c PCI: Use IRQF_ONESHOT if pci_request_irq() called with no handler 2018-07-31 10:43:43 -05:00
mmap.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
msi.c PCI/MSI: Free newly allocated vectors if MSI-X allocation fails 2024-06-11 21:16:17 +08:00
of.c PCI: Treat "external-facing" devices themselves as internal 2024-06-11 21:07:12 +08:00
p2pdma.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2024-06-11 21:16:03 +08:00
pci-acpi.c PCI: Rename _DSM constants to align with spec 2024-06-11 21:16:02 +08:00
pci-bridge-emul.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pci-bridge-emul.h PCI: pci-bridge-emul: Extend pci_bridge_emul_init() with flags 2019-02-22 10:51:14 +00:00
pci-driver.c PCI: Avoid duplicate IDs in driver dynamic IDs list 2024-06-11 21:18:03 +08:00
pci-label.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2024-06-11 21:16:03 +08:00
pci-mid.c x86/cpu: Sanitize FAM6_ATOM naming 2018-10-02 10:14:32 +02:00
pci-pf-stub.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
pci-stub.c PCI: Replace printk(KERN_INFO) with pr_info(), etc 2019-05-09 07:49:54 -05:00
pci-sysfs.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2024-06-11 21:14:44 +08:00
pci.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2024-06-11 21:16:03 +08:00
pci.h PCI: Make pci_dev_is_disconnected() helper public for other drivers 2024-06-12 19:28:33 +08:00
probe.c PCI/ERR: Cache RCEC EA Capability offset in pci_init_capabilities() 2024-06-11 21:18:29 +08:00
proc.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2024-06-11 21:14:44 +08:00
quirks.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2024-06-11 21:14:44 +08:00
remove.c PCI: Fix pci_host_bridge struct device release/free handling 2024-06-11 21:10:54 +08:00
rom.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
search.c PCI: Introduce pci_real_dma_dev() 2024-06-11 21:06:45 +08:00
setup-bus.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
setup-irq.c PCI: Tidy comments 2018-03-19 14:20:43 -05:00
setup-res.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
slot.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2024-06-11 21:16:03 +08:00
syscall.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
vc.c Merge branch 'pci/trivial' 2019-09-23 16:10:31 -05:00
vpd.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
xen-pcifront.c Merge branch 'pci/printk' 2019-05-13 18:34:46 -05:00