Lines Matching refs:softc
152 struct tod_softc *softc; in tod_getinfo() local
157 if ((softc = getsoftc(inst)) == NULL) { in tod_getinfo()
161 *result = (void *)softc->dip; in tod_getinfo()
181 struct tod_softc *softc = NULL; in tod_attach() local
204 softc = getsoftc(inst); in tod_attach()
205 softc->dip = dip; in tod_attach()
206 softc->cpr_stage = ~TOD_SUSPENDED; in tod_attach()
207 mutex_init(&softc->mutex, NULL, MUTEX_DRIVER, NULL); in tod_attach()
213 softc = getsoftc(inst); in tod_attach()
214 mutex_enter(&softc->mutex); in tod_attach()
215 softc->cpr_stage = ~TOD_SUSPENDED; in tod_attach()
216 mutex_exit(&softc->mutex); in tod_attach()
225 if (softc) in tod_attach()
237 struct tod_softc *softc; in tod_detach() local
243 if ((softc = getsoftc(inst)) == NULL) in tod_detach()
248 mutex_destroy(&softc->mutex); in tod_detach()
255 softc = getsoftc(inst); in tod_detach()
256 mutex_enter(&softc->mutex); in tod_detach()
257 softc->cpr_stage = TOD_SUSPENDED; in tod_detach()
258 mutex_exit(&softc->mutex); in tod_detach()
292 struct tod_softc *softc; in tod_ioctl() local
295 if ((softc = getsoftc(inst)) == NULL) in tod_ioctl()
298 mutex_enter(&softc->mutex); in tod_ioctl()
299 while (softc->cpr_stage == TOD_SUSPENDED) { in tod_ioctl()
300 mutex_exit(&softc->mutex); in tod_ioctl()
301 (void) ddi_dev_is_needed(softc->dip, 0, 1); in tod_ioctl()
302 mutex_enter(&softc->mutex); in tod_ioctl()
317 mutex_exit(&softc->mutex); in tod_ioctl()
325 mutex_exit(&softc->mutex); in tod_ioctl()
345 mutex_exit(&softc->mutex); in tod_ioctl()
352 mutex_exit(&softc->mutex); in tod_ioctl()
359 mutex_exit(&softc->mutex); in tod_ioctl()
366 mutex_exit(&softc->mutex); in tod_ioctl()
370 mutex_exit(&softc->mutex); in tod_ioctl()