linux-stable/drivers/pci
Sui Jingfeng ccab04dc57 PCI: Add pci_get_base_class() helper
[ Upstream commit d427da2323 ]

There is no function to get all PCI devices in a system by matching
against the base class code only, ignoring the sub-class code and
the programming interface.  Add pci_get_base_class() to suit the
need.

For example, if a driver wants to process all PCI display devices in
a system, it can do so like this:

  pdev = NULL;
  while ((pdev = pci_get_base_class(PCI_BASE_CLASS_DISPLAY, pdev))) {
    do_something_for_pci_display_device(pdev);
  }

Link: https://lore.kernel.org/r/20230825062714.6325-2-sui.jingfeng@linux.dev
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
[bhelgaas: reword commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: c2bc958b2b ("fbdev: vesafb: Detect VGA compatibility from screen info's VESA attributes")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-11 12:47:15 +02:00
..
controller PCI: loongson: Enable MSI in LS7A Root Complex 2024-08-03 08:54:21 +02:00
endpoint PCI: endpoint: Fix error handling in epf_ntb_epc_cleanup() 2024-08-03 08:54:01 +02:00
hotplug Revert "PCI: acpiphp: Reassign resources on bridge if necessary" 2023-12-20 17:01:53 +01:00
msi PCI/MSI: Fix UAF in msi_capability_init 2024-07-05 09:34:01 +02:00
pcie PCI/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3 2024-06-12 11:12:27 +02:00
switch PCI: switchtec: Fix an error handling path in switchtec_pci_probe() 2024-03-26 18:19:46 -04:00
access.c
ats.c
bus.c PCI/ASPM: Fix deadlock when enabling ASPM 2024-04-27 17:11:44 +02:00
doe.c
ecam.c
host-bridge.c
iov.c
irq.c
Kconfig
Makefile
mmap.c
of.c
of_property.c PCI: of_property: Return error for int_map allocation failure 2024-06-12 11:12:24 +02:00
p2pdma.c PCI/P2PDMA: Fix a sleeping issue in a RCU read section 2024-03-26 18:19:46 -04:00
pci-acpi.c PCI/sysfs: Protect driver's D3cold preference from user space 2023-11-28 17:19:57 +00:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c PCI/PM: Drain runtime-idle callbacks before driver removal 2024-04-03 15:28:26 +02:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI/sysfs: Protect driver's D3cold preference from user space 2023-11-28 17:19:57 +00:00
pci.c PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal 2024-08-03 08:54:34 +02:00
pci.h PCI/ASPM: Fix deadlock when enabling ASPM 2024-04-27 17:11:44 +02:00
probe.c
proc.c
quirks.c PCI: Simplify pcie_capability_clear_and_set_word() to ..._clear_word() 2024-04-27 17:11:36 +02:00
remove.c
rom.c
search.c PCI: Add pci_get_base_class() helper 2024-08-11 12:47:15 +02:00
setup-bus.c PCI: Fix resource double counting on remove & rescan 2024-08-03 08:53:55 +02:00
setup-irq.c
setup-res.c
slot.c
syscall.c
vc.c
vgaarb.c
vpd.c
xen-pcifront.c