ata-pci.h (185268) | ata-pci.h (185500) |
---|---|
1/*- 2 * Copyright (c) 2003 - 2008 S�ren Schmidt <sos@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 --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 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 * | 1/*- 2 * Copyright (c) 2003 - 2008 S�ren Schmidt <sos@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 --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 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 * $FreeBSD: head/sys/dev/ata/ata-pci.h 185268 2008-11-25 00:39:03Z rpaulo $ | 26 * $FreeBSD: head/sys/dev/ata/ata-pci.h 185500 2008-12-01 01:34:18Z mav $ |
27 */ 28 29/* structure holding chipset config info */ 30struct ata_chip_id { 31 u_int32_t chipid; 32 u_int8_t chiprev; 33 int cfg1; 34 int cfg2; --- 409 unchanged lines hidden (view full) --- 444extern devclass_t ata_pci_devclass; 445 446/* macro for easy definition of all driver module stuff */ 447#define ATA_DECLARE_DRIVER(dname) \ 448static device_method_t __CONCAT(dname,_methods)[] = { \ 449 DEVMETHOD(device_probe, __CONCAT(dname,_probe)), \ 450 DEVMETHOD(device_attach, ata_pci_attach), \ 451 DEVMETHOD(device_detach, ata_pci_detach), \ | 27 */ 28 29/* structure holding chipset config info */ 30struct ata_chip_id { 31 u_int32_t chipid; 32 u_int8_t chiprev; 33 int cfg1; 34 int cfg2; --- 409 unchanged lines hidden (view full) --- 444extern devclass_t ata_pci_devclass; 445 446/* macro for easy definition of all driver module stuff */ 447#define ATA_DECLARE_DRIVER(dname) \ 448static device_method_t __CONCAT(dname,_methods)[] = { \ 449 DEVMETHOD(device_probe, __CONCAT(dname,_probe)), \ 450 DEVMETHOD(device_attach, ata_pci_attach), \ 451 DEVMETHOD(device_detach, ata_pci_detach), \ |
452 DEVMETHOD(device_suspend, bus_generic_suspend), \ 453 DEVMETHOD(device_resume, bus_generic_resume), \ | 452 DEVMETHOD(device_suspend, ata_pci_suspend), \ 453 DEVMETHOD(device_resume, ata_pci_resume), \ |
454 DEVMETHOD(device_shutdown, bus_generic_shutdown), \ 455 DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), \ 456 DEVMETHOD(bus_release_resource, ata_pci_release_resource), \ 457 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), \ 458 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), \ 459 DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), \ 460 DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), \ 461 { 0, 0 } \ 462}; \ 463static driver_t __CONCAT(dname,_driver) = { \ 464 "atapci", \ 465 __CONCAT(dname,_methods), \ 466 sizeof(struct ata_pci_controller) \ 467}; \ 468DRIVER_MODULE(dname, pci, __CONCAT(dname,_driver), ata_pci_devclass, 0, 0); \ 469MODULE_VERSION(dname, 1); \ 470MODULE_DEPEND(dname, ata, 1, 1, 1); \ 471MODULE_DEPEND(dname, atapci, 1, 1, 1); 472 | 454 DEVMETHOD(device_shutdown, bus_generic_shutdown), \ 455 DEVMETHOD(bus_alloc_resource, ata_pci_alloc_resource), \ 456 DEVMETHOD(bus_release_resource, ata_pci_release_resource), \ 457 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), \ 458 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), \ 459 DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), \ 460 DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), \ 461 { 0, 0 } \ 462}; \ 463static driver_t __CONCAT(dname,_driver) = { \ 464 "atapci", \ 465 __CONCAT(dname,_methods), \ 466 sizeof(struct ata_pci_controller) \ 467}; \ 468DRIVER_MODULE(dname, pci, __CONCAT(dname,_driver), ata_pci_devclass, 0, 0); \ 469MODULE_VERSION(dname, 1); \ 470MODULE_DEPEND(dname, ata, 1, 1, 1); \ 471MODULE_DEPEND(dname, atapci, 1, 1, 1); 472 |