Lines Matching defs:periph

94 	struct cam_periph	*periph;
141 static void targdone(struct cam_periph *periph,
172 struct cam_periph *periph;
175 if (softc->periph == NULL) {
182 * Acquire a hold on the periph so that it doesn't go away before
185 periph = softc->periph;
186 cam_periph_acquire(periph);
187 cam_periph_lock(periph);
189 if (softc->periph != NULL) {
190 cam_periph_invalidate(softc->periph);
191 softc->periph = NULL;
193 cam_periph_unlock(periph);
194 cam_periph_release(periph);
200 * periph doesn't get created until an ioctl is issued to do so, and
212 softc->periph = NULL;
241 status = xpt_create_path(&path, /*periph*/NULL,
257 if (softc->periph == NULL) {
261 cam_periph_lock(softc->periph);
263 cam_periph_unlock(softc->periph);
269 /* If no periph available, disallow debugging changes */
307 cam_periph_lock(softc->periph);
312 cam_periph_unlock(softc->periph);
350 cam_periph_lock(softc->periph);
353 cam_periph_unlock(softc->periph);
385 struct cam_periph *periph;
407 /* Destroy any periph on our path if it is disabled */
408 periph = cam_periph_find(path, "targ");
409 if (periph != NULL) {
412 del_softc = (struct targ_softc *)periph->softc;
414 cam_periph_invalidate(del_softc->periph);
415 del_softc->periph = NULL;
418 periph->unit_number);
424 /* Create a periph instance attached to this path */
432 /* Ensure that the periph now exists. */
434 panic("targenable: succeeded but no periph?");
475 /* Initialize a periph (called from cam_periph_alloc) */
477 targctor(struct cam_periph *periph, void *arg)
481 /* Store pointer to softc for periph-driven routines */
483 periph->softc = softc;
484 softc->periph = periph;
485 softc->path = periph->path;
490 targdtor(struct cam_periph *periph)
496 softc = (struct targ_softc *)periph->softc;
512 softc->periph = NULL;
514 periph->softc = NULL;
550 cam_periph_lock(softc->periph);
561 cam_periph_unlock(softc->periph);
564 cam_periph_lock(softc->periph);
575 xpt_schedule(softc->periph, priority);
590 cam_periph_unlock(softc->periph);
609 /* Process requests (descrs) via the periph-supplied CCBs */
611 targstart(struct cam_periph *periph, union ccb *start_ccb)
617 softc = (struct targ_softc *)periph->softc;
632 xpt_print(periph->path,
643 xpt_schedule(periph, next_descr->priority);
757 targdone(struct cam_periph *periph, union ccb *done_ccb)
762 CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("targdone %p\n", done_ccb));
763 softc = (struct targ_softc *)periph->softc;
785 cam_periph_unlock(softc->periph);
787 cam_periph_lock(softc->periph);
816 cam_periph_lock(softc->periph);
821 error = cam_periph_sleep(softc->periph, user_queue,
833 cam_periph_unlock(softc->periph);
852 cam_periph_unlock(softc->periph);
854 cam_periph_lock(softc->periph);
872 cam_periph_unlock(softc->periph);
874 cam_periph_lock(softc->periph);
891 cam_periph_unlock(softc->periph);
966 /* Send back CCB if we got it from the periph */
1049 cam_periph_sleep(softc->periph, &softc->pending_ccb_queue,
1056 cam_periph_unlock(softc->periph);
1058 cam_periph_lock(softc->periph);