diff options
Diffstat (limited to 'src/include/device')
-rw-r--r-- | src/include/device/pci.h | 2 | ||||
-rw-r--r-- | src/include/device/pci_ops.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/include/device/pci.h b/src/include/device/pci.h index df9e80dbbb..60cf4aa35c 100644 --- a/src/include/device/pci.h +++ b/src/include/device/pci.h @@ -97,6 +97,8 @@ static inline const struct pci_bus_operations *ops_pci_bus(struct bus *bus) if (bus && bus->dev && bus->dev->ops) { bops = bus->dev->ops->ops_pci_bus; } + if (!bops) + bops = pci_remember_direct(); return bops; } diff --git a/src/include/device/pci_ops.h b/src/include/device/pci_ops.h index da7e6c5d17..13eee9d4a9 100644 --- a/src/include/device/pci_ops.h +++ b/src/include/device/pci_ops.h @@ -21,4 +21,7 @@ void pci_mmio_write_config16(device_t dev, unsigned where, uint16_t val); void pci_mmio_write_config32(device_t dev, unsigned where, uint32_t val); #endif +/* This function lives in pci_ops_auto.c */ +const struct pci_bus_operations *pci_remember_direct(void); + #endif /* PCI_OPS_H */ |