From owner-svn-src-stable-7@FreeBSD.ORG Wed Apr 27 21:13:41 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B461106564A; Wed, 27 Apr 2011 21:13:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5860D8FC12; Wed, 27 Apr 2011 21:13:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3RLDfox090523; Wed, 27 Apr 2011 21:13:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RLDfPe090517; Wed, 27 Apr 2011 21:13:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201104272113.p3RLDfPe090517@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Apr 2011 21:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221141 - in stable/7/sys/dev: acpica pci X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 21:13:41 -0000 Author: jhb Date: Wed Apr 27 21:13:40 2011 New Revision: 221141 URL: http://svn.freebsd.org/changeset/base/221141 Log: MFC 210864: - Retire acpi_pcib_resume(). It is has just been an alias for bus_generic_resume() since the pci_link(4) driver was added. - Change the ACPI PCI-PCI bridge driver to inherit most of its methods from the generic PCI-PCI bridge driver. - This also exposes the generic PCI-PCI bridge driver as pcib_driver so other drivers can inherit from it. Modified: stable/7/sys/dev/acpica/acpi_pcib.c stable/7/sys/dev/acpica/acpi_pcib_acpi.c stable/7/sys/dev/acpica/acpi_pcib_pci.c stable/7/sys/dev/acpica/acpi_pcibvar.h stable/7/sys/dev/pci/pcib_private.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/acpica/acpi_pcib.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_pcib.c Wed Apr 27 21:13:20 2011 (r221140) +++ stable/7/sys/dev/acpica/acpi_pcib.c Wed Apr 27 21:13:40 2011 (r221141) @@ -170,13 +170,6 @@ acpi_pcib_attach(device_t dev, ACPI_BUFF return_VALUE (bus_generic_attach(dev)); } -int -acpi_pcib_resume(device_t dev) -{ - - return (bus_generic_resume(dev)); -} - static void prt_lookup_device(ACPI_PCI_ROUTING_TABLE *entry, void *arg) { Modified: stable/7/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_pcib_acpi.c Wed Apr 27 21:13:20 2011 (r221140) +++ stable/7/sys/dev/acpica/acpi_pcib_acpi.c Wed Apr 27 21:13:40 2011 (r221141) @@ -63,7 +63,6 @@ struct acpi_hpcib_softc { static int acpi_pcib_acpi_probe(device_t bus); static int acpi_pcib_acpi_attach(device_t bus); -static int acpi_pcib_acpi_resume(device_t bus); static int acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); static int acpi_pcib_write_ivar(device_t dev, device_t child, @@ -91,7 +90,7 @@ static device_method_t acpi_pcib_acpi_me DEVMETHOD(device_attach, acpi_pcib_acpi_attach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, acpi_pcib_acpi_resume), + DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), @@ -250,13 +249,6 @@ acpi_pcib_acpi_attach(device_t dev) return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus)); } -static int -acpi_pcib_acpi_resume(device_t dev) -{ - - return (acpi_pcib_resume(dev)); -} - /* * Support for standard PCI bridge ivars. */ Modified: stable/7/sys/dev/acpica/acpi_pcib_pci.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_pcib_pci.c Wed Apr 27 21:13:20 2011 (r221140) +++ stable/7/sys/dev/acpica/acpi_pcib_pci.c Wed Apr 27 21:13:40 2011 (r221141) @@ -63,7 +63,6 @@ struct acpi_pcib_lookup_info { static int acpi_pcib_pci_probe(device_t bus); static int acpi_pcib_pci_attach(device_t bus); -static int acpi_pcib_pci_resume(device_t bus); static int acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); static int acpi_pcib_pci_route_interrupt(device_t pcib, @@ -73,39 +72,20 @@ static device_method_t acpi_pcib_pci_met /* Device interface */ DEVMETHOD(device_probe, acpi_pcib_pci_probe), DEVMETHOD(device_attach, acpi_pcib_pci_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, acpi_pcib_pci_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), - DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots, pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, acpi_pcib_pci_route_interrupt), - DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), - DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_release_msix, pcib_release_msix), - DEVMETHOD(pcib_map_msi, pcib_map_msi), {0, 0} }; static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods, - sizeof(struct acpi_pcib_softc)); +DEFINE_CLASS_1(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods, + sizeof(struct acpi_pcib_softc), pcib_driver); DRIVER_MODULE(acpi_pcib, pci, acpi_pcib_pci_driver, pcib_devclass, 0, 0); MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1); @@ -140,13 +120,6 @@ acpi_pcib_pci_attach(device_t dev) } static int -acpi_pcib_pci_resume(device_t dev) -{ - - return (acpi_pcib_resume(dev)); -} - -static int acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct acpi_pcib_softc *sc = device_get_softc(dev); Modified: stable/7/sys/dev/acpica/acpi_pcibvar.h ============================================================================== --- stable/7/sys/dev/acpica/acpi_pcibvar.h Wed Apr 27 21:13:20 2011 (r221140) +++ stable/7/sys/dev/acpica/acpi_pcibvar.h Wed Apr 27 21:13:40 2011 (r221141) @@ -31,13 +31,14 @@ #define _ACPI_PCIBVAR_H_ #ifdef _KERNEL + void acpi_pci_link_add_reference(device_t dev, int index, device_t pcib, int slot, int pin); int acpi_pci_link_route_interrupt(device_t dev, int index); int acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno); int acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, ACPI_BUFFER *prtbuf); -int acpi_pcib_resume(device_t dev); + #endif /* _KERNEL */ #endif /* !_ACPI_PCIBVAR_H_ */ Modified: stable/7/sys/dev/pci/pcib_private.h ============================================================================== --- stable/7/sys/dev/pci/pcib_private.h Wed Apr 27 21:13:20 2011 (r221140) +++ stable/7/sys/dev/pci/pcib_private.h Wed Apr 27 21:13:40 2011 (r221141) @@ -37,6 +37,7 @@ * Export portions of generic PCI:PCI bridge support so that it can be * used by subclasses. */ +DECLARE_CLASS(pcib_driver); /* * Bridge-specific data.