Skip to content
Commit a2c8fdca authored by Johan Hedberg's avatar Johan Hedberg Committed by Carles Cufí
Browse files

pcie: Add helper macro to identify valid identifiers



PCI(e) host controllers behave in different ways (some more buggy than
others) in what value they use to indicate that an endpoint is not
present. In most cases the VID/DID is all ones (PCIE_ID_NONE) but in
others it's all zeroes, and some may even have the VID all zeroes and
the DID all ones, or vice-versa.

Add a macro to easily test for all these possibilities. The "all ones"
and "all zeroes" cases have been verified to exist on actual HW
supported by Zephyr, however the test for the mixed cases is simply
based on what Linux considers valid values (drivers/pci/probe.c in the
Linux kernel tree).

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 18aee870
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment