HomeFreeBSD

ofw_pci: fix probing for non-DT cases

Description

ofw_pci: fix probing for non-DT cases

phandle_t is a uint32_t type, <= 0 comparison doesn't work with it as intended.
This caused the ofw_pci code to attach to PCI bus on ACPI based systems.
Since 3eae4e106ac7 ("Fix error value returned by ofw_bus_gen_get_node().")
ofw subsystem can only return -1 for invalid nodes. Use that.

MFC after: 4 weeks
Reviewed by: mw
Differential revision: https://reviews.freebsd.org/D30953

Details

Provenance
kdAuthored on Jul 1 2021, 6:27 PM
mwCommitted on Jul 1 2021, 6:35 PM
Reviewer
mw
Differential Revision
D30953: ofw_pci: Fix probing
Parents
rGddb928096bff: dts: fsl-ls1028a: Correct ECAM PCIE window ranges
Branches
Unknown
Tags
Unknown