68cbe189fd
Instead of returning 0xffs some controllers, such as Layerscape generate an external exception when someone attempts to read any register of config space of a non-existing device other than PCIR_VENDOR. This causes a kernel panic. Fix it by bailing during device enumeration if a device vendor register returns invalid value. (0xffff) Use this opportunity to replace some hardcoded values with a macro. I believe that this change won't have any unintended side-effects since it is safe to assume that vendor == 0xffff -> hdr_type == 0xffff. Sponsored by: Alstom Obtained from: Semihalf Reviewed by: jhb MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D33059 |
||
---|---|---|
.. | ||
controller | ||
fixup_pci.c | ||
hostb_pci.c | ||
ignore_pci.c | ||
isa_pci.c | ||
pci_dw_if.m | ||
pci_dw_mv.c | ||
pci_dw.c | ||
pci_dw.h | ||
pci_host_generic_acpi.c | ||
pci_host_generic_acpi.h | ||
pci_host_generic_fdt.c | ||
pci_host_generic_fdt.h | ||
pci_host_generic.c | ||
pci_host_generic.h | ||
pci_if.m | ||
pci_iov_if.m | ||
pci_iov_private.h | ||
pci_iov_schema.c | ||
pci_iov.c | ||
pci_iov.h | ||
pci_pci.c | ||
pci_private.h | ||
pci_subr.c | ||
pci_user.c | ||
pci.c | ||
pcib_if.m | ||
pcib_private.h | ||
pcib_support.c | ||
pcireg.h | ||
pcivar.h | ||
schema_private.h | ||
vga_pci.c |