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
Differential Revision: https://reviews.freebsd.org/D53862

(cherry picked from commit fa24602ca6282d71c26079136a74b85824c0e63b)

Details

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