Use pci_find_cap() instead of pci_find_extcap() to locate PCI
find capabilities as the latter API is deprecated for this purpose. MFC after: 2 weeks
This commit is contained in:
parent
45b586acc4
commit
cda6c6abf9
@ -203,12 +203,12 @@ void oce_get_pci_capabilities(POCE_SOFTC sc)
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
if (pci_find_extcap(sc->dev, PCIY_PCIX, &val) == 0) {
|
||||
if (pci_find_cap(sc->dev, PCIY_PCIX, &val) == 0) {
|
||||
if (val != 0)
|
||||
sc->flags |= OCE_FLAGS_PCIX;
|
||||
}
|
||||
|
||||
if (pci_find_extcap(sc->dev, PCIY_EXPRESS, &val) == 0) {
|
||||
if (pci_find_cap(sc->dev, PCIY_EXPRESS, &val) == 0) {
|
||||
if (val != 0) {
|
||||
uint16_t link_status =
|
||||
pci_read_config(sc->dev, val + 0x12, 2);
|
||||
@ -219,12 +219,12 @@ void oce_get_pci_capabilities(POCE_SOFTC sc)
|
||||
}
|
||||
}
|
||||
|
||||
if (pci_find_extcap(sc->dev, PCIY_MSI, &val) == 0) {
|
||||
if (pci_find_cap(sc->dev, PCIY_MSI, &val) == 0) {
|
||||
if (val != 0)
|
||||
sc->flags |= OCE_FLAGS_MSI_CAPABLE;
|
||||
}
|
||||
|
||||
if (pci_find_extcap(sc->dev, PCIY_MSIX, &val) == 0) {
|
||||
if (pci_find_cap(sc->dev, PCIY_MSIX, &val) == 0) {
|
||||
if (val != 0) {
|
||||
val = pci_msix_count(sc->dev);
|
||||
sc->flags |= OCE_FLAGS_MSIX_CAPABLE;
|
||||
|
@ -251,10 +251,10 @@ vtpci_attach(device_t dev)
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
if (pci_find_extcap(dev, PCIY_MSI, NULL) != 0)
|
||||
if (pci_find_cap(dev, PCIY_MSI, NULL) != 0)
|
||||
sc->vtpci_flags |= VIRTIO_PCI_FLAG_NO_MSI;
|
||||
|
||||
if (pci_find_extcap(dev, PCIY_MSIX, NULL) == 0) {
|
||||
if (pci_find_cap(dev, PCIY_MSIX, NULL) == 0) {
|
||||
rid = PCIR_BAR(1);
|
||||
sc->vtpci_msix_res = bus_alloc_resource_any(dev,
|
||||
SYS_RES_MEMORY, &rid, RF_ACTIVE);
|
||||
|
Loading…
Reference in New Issue
Block a user