DF-2304 / fwpci_harness.h
/* * fwpci_harness.h -- shared ioctl definitions for the fwohci_pci.c * verification harness (kernel fwpci_harness.c + userland fwpcictl). * * Targets: DF-2304 DF-2305 DF-2306 (sys/bus/firewire/fwohci_pci.c). */ #ifndef _FWPCI_HARNESS_H #define _FWPCI_HARNESS_H #include <sys/ioccom.h> #include <sys/types.h> #define FWP_DELOG_MAX 8 #define FWP_MODE_DPAFAIL 0x1 /* force device_probe_and_attach fail */ #define FWP_MODE_DMATAGFAIL 0x2 /* force bus_dma_tag_create fail */ #define FWP_MODE_IRQFAIL 0x4 /* force irq bus_alloc_resource fail */ struct fwp_attachreq { u_int32_t mode; /* FWP_MODE_* */ u_int32_t rc; /* out: attach() return */ u_int32_t mem_allocs, mem_releases; /* deltas */ u_int32_t irq_allocs, irq_releases; u_int32_t intr_setups, intr_teardowns, live_handlers; u_int32_t mem_conflict_fails; u_int32_t dpa_calls, dmatag_calls; u_int32_t dellog_n; /* out: device_delete_child call count */ u_int32_t pad; u_int32_t del_lines[FWP_DELOG_MAX]; /* call-site lines */ u_int64_t del_childs[FWP_DELOG_MAX]; u_int32_t del_rcs[FWP_DELOG_MAX]; }; #define FWPCI_IOC_ATTACH _IOWR('P', 1, struct fwp_attachreq) struct fwp_probereq { u_int32_t vendor, device; /* in: fabricated PCI identity */ u_int32_t class, subclass, progif; u_int32_t rc; /* out: probe() return */ }; #define FWPCI_IOC_PROBE _IOWR('P', 2, struct fwp_probereq) struct fwp_ctlreq { u_int32_t op; /* 1 = forced fwohci_pci_detach (rig cleanup) * 2 = set bootverbose (arg) 3 = stats dump */ u_int32_t arg; u_int32_t rc; /* stats out (op=3): */ u_int32_t mem_allocs, mem_releases, irq_allocs, irq_releases; u_int32_t intr_setups, intr_teardowns, live_handlers; u_int32_t mem_conflict_fails, dellog_n; }; #define FWPCI_IOC_CTL _IOWR('P', 3, struct fwp_ctlreq) #endif /* _FWPCI_HARNESS_H */ |