• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/cam/scsi/

Lines Matching refs:periph

96 	struct cam_periph	*periph;
144 static void targdone(struct cam_periph *periph,
175 struct cam_periph *periph;
178 if (softc->periph == NULL) {
185 * Acquire a hold on the periph so that it doesn't go away before
188 periph = softc->periph;
189 cam_periph_acquire(periph);
190 cam_periph_lock(periph);
192 if (softc->periph != NULL) {
193 cam_periph_invalidate(softc->periph);
194 softc->periph = NULL;
196 cam_periph_unlock(periph);
197 cam_periph_release(periph);
203 * periph doesn't get created until an ioctl is issued to do so, and
215 softc->periph = NULL;
244 status = xpt_create_path(&path, /*periph*/NULL,
260 if (softc->periph == NULL) {
264 cam_periph_lock(softc->periph);
266 cam_periph_unlock(softc->periph);
272 /* If no periph available, disallow debugging changes */
310 cam_periph_lock(softc->periph);
315 cam_periph_unlock(softc->periph);
353 cam_periph_lock(softc->periph);
356 cam_periph_unlock(softc->periph);
388 struct cam_periph *periph;
414 /* Destroy any periph on our path if it is disabled */
415 periph = cam_periph_find(path, "targ");
416 if (periph != NULL) {
419 del_softc = (struct targ_softc *)periph->softc;
421 cam_periph_invalidate(del_softc->periph);
422 del_softc->periph = NULL;
425 periph->unit_number);
431 /* Create a periph instance attached to this path */
439 /* Ensure that the periph now exists. */
441 panic("targenable: succeeded but no periph?");
482 /* Initialize a periph (called from cam_periph_alloc) */
484 targctor(struct cam_periph *periph, void *arg)
488 /* Store pointer to softc for periph-driven routines */
490 periph->softc = softc;
491 softc->periph = periph;
492 softc->path = periph->path;
497 targdtor(struct cam_periph *periph)
503 softc = (struct targ_softc *)periph->softc;
519 softc->periph = NULL;
521 periph->softc = NULL;
557 cam_periph_lock(softc->periph);
568 cam_periph_unlock(softc->periph);
571 cam_periph_lock(softc->periph);
582 xpt_schedule(softc->periph, priority);
597 cam_periph_unlock(softc->periph);
616 /* Process requests (descrs) via the periph-supplied CCBs */
618 targstart(struct cam_periph *periph, union ccb *start_ccb)
624 softc = (struct targ_softc *)periph->softc;
639 xpt_print(periph->path,
650 xpt_schedule(periph, next_descr->priority);
764 targdone(struct cam_periph *periph, union ccb *done_ccb)
769 CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("targdone %p\n", done_ccb));
770 softc = (struct targ_softc *)periph->softc;
792 cam_periph_unlock(softc->periph);
794 cam_periph_lock(softc->periph);
823 cam_periph_lock(softc->periph);
828 error = cam_periph_sleep(softc->periph, user_queue,
840 cam_periph_unlock(softc->periph);
859 cam_periph_unlock(softc->periph);
861 cam_periph_lock(softc->periph);
879 cam_periph_unlock(softc->periph);
881 cam_periph_lock(softc->periph);
898 cam_periph_unlock(softc->periph);
973 /* Send back CCB if we got it from the periph */
1056 cam_periph_sleep(softc->periph, &softc->pending_ccb_queue,
1063 cam_periph_unlock(softc->periph);
1065 cam_periph_lock(softc->periph);