Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ata/ata-pci.c
Show All 31 Lines | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/module.h> | #include <sys/module.h> | ||||
#include <sys/ata.h> | #include <sys/ata.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/conf.h> | #include <sys/conf.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/sbuf.h> | |||||
#include <sys/sema.h> | #include <sys/sema.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <vm/uma.h> | #include <vm/uma.h> | ||||
#include <machine/stdarg.h> | #include <machine/stdarg.h> | ||||
#include <machine/resource.h> | #include <machine/resource.h> | ||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
#include <dev/pci/pcivar.h> | #include <dev/pci/pcivar.h> | ||||
▲ Show 20 Lines • Show All 505 Lines • ▼ Show 20 Lines | ata_pci_print_child(device_t dev, device_t child) | ||||
retval += printf(" at channel %d", | retval += printf(" at channel %d", | ||||
(int)(intptr_t)device_get_ivars(child)); | (int)(intptr_t)device_get_ivars(child)); | ||||
retval += bus_print_child_footer(dev, child); | retval += bus_print_child_footer(dev, child); | ||||
return (retval); | return (retval); | ||||
} | } | ||||
int | int | ||||
ata_pci_child_location_str(device_t dev, device_t child, char *buf, | ata_pci_child_location(device_t dev, device_t child, struct sbuf *sb) | ||||
size_t buflen) | |||||
{ | { | ||||
snprintf(buf, buflen, "channel=%d", | sbuf_printf(sb, "channel=%d", | ||||
(int)(intptr_t)device_get_ivars(child)); | (int)(intptr_t)device_get_ivars(child)); | ||||
return (0); | return (0); | ||||
} | } | ||||
static bus_dma_tag_t | static bus_dma_tag_t | ||||
ata_pci_get_dma_tag(device_t bus, device_t child) | ata_pci_get_dma_tag(device_t bus, device_t child) | ||||
{ | { | ||||
Show All 16 Lines | static device_method_t ata_pci_methods[] = { | ||||
DEVMETHOD(bus_release_resource, ata_pci_release_resource), | DEVMETHOD(bus_release_resource, ata_pci_release_resource), | ||||
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), | DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), | ||||
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), | DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), | ||||
DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), | DEVMETHOD(bus_setup_intr, ata_pci_setup_intr), | ||||
DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), | DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), | ||||
DEVMETHOD(pci_read_config, ata_pci_read_config), | DEVMETHOD(pci_read_config, ata_pci_read_config), | ||||
DEVMETHOD(pci_write_config, ata_pci_write_config), | DEVMETHOD(pci_write_config, ata_pci_write_config), | ||||
DEVMETHOD(bus_print_child, ata_pci_print_child), | DEVMETHOD(bus_print_child, ata_pci_print_child), | ||||
DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), | DEVMETHOD(bus_child_location, ata_pci_child_location), | ||||
DEVMETHOD(bus_get_dma_tag, ata_pci_get_dma_tag), | DEVMETHOD(bus_get_dma_tag, ata_pci_get_dma_tag), | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
devclass_t ata_pci_devclass; | devclass_t ata_pci_devclass; | ||||
static driver_t ata_pci_driver = { | static driver_t ata_pci_driver = { | ||||
▲ Show 20 Lines • Show All 325 Lines • Show Last 20 Lines |