Lines Matching refs:softc
136 struct pt_softc *softc; in ptopen() local
143 softc = (struct pt_softc *)periph->softc; in ptopen()
146 if (softc->flags & PT_FLAG_DEVICE_INVALID) { in ptopen()
152 if ((softc->flags & PT_FLAG_OPEN) == 0) in ptopen()
153 softc->flags |= PT_FLAG_OPEN; in ptopen()
170 struct pt_softc *softc; in ptclose() local
173 softc = (struct pt_softc *)periph->softc; in ptclose()
177 softc->flags &= ~PT_FLAG_OPEN; in ptclose()
192 struct pt_softc *softc; in ptstrategy() local
201 softc = (struct pt_softc *)periph->softc; in ptstrategy()
206 if ((softc->flags & PT_FLAG_DEVICE_INVALID)) { in ptstrategy()
215 bioq_insert_tail(&softc->bio_queue, bp); in ptstrategy()
246 struct pt_softc *softc; in ptctor() local
258 softc = (struct pt_softc *)malloc(sizeof(*softc),M_DEVBUF,M_NOWAIT); in ptctor()
260 if (softc == NULL) { in ptctor()
266 bzero(softc, sizeof(*softc)); in ptctor()
267 LIST_INIT(&softc->pending_ccbs); in ptctor()
268 softc->state = PT_STATE_NORMAL; in ptctor()
269 bioq_init(&softc->bio_queue); in ptctor()
271 softc->io_timeout = SCSI_PT_DEFAULT_TIMEOUT * 1000; in ptctor()
273 periph->softc = softc; in ptctor()
286 error = make_dev_s(&args, &softc->dev, "%s%d", periph->periph_name, in ptctor()
293 softc->device_stats = devstat_new_entry("pt", in ptctor()
322 struct pt_softc *softc; in ptoninvalidate() local
324 softc = (struct pt_softc *)periph->softc; in ptoninvalidate()
331 softc->flags |= PT_FLAG_DEVICE_INVALID; in ptoninvalidate()
338 bioq_flush(&softc->bio_queue, NULL, ENXIO); in ptoninvalidate()
344 struct pt_softc *softc; in ptdtor() local
346 softc = (struct pt_softc *)periph->softc; in ptdtor()
348 devstat_remove_entry(softc->device_stats); in ptdtor()
350 destroy_dev(softc->dev); in ptdtor()
352 free(softc, M_DEVBUF); in ptdtor()
397 struct pt_softc *softc; in ptasync() local
400 softc = (struct pt_softc *)periph->softc; in ptasync()
405 softc->flags |= PT_FLAG_RETRY_UA; in ptasync()
406 LIST_FOREACH(ccbh, &softc->pending_ccbs, periph_links.le) in ptasync()
419 struct pt_softc *softc; in ptstart() local
422 softc = (struct pt_softc *)periph->softc; in ptstart()
429 bp = bioq_first(&softc->bio_queue); in ptstart()
433 bioq_remove(&softc->bio_queue, bp); in ptstart()
435 devstat_start_transaction_bio(softc->device_stats, bp); in ptstart()
446 /*timeout*/softc->io_timeout); in ptstart()
454 LIST_INSERT_HEAD(&softc->pending_ccbs, &start_ccb->ccb_h, in ptstart()
458 bp = bioq_first(&softc->bio_queue); in ptstart()
472 struct pt_softc *softc; in ptdone() local
475 softc = (struct pt_softc *)periph->softc; in ptdone()
512 softc->flags |= PT_FLAG_DEVICE_INVALID; in ptdone()
520 bioq_flush(&softc->bio_queue, NULL, EIO); in ptdone()
550 biofinish(bp, softc->device_stats, 0); in ptdone()
568 struct pt_softc *softc; in ptioctl() local
572 softc = (struct pt_softc *)periph->softc; in ptioctl()
578 if (softc->io_timeout >= 1000) in ptioctl()
579 *(int *)addr = softc->io_timeout / 1000; in ptioctl()
589 softc->io_timeout = *(int *)addr * 1000; in ptioctl()