Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ce/if_ce.c
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | static device_method_t ce_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, ce_probe), | DEVMETHOD(device_probe, ce_probe), | ||||
DEVMETHOD(device_attach, ce_attach), | DEVMETHOD(device_attach, ce_attach), | ||||
DEVMETHOD(device_detach, ce_detach), | DEVMETHOD(device_detach, ce_detach), | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
static struct ce_dev { | |||||
uint16_t vendorid; | |||||
uint16_t deviceid; | |||||
const char *description; | |||||
} ce_devs[] = { | |||||
{ TAU32_PCI_VENDOR_ID, TAU32_PCI_DEVICE_ID, | |||||
"Cronyx-Tau32-PCI serial adapter" }, | |||||
}; | |||||
typedef struct _ce_dma_mem_t { | typedef struct _ce_dma_mem_t { | ||||
unsigned long phys; | unsigned long phys; | ||||
void *virt; | void *virt; | ||||
size_t size; | size_t size; | ||||
#if __FreeBSD_version >= 500000 | #if __FreeBSD_version >= 500000 | ||||
bus_dma_tag_t dmat; | bus_dma_tag_t dmat; | ||||
bus_dmamap_t mapp; | bus_dmamap_t mapp; | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 2,470 Lines • ▼ Show 20 Lines | |||||
#if __FreeBSD_version >= 500000 | #if __FreeBSD_version >= 500000 | ||||
#ifdef NETGRAPH | #ifdef NETGRAPH | ||||
MODULE_DEPEND (ng_ce, netgraph, NG_ABI_VERSION, NG_ABI_VERSION, NG_ABI_VERSION); | MODULE_DEPEND (ng_ce, netgraph, NG_ABI_VERSION, NG_ABI_VERSION, NG_ABI_VERSION); | ||||
#else | #else | ||||
MODULE_DEPEND (ce, sppp, 1, 1, 1); | MODULE_DEPEND (ce, sppp, 1, 1, 1); | ||||
#endif | #endif | ||||
#ifdef KLD_MODULE | #ifdef KLD_MODULE | ||||
DRIVER_MODULE (cemod, pci, ce_driver, ce_devclass, ce_modevent, NULL); | DRIVER_MODULE (cemod, pci, ce_driver, ce_devclass, ce_modevent, NULL); | ||||
MODULE_PNP_INFO("U16:vendor; U16:device", pci, cemod, ce_devs, | |||||
sizeof(ce_devs[0]), nitems(ce_devs)); | |||||
#else | #else | ||||
DRIVER_MODULE (ce, pci, ce_driver, ce_devclass, ce_modevent, NULL); | DRIVER_MODULE (ce, pci, ce_driver, ce_devclass, ce_modevent, NULL); | ||||
MODULE_PNP_INFO("U16:vendor; U16:device", pci, ce, ce_devs, | |||||
sizeof(ce_devs[0]), nitems(ce_devs)); | |||||
#endif | #endif | ||||
#else /* if __FreeBSD_version < 500000*/ | |||||
#ifdef NETGRAPH | |||||
DRIVER_MODULE (ce, pci, ce_driver, ce_devclass, ng_mod_event, &typestruct); | |||||
#else | |||||
DRIVER_MODULE (ce, pci, ce_driver, ce_devclass, ce_modevent, NULL); | |||||
#endif | |||||
#endif /* __FreeBSD_version < 500000 */ | |||||
#endif /* NPCI */ | #endif /* NPCI */ |