Lines Matching refs:periph

103 	struct cam_periph *periph;
186 static void ctlfedone(struct cam_periph *periph,
199 static void ctlfe_free_ccb(struct cam_periph *periph,
201 static void ctlfe_requeue_ccb(struct cam_periph *periph,
455 ctlferegister(struct cam_periph *periph, void *arg)
469 softc->periph = periph;
470 periph->softc = softc;
475 cam_release_devq(periph->path,
482 xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NONE);
490 xpt_print(periph->path, "%s: Enable LUN failed, status 0x%x\n",
527 xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE);
541 acstatus = cam_periph_acquire(periph);
543 xpt_print(periph->path, "%s: could not acquire reference "
549 xpt_print(periph->path, "%s: could not allocate ATIO CCBs, "
574 xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE);
596 xpt_print(periph->path, "%s: could not allocate immediate "
607 ctlfeoninvalidate(struct cam_periph *periph)
609 struct ctlfe_lun_softc *softc = (struct ctlfe_lun_softc *)periph->softc;
616 xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NONE);
635 xpt_print(periph->path, "%s: Disable LUN failed, status 0x%x\n",
649 ctlfecleanup(struct cam_periph *periph)
653 softc = (struct ctlfe_lun_softc *)periph->softc;
764 ctlfestart(struct cam_periph *periph, union ccb *start_ccb)
777 softc = (struct ctlfe_lun_softc *)periph->softc;
822 ctlfe_requeue_ccb(periph, (union ccb *)atio,
903 cam_periph_unlock(periph);
905 cam_periph_lock(periph);
912 xpt_schedule(periph, CAM_PRIORITY_NORMAL);
918 struct cam_periph *periph = context;
919 struct ctlfe_lun_softc *softc = periph->softc;
921 cam_periph_lock(periph);
923 cam_periph_sleep(periph, &softc->refcount, PRIBIO,
926 cam_periph_unlock(periph);
927 cam_periph_release(periph);
931 ctlfe_free_ccb(struct cam_periph *periph, union ccb *ccb)
937 softc = (struct ctlfe_lun_softc *)periph->softc;
969 cam_periph_release_locked(periph);
971 TASK_INIT(&softc->refdrain_task, 0, ctlfe_drain, periph);
979 * Send the ATIO/INOT back to the SIM, or free it if periph was invalidated.
982 ctlfe_requeue_ccb(struct cam_periph *periph, union ccb *ccb, int unlock)
987 if (periph->flags & CAM_PERIPH_INVALID) {
988 mtx = cam_periph_mtx(periph);
989 ctlfe_free_ccb(periph, ccb);
994 softc = (struct ctlfe_lun_softc *)periph->softc;
1000 cam_periph_unlock(periph);
1007 xpt_setup_ccb_flags(&ccb->ccb_h, periph->path, CAM_PRIORITY_NONE,
1081 ctlfedone(struct cam_periph *periph, union ccb *done_ccb)
1103 cam_release_devq(periph->path,
1111 softc = (struct ctlfe_lun_softc *)periph->softc;
1113 mtx = cam_periph_mtx(periph);
1122 ctlfe_free_ccb(periph, done_ccb);
1242 xpt_schedule(periph, CAM_PRIORITY_NORMAL);
1296 ctlfe_requeue_ccb(periph, (union ccb *)atio,
1474 xpt_print(periph->path,
1482 xpt_print(periph->path,
1490 ctlfe_free_ccb(periph, done_ccb);
1507 ctlfe_requeue_ccb(periph, done_ccb, /* unlock */1);
1532 status = xpt_create_path(&path, /*periph*/ NULL, bus_softc->path_id,
1644 struct cam_periph *periph;
1651 status = xpt_create_path(&path, /*periph*/ NULL,
1655 printf("%s: unable to create path for wildcard periph\n",
1663 periph = cam_periph_find(path, "ctl");
1664 if (periph != NULL) {
1665 /* We've already got a periph, no need to alloc a new one. */
1706 struct cam_periph *periph;
1716 status = xpt_create_path(&path, /*periph*/ NULL,
1720 printf("%s: unable to create path for wildcard periph\n",
1725 if ((periph = cam_periph_find(path, "ctl")) != NULL)
1726 cam_periph_invalidate(periph);
1733 * CTL. So we only need to create a path/periph for this particular bus.
1741 struct cam_periph *periph;
1748 status = xpt_create_path(&path, /*periph*/ NULL,
1759 periph = cam_periph_find(path, "ctl");
1760 if (periph != NULL) {
1761 /* We've already got a periph, no need to alloc a new one. */
1813 path = lun_softc->periph->path;
1825 cam_periph_acquire(lun_softc->periph);
1828 cam_periph_lock(lun_softc->periph);
1829 cam_periph_invalidate(lun_softc->periph);
1830 cam_periph_unlock(lun_softc->periph);
1831 cam_periph_release(lun_softc->periph);
1850 struct cam_periph *periph = softc->periph;
1855 xpt_setup_ccb(&cgds.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
1859 xpt_print(periph->path, "devq: openings %d, active %d, "
1887 xpt_print(periph->path,
1895 xpt_print(periph->path, "%d requests waiting for CCBs\n", num_items);
1896 xpt_print(periph->path, "%d CTIOs outstanding\n", softc->ctios_sent);
1908 struct cam_periph *periph;
1916 periph = xpt_path_periph(ccb->ccb_h.path);
1917 cam_periph_lock(periph);
1918 softc = (struct ctlfe_lun_softc *)periph->softc;
1924 xpt_schedule(periph, CAM_PRIORITY_NORMAL);
1925 cam_periph_unlock(periph);
1932 struct cam_periph *periph;
1936 periph = xpt_path_periph(ccb->ccb_h.path);
1937 cam_periph_lock(periph);
1938 softc = (struct ctlfe_lun_softc *)periph->softc;
1971 ctlfe_requeue_ccb(periph, ccb, /* unlock */1);
1977 xpt_schedule(periph, CAM_PRIORITY_NORMAL);
1980 cam_periph_unlock(periph);