Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/puc/puc.c
Show All 30 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/bus.h> | #include <sys/bus.h> | ||||
#include <sys/conf.h> | #include <sys/conf.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/sbuf.h> | |||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
#include <machine/resource.h> | #include <machine/resource.h> | ||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
#include <dev/pci/pcireg.h> | #include <dev/pci/pcireg.h> | ||||
#include <dev/pci/pcivar.h> | #include <dev/pci/pcivar.h> | ||||
▲ Show 20 Lines • Show All 696 Lines • ▼ Show 20 Lines | puc_bus_print_child(device_t dev, device_t child) | ||||
retval += bus_print_child_header(dev, child); | retval += bus_print_child_header(dev, child); | ||||
retval += printf(" at port %d", port->p_nr); | retval += printf(" at port %d", port->p_nr); | ||||
retval += bus_print_child_footer(dev, child); | retval += bus_print_child_footer(dev, child); | ||||
return (retval); | return (retval); | ||||
} | } | ||||
int | int | ||||
puc_bus_child_location_str(device_t dev, device_t child, char *buf, | puc_bus_child_location(device_t dev, device_t child, struct sbuf *sb) | ||||
size_t buflen) | |||||
{ | { | ||||
struct puc_port *port; | struct puc_port *port; | ||||
port = device_get_ivars(child); | port = device_get_ivars(child); | ||||
snprintf(buf, buflen, "port=%d", port->p_nr); | sbuf_printf(sb, "port=%d", port->p_nr); | ||||
return (0); | return (0); | ||||
} | } | ||||
int | int | ||||
puc_bus_child_pnpinfo_str(device_t dev, device_t child, char *buf, | puc_bus_child_pnpinfo(device_t dev, device_t child, struct sbuf *sb) | ||||
size_t buflen) | |||||
{ | { | ||||
struct puc_port *port; | struct puc_port *port; | ||||
port = device_get_ivars(child); | port = device_get_ivars(child); | ||||
snprintf(buf, buflen, "type=%d", port->p_type); | sbuf_printf(sb, "type=%d", port->p_type); | ||||
return (0); | return (0); | ||||
} | } |