Lines Matching refs:periph
104 struct cam_periph *periph; member
197 static void ctlfedone(struct cam_periph *periph,
502 ctlferegister(struct cam_periph *periph, void *arg) in ctlferegister() argument
514 softc->periph = periph; in ctlferegister()
515 periph->softc = softc; in ctlferegister()
517 xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); in ctlferegister()
525 xpt_print(periph->path, "%s: Enable LUN failed, status 0x%x\n", in ctlferegister()
561 xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1); in ctlferegister()
575 status = cam_periph_acquire(periph); in ctlferegister()
577 xpt_print(periph->path, "%s: could not acquire reference " in ctlferegister()
583 xpt_print(periph->path, "%s: could not allocate ATIO CCBs, " in ctlferegister()
607 xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1); in ctlferegister()
629 xpt_print(periph->path, "%s: could not allocate immediate " in ctlferegister()
640 ctlfeoninvalidate(struct cam_periph *periph) in ctlfeoninvalidate() argument
647 softc = (struct ctlfe_lun_softc *)periph->softc; in ctlfeoninvalidate()
649 xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); in ctlfeoninvalidate()
657 xpt_print(periph->path, "%s: Disable LUN failed, status 0x%x\n", in ctlfeoninvalidate()
671 ctlfecleanup(struct cam_periph *periph) in ctlfecleanup() argument
675 softc = (struct ctlfe_lun_softc *)periph->softc; in ctlfecleanup()
778 ctlfestart(struct cam_periph *periph, union ccb *start_ccb) in ctlfestart() argument
791 softc = (struct ctlfe_lun_softc *)periph->softc; in ctlfestart()
824 xpt_print(periph->path, "%s: tag 0x%04x " in ctlfestart()
844 xpt_print(periph->path, "%s: aborted " in ctlfestart()
862 xpt_print(periph->path, "%s: func_code " in ctlfestart()
885 xpt_schedule(periph, /*priority*/ 1); in ctlfestart()
908 xpt_print(periph->path, "%s: check condition " in ctlfestart()
966 cam_periph_unlock(periph); in ctlfestart()
968 cam_periph_lock(periph); in ctlfestart()
974 xpt_schedule(periph, /*priority*/ 1); in ctlfestart()
978 ctlfe_free_ccb(struct cam_periph *periph, union ccb *ccb) in ctlfe_free_ccb() argument
984 softc = (struct ctlfe_lun_softc *)periph->softc; in ctlfe_free_ccb()
1018 cam_periph_release_locked(periph); in ctlfe_free_ccb()
1091 ctlfedone(struct cam_periph *periph, union ccb *done_ccb) in ctlfedone() argument
1112 cam_release_devq(periph->path, in ctlfedone()
1120 softc = (struct ctlfe_lun_softc *)periph->softc; in ctlfedone()
1122 mtx = cam_periph_mtx(periph); in ctlfedone()
1133 if (periph->flags & CAM_PERIPH_INVALID) { in ctlfedone()
1138 ctlfe_free_ccb(periph, done_ccb); in ctlfedone()
1278 xpt_schedule(periph, /*priority*/ 1); in ctlfedone()
1306 if (periph->flags & CAM_PERIPH_INVALID) { in ctlfedone()
1307 ctlfe_free_ccb(periph, (union ccb *)atio); in ctlfedone()
1325 xpt_print(periph->path, "%s: tag 0x%04x " in ctlfedone()
1505 xpt_print(periph->path, in ctlfedone()
1534 xpt_print(periph->path, in ctlfedone()
1538 ctlfe_free_ccb(periph, done_ccb); in ctlfedone()
1735 struct cam_periph *periph; in ctlfe_online() local
1754 periph = cam_periph_find(path, "ctl"); in ctlfe_online()
1755 if (periph != NULL) { in ctlfe_online()
1797 struct cam_periph *periph; in ctlfe_offline() local
1816 if ((periph = cam_periph_find(path, "ctl")) != NULL) in ctlfe_offline()
1817 cam_periph_invalidate(periph); in ctlfe_offline()
1832 struct cam_periph *periph; in ctlfe_lun_enable() local
1850 periph = cam_periph_find(path, "ctl"); in ctlfe_lun_enable()
1851 if (periph != NULL) { in ctlfe_lun_enable()
1904 path = lun_softc->periph->path; in ctlfe_lun_disable()
1916 cam_periph_acquire(lun_softc->periph); in ctlfe_lun_disable()
1919 cam_periph_lock(lun_softc->periph); in ctlfe_lun_disable()
1920 cam_periph_invalidate(lun_softc->periph); in ctlfe_lun_disable()
1921 cam_periph_unlock(lun_softc->periph); in ctlfe_lun_disable()
1922 cam_periph_release(lun_softc->periph); in ctlfe_lun_disable()
1942 struct cam_periph *periph; in ctlfe_dump_queue() local
1945 periph = softc->periph; in ctlfe_dump_queue()
1968 xpt_print(periph->path, in ctlfe_dump_queue()
1976 xpt_print(periph->path, "%d requests total waiting for CCBs\n", in ctlfe_dump_queue()
1978 xpt_print(periph->path, "%ju CCBs outstanding (%ju allocated, %ju " in ctlfe_dump_queue()
1982 xpt_print(periph->path, "%ju CTIOs outstanding (%ju sent, %ju " in ctlfe_dump_queue()
1997 struct cam_periph *periph; in ctlfe_datamove() local
2004 periph = xpt_path_periph(ccb->ccb_h.path); in ctlfe_datamove()
2005 cam_periph_lock(periph); in ctlfe_datamove()
2006 softc = (struct ctlfe_lun_softc *)periph->softc; in ctlfe_datamove()
2012 xpt_schedule(periph, /*priority*/ 1); in ctlfe_datamove()
2013 cam_periph_unlock(periph); in ctlfe_datamove()
2020 struct cam_periph *periph; in ctlfe_done() local
2024 periph = xpt_path_periph(ccb->ccb_h.path); in ctlfe_done()
2025 cam_periph_lock(periph); in ctlfe_done()
2026 softc = (struct ctlfe_lun_softc *)periph->softc; in ctlfe_done()
2049 if (periph->flags & CAM_PERIPH_INVALID) { in ctlfe_done()
2050 ctlfe_free_ccb(periph, ccb); in ctlfe_done()
2052 cam_periph_unlock(periph); in ctlfe_done()
2060 xpt_schedule(periph, /*priority*/ 1); in ctlfe_done()
2063 cam_periph_unlock(periph); in ctlfe_done()