Lines Matching refs:dev
4 __FBSDID("$FreeBSD: releng/11.0/sys/dev/cm/if_cm_isa.c 296137 2016-02-27 03:38:01Z jhibbits $");
52 #include <dev/cm/smc90cx6reg.h>
53 #include <dev/cm/smc90cx6var.h>
59 cm_isa_probe(dev)
60 device_t dev;
62 struct cm_softc *sc = device_get_softc(dev);
67 dev, SYS_RES_IOPORT, &rid, CM_IO_PORTS, RF_ACTIVE);
72 cm_release_resources(dev);
78 dev, SYS_RES_MEMORY, &rid, CM_MEM_SIZE, RF_ACTIVE);
80 cm_release_resources(dev);
85 sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
87 cm_release_resources(dev);
95 cm_isa_attach(dev)
96 device_t dev;
98 struct cm_softc *sc = device_get_softc(dev);
102 mtx_init(&sc->sc_mtx, device_get_nameunit(dev),
104 error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE,
110 error = cm_attach(dev);
118 cm_release_resources(dev);
123 cm_isa_detach(device_t dev)
125 struct cm_softc *sc = device_get_softc(dev);
138 bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
141 cm_release_resources(dev);
143 bus_generic_detach(dev);