aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2010-11-09 22:18:20 +0000
committerAlexander Motin <mav@FreeBSD.org>2010-11-09 22:18:20 +0000
commit651121bdee0ba4ecf436a818c0c97b05e2ee1d39 (patch)
tree21fca2fe107ad3aa396259a856a08cd588414d95 /sys/dev/pci
parent4dbb48f5a9a08cb4802b2b0b56db31679abda86b (diff)
Notes
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c10
-rw-r--r--sys/dev/pci/pcivar.h6
2 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 11a7943ce7df..ae3d3c556a16 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -116,6 +116,8 @@ static void pci_unmask_msix(device_t dev, u_int index);
static int pci_msi_blacklisted(void);
static void pci_resume_msi(device_t dev);
static void pci_resume_msix(device_t dev);
+static int pci_remap_intr_method(device_t bus, device_t dev,
+ u_int irq);
static device_method_t pci_methods[] = {
/* Device interface */
@@ -145,6 +147,7 @@ static device_method_t pci_methods[] = {
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD(bus_child_pnpinfo_str, pci_child_pnpinfo_str_method),
DEVMETHOD(bus_child_location_str, pci_child_location_str_method),
+ DEVMETHOD(bus_remap_intr, pci_remap_intr_method),
/* PCI interface */
DEVMETHOD(pci_read_config, pci_read_config_method),
@@ -1713,21 +1716,18 @@ pci_resume_msi(device_t dev)
2);
}
-int
-pci_remap_msi_irq(device_t dev, u_int irq)
+static int
+pci_remap_intr_method(device_t bus, device_t dev, u_int irq)
{
struct pci_devinfo *dinfo = device_get_ivars(dev);
pcicfgregs *cfg = &dinfo->cfg;
struct resource_list_entry *rle;
struct msix_table_entry *mte;
struct msix_vector *mv;
- device_t bus;
uint64_t addr;
uint32_t data;
int error, i, j;
- bus = device_get_parent(dev);
-
/*
* Handle MSI first. We try to find this IRQ among our list
* of MSI IRQs. If we find it, we request updated address and
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index 948370813e2d..d6a2a0e9ba9e 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -445,12 +445,6 @@ device_t pci_find_bsf(uint8_t, uint8_t, uint8_t);
device_t pci_find_dbsf(uint32_t, uint8_t, uint8_t, uint8_t);
device_t pci_find_device(uint16_t, uint16_t);
-/*
- * Can be used by MD code to request the PCI bus to re-map an MSI or
- * MSI-X message.
- */
-int pci_remap_msi_irq(device_t dev, u_int irq);
-
/* Can be used by drivers to manage the MSI-X table. */
int pci_pending_msix(device_t dev, u_int index);