Lines Matching defs:sc
67 struct stg_softc * sc = device_get_softc(dev);
71 mtx_init(&sc->sc_sclow.sl_lock, "stg", NULL, MTX_DEF);
72 sc->port_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
73 &sc->port_rid, RF_ACTIVE);
74 if (sc->port_res == NULL) {
79 sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid,
81 if (sc->irq_res == NULL) {
95 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid,
97 if (sc->mem_res == NULL) {
108 struct stg_softc *sc = device_get_softc(dev);
110 if (sc->stg_intrhand)
111 bus_teardown_intr(dev, sc->irq_res, sc->stg_intrhand);
112 if (sc->port_res)
114 sc->port_rid, sc->port_res);
115 if (sc->irq_res)
117 sc->irq_rid, sc->irq_res);
118 if (sc->mem_res)
120 sc->mem_rid, sc->mem_res);
121 mtx_destroy(&sc->sc_sclow.sl_lock);
128 struct stg_softc *sc = device_get_softc(dev);
130 rv = stgprobesubr(sc->port_res,
139 struct stg_softc *sc;
143 sc = device_get_softc(dev);
145 slp = &sc->sc_sclow;
151 stgattachsubr(sc);
159 struct stg_softc *sc = device_get_softc(dev);
161 scsi_low_deactivate(&sc->sc_sclow);
162 scsi_low_detach(&sc->sc_sclow);
170 struct stg_softc *sc;
172 sc = arg;
173 SCSI_LOW_LOCK(&sc->sc_sclow);
174 stgintr(sc);
175 SCSI_LOW_UNLOCK(&sc->sc_sclow);