HomeFreeBSD

LinuxKPI: pci: fix pcie_get_speed_cap()

Description

LinuxKPI: pci: fix pcie_get_speed_cap()

pcie_get_speed_cap() has a hard coded skip of 3 devices at the
beginning. It is either called on a pdev or on a result from
pci_upstream_bridge(). In the latter case skipping another three
devices might get us to acpi0 or nexus, neither of which is a
PCI device still and pci_get_vendor() will panic() on that.

Sponsored by: The FreeBSD Foundation (commit)
GHI: https://github.com/freebsd/drm-kmod/issues/393
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D53862

Details

Provenance
bzAuthored on Sep 17 2025, 11:37 PM
Differential Revision
D53862: LinuxKPI: pci: fix pcie_get_speed_cap()
Parents
rGf5a77dc8f8df: iwlwifi/rtw89: improve module Makefile dependency on ACPI
Branches
Unknown
Tags
Unknown