]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add a new PCI bus interface method to alloc the ivars (dinfo) for a device.
authorjhb <jhb@FreeBSD.org>
Fri, 15 Apr 2016 03:42:12 +0000 (03:42 +0000)
committerjhb <jhb@FreeBSD.org>
Fri, 15 Apr 2016 03:42:12 +0000 (03:42 +0000)
commit784a797eede7e9e2ee3e82efedc1fc47547ca85b
treef27f63561d0afda441fc0921b7455bd4dce5e730
parentde393d2ab18de0224c30483ed700a7388058f4e9
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
sys/dev/acpica/acpi_pci.c
sys/dev/cardbus/cardbus.c
sys/dev/pci/pci.c
sys/dev/pci/pci_if.m
sys/dev/pci/pci_iov.c
sys/dev/pci/pci_private.h
sys/dev/pci/pcivar.h
sys/mips/nlm/xlp_pci.c
sys/powerpc/ofw/ofw_pcibus.c
sys/sparc64/pci/ofw_pcibus.c