hostb_pci.c (219902) | hostb_pci.c (232472) |
---|---|
1/* 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/pci/hostb_pci.c 219902 2011-03-23 13:10:15Z jhb $"); | 28__FBSDID("$FreeBSD: head/sys/dev/pci/hostb_pci.c 232472 2012-03-03 18:08:57Z jhb $"); |
29 30#include <sys/param.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34 35#include <dev/pci/pcivar.h> 36#include <dev/pci/pcireg.h> --- 155 unchanged lines hidden (view full) --- 192{ 193 194 device_printf(dev, "child %s requested pci_assign_interrupt\n", 195 device_get_nameunit(child)); 196 return (PCI_ASSIGN_INTERRUPT(device_get_parent(dev), dev)); 197} 198 199static int | 29 30#include <sys/param.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34 35#include <dev/pci/pcivar.h> 36#include <dev/pci/pcireg.h> --- 155 unchanged lines hidden (view full) --- 192{ 193 194 device_printf(dev, "child %s requested pci_assign_interrupt\n", 195 device_get_nameunit(child)); 196 return (PCI_ASSIGN_INTERRUPT(device_get_parent(dev), dev)); 197} 198 199static int |
200pci_hostb_find_cap(device_t dev, device_t child, int capability, 201 int *capreg) 202{ 203 204 return (pci_find_cap(dev, capability, capreg)); 205} 206 207static int |
|
200pci_hostb_find_extcap(device_t dev, device_t child, int capability, 201 int *capreg) 202{ 203 204 return (pci_find_extcap(dev, capability, capreg)); 205} 206 | 208pci_hostb_find_extcap(device_t dev, device_t child, int capability, 209 int *capreg) 210{ 211 212 return (pci_find_extcap(dev, capability, capreg)); 213} 214 |
215static int 216pci_hostb_find_htcap(device_t dev, device_t child, int capability, 217 int *capreg) 218{ 219 220 return (pci_find_htcap(dev, capability, capreg)); 221} 222 |
|
207static device_method_t pci_hostb_methods[] = { 208 /* Device interface */ 209 DEVMETHOD(device_probe, pci_hostb_probe), 210 DEVMETHOD(device_attach, pci_hostb_attach), 211 DEVMETHOD(device_shutdown, bus_generic_shutdown), 212 DEVMETHOD(device_suspend, bus_generic_suspend), 213 DEVMETHOD(device_resume, bus_generic_resume), 214 --- 13 unchanged lines hidden (view full) --- 228 DEVMETHOD(pci_write_config, pci_hostb_write_config), 229 DEVMETHOD(pci_enable_busmaster, pci_hostb_enable_busmaster), 230 DEVMETHOD(pci_disable_busmaster, pci_hostb_disable_busmaster), 231 DEVMETHOD(pci_enable_io, pci_hostb_enable_io), 232 DEVMETHOD(pci_disable_io, pci_hostb_disable_io), 233 DEVMETHOD(pci_get_powerstate, pci_hostb_get_powerstate), 234 DEVMETHOD(pci_set_powerstate, pci_hostb_set_powerstate), 235 DEVMETHOD(pci_assign_interrupt, pci_hostb_assign_interrupt), | 223static device_method_t pci_hostb_methods[] = { 224 /* Device interface */ 225 DEVMETHOD(device_probe, pci_hostb_probe), 226 DEVMETHOD(device_attach, pci_hostb_attach), 227 DEVMETHOD(device_shutdown, bus_generic_shutdown), 228 DEVMETHOD(device_suspend, bus_generic_suspend), 229 DEVMETHOD(device_resume, bus_generic_resume), 230 --- 13 unchanged lines hidden (view full) --- 244 DEVMETHOD(pci_write_config, pci_hostb_write_config), 245 DEVMETHOD(pci_enable_busmaster, pci_hostb_enable_busmaster), 246 DEVMETHOD(pci_disable_busmaster, pci_hostb_disable_busmaster), 247 DEVMETHOD(pci_enable_io, pci_hostb_enable_io), 248 DEVMETHOD(pci_disable_io, pci_hostb_disable_io), 249 DEVMETHOD(pci_get_powerstate, pci_hostb_get_powerstate), 250 DEVMETHOD(pci_set_powerstate, pci_hostb_set_powerstate), 251 DEVMETHOD(pci_assign_interrupt, pci_hostb_assign_interrupt), |
252 DEVMETHOD(pci_find_cap, pci_hostb_find_cap), |
|
236 DEVMETHOD(pci_find_extcap, pci_hostb_find_extcap), | 253 DEVMETHOD(pci_find_extcap, pci_hostb_find_extcap), |
254 DEVMETHOD(pci_find_htcap, pci_hostb_find_htcap), |
|
237 238 { 0, 0 } 239}; 240 241static driver_t pci_hostb_driver = { 242 "hostb", 243 pci_hostb_methods, 244 1, 245}; 246 247static devclass_t pci_hostb_devclass; 248 249DRIVER_MODULE(hostb, pci, pci_hostb_driver, pci_hostb_devclass, 0, 0); | 255 256 { 0, 0 } 257}; 258 259static driver_t pci_hostb_driver = { 260 "hostb", 261 pci_hostb_methods, 262 1, 263}; 264 265static devclass_t pci_hostb_devclass; 266 267DRIVER_MODULE(hostb, pci, pci_hostb_driver, pci_hostb_devclass, 0, 0); |