HomeFreeBSD

Add error checking to the pci_find_cap(, PCIY_MSIX,) call that is returns

Description

Add error checking to the pci_find_cap(, PCIY_MSIX,) call that is returns
success and a good value. Only then try to use it and set the MSIX_ENABLE
bit.

With the current em(4) driver we have observed failures in this case in a
specific environment when pci_find_cap() would not return the assumed
value, which meant we ended up writing to PCI register 2 (PCI_DEVICE_ID)
which is read-only.

PR: 216456
Submitted by: bz

Details

Provenance
sbrunoAuthored on
Parents
rS312754: When both IPSEC_SUPPORT and TCP_SIGNATURE options are specified, build
Branches
Unknown
Tags
Unknown