summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-04-15 03:42:12 +0000
committerjhb <jhb@FreeBSD.org>2016-04-15 03:42:12 +0000
commit784a797eede7e9e2ee3e82efedc1fc47547ca85b (patch)
treef27f63561d0afda441fc0921b7455bd4dce5e730 /sys/mips
parentde393d2ab18de0224c30483ed700a7388058f4e9 (diff)
downloadFreeBSD-src-784a797eede7e9e2ee3e82efedc1fc47547ca85b.zip
FreeBSD-src-784a797eede7e9e2ee3e82efedc1fc47547ca85b.tar.gz
Add a new PCI bus interface method to alloc the ivars (dinfo) for a device.
The ACPI and OFW PCI bus drivers as well as CardBus override this to allocate the larger ivars to hold additional info beyond the stock PCI ivars. This removes the need to pass the size to functions like pci_add_iov_child() and pci_read_device() simplifying IOV and bus rescanning implementations. As a result of this and earlier changes, the ACPI PCI bus driver no longer needs its own device_attach and pci_create_iov_child methods but can use the methods in the stock PCI bus driver instead. Differential Revision: https://reviews.freebsd.org/D5891
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/nlm/xlp_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/mips/nlm/xlp_pci.c b/sys/mips/nlm/xlp_pci.c
index 863c6aa..9e91146 100644
--- a/sys/mips/nlm/xlp_pci.c
+++ b/sys/mips/nlm/xlp_pci.c
@@ -125,8 +125,8 @@ xlp_pci_attach(device_t dev)
XLP_PCI_DEVSCRATCH_REG0 << 2,
(1 << 8) | irq, 4);
}
- dinfo = pci_read_device(pcib, pcib_get_domain(dev),
- busno, s, f, sizeof(*dinfo));
+ dinfo = pci_read_device(pcib, dev, pcib_get_domain(dev),
+ busno, s, f);
pci_add_child(dev, dinfo);
}
}
OpenPOWER on IntegriCloud