aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/pci')
-rw-r--r--sys/amd64/pci/pci_bus.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c
index 37a4c6a6c4ec..d07c18dc6aa8 100644
--- a/sys/amd64/pci/pci_bus.c
+++ b/sys/amd64/pci/pci_bus.c
@@ -81,7 +81,7 @@ legacy_pcib_route_interrupt(device_t pcib, device_t dev, int pin)
return (PCI_INVALID_IRQ);
}
-/* Pass MSI alloc requests up to the nexus. */
+/* Pass MSI requests up to the nexus. */
static int
legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount,
@@ -95,12 +95,22 @@ legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount,
}
static int
-legacy_pcib_alloc_msix(device_t pcib, device_t dev, int index, int *irq)
+legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq)
{
device_t bus;
bus = device_get_parent(pcib);
- return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, index, irq));
+ return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq));
+}
+
+static int
+legacy_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr,
+ uint32_t *data)
+{
+ device_t bus;
+
+ bus = device_get_parent(pcib);
+ return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data));
}
static const char *
@@ -347,8 +357,8 @@ static device_method_t legacy_pcib_methods[] = {
DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi),
DEVMETHOD(pcib_release_msi, pcib_release_msi),
DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix),
- DEVMETHOD(pcib_remap_msix, pcib_remap_msix),
DEVMETHOD(pcib_release_msix, pcib_release_msix),
+ DEVMETHOD(pcib_map_msi, legacy_pcib_map_msi),
{ 0, 0 }
};