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

Lines Matching defs:periph

126 static void		sgdone(struct cam_periph *periph, union ccb *done_ccb);
127 static int sgsendccb(struct cam_periph *periph, union ccb *ccb);
128 static int sgsendrdwr(struct cam_periph *periph, union ccb *ccb);
176 struct cam_periph *periph;
181 periph = (struct cam_periph *)arg;
182 mtx = cam_periph_mtx(periph);
185 softc = (struct sg_softc *)periph->softc;
195 cam_periph_release_locked(periph);
202 cam_periph_release_locked(periph);
207 * cam_periph_release_locked() above could result in the periph
208 * getting freed. If that is the case, dereferencing the periph
215 sgoninvalidate(struct cam_periph *periph)
219 softc = (struct sg_softc *)periph->softc;
224 xpt_register_async(0, sgasync, periph, periph->path);
232 destroy_dev_sched_cb(softc->dev, sgdevgonecb, periph);
243 sgcleanup(struct cam_periph *periph)
247 softc = (struct sg_softc *)periph->softc;
257 struct cam_periph *periph;
259 periph = (struct cam_periph *)callback_arg;
293 cam_periph_async(periph, code, path, arg);
299 sgregister(struct cam_periph *periph, void *arg)
324 periph->softc = softc;
326 xpt_path_inq(&cpi, periph->path);
339 cam_periph_unlock(periph);
342 periph->unit_number, 0,
351 * Acquire a reference to the periph before we create the devfs
355 if (cam_periph_acquire(periph) != 0) {
356 xpt_print(periph->path, "%s: lost periph during "
358 cam_periph_lock(periph);
365 args.mda_unit = periph->unit_number;
369 args.mda_si_drv1 = periph;
371 periph->periph_name, periph->unit_number);
373 cam_periph_lock(periph);
374 cam_periph_release_locked(periph);
377 if (periph->unit_number < 26) {
379 periph->unit_number + 'a');
382 ((periph->unit_number / 26) - 1) + 'a',
383 (periph->unit_number % 26) + 'a');
385 cam_periph_lock(periph);
391 xpt_register_async(AC_LOST_DEVICE, sgasync, periph, periph->path);
394 xpt_announce_periph(periph, NULL);
400 sgdone(struct cam_periph *periph, union ccb *done_ccb)
405 softc = (struct sg_softc *)periph->softc;
436 struct cam_periph *periph;
440 periph = (struct cam_periph *)dev->si_drv1;
441 if (cam_periph_acquire(periph) != 0)
449 cam_periph_release(periph);
453 cam_periph_lock(periph);
455 softc = (struct sg_softc *)periph->softc;
457 cam_periph_release_locked(periph);
458 cam_periph_unlock(periph);
464 cam_periph_unlock(periph);
472 struct cam_periph *periph;
476 periph = (struct cam_periph *)dev->si_drv1;
477 mtx = cam_periph_mtx(periph);
480 softc = periph->softc;
483 cam_periph_release_locked(periph);
488 * cam_periph_release_locked() above could result in the periph
489 * getting freed. If that is the case, dereferencing the periph
507 struct cam_periph *periph;
512 periph = (struct cam_periph *)dev->si_drv1;
513 cam_periph_lock(periph);
515 softc = (struct sg_softc *)periph->softc;
554 ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
591 error = sgsendccb(periph, ccb);
627 id->host_no = cam_sim_path(xpt_path_sim(periph->path));
628 id->channel = xpt_path_path_id(periph->path);
629 id->scsi_id = xpt_path_target_id(periph->path);
630 id->lun = xpt_path_lun_id(periph->path);
672 cam_periph_unlock(periph);
680 struct cam_periph *periph;
689 periph = dev->si_drv1;
759 cam_periph_lock(periph);
760 sc = periph->softc;
761 xpt_setup_ccb(&ccb->ccb_h, periph->path, CAM_PRIORITY_NORMAL);
785 error = sgsendrdwr(periph, ccb);
786 cam_periph_unlock(periph);
802 struct cam_periph *periph;
809 periph = dev->si_drv1;
823 cam_periph_lock(periph);
824 sc = periph->softc;
831 if (cam_periph_sleep(periph, rdwr, PCATCH, "sgread", 0) == ERESTART)
836 cam_periph_unlock(periph);
880 cam_periph_lock(periph);
882 cam_periph_unlock(periph);
889 sgsendccb(struct cam_periph *periph, union ccb *ccb)
895 softc = periph->softc;
905 cam_periph_unlock(periph);
907 cam_periph_lock(periph);
917 cam_periph_unlock(periph);
919 cam_periph_lock(periph);
925 sgsendrdwr(struct cam_periph *periph, union ccb *ccb)
929 softc = periph->softc;
938 struct cam_periph *periph;
941 periph = xpt_path_periph(ccb->ccb_h.path);
942 softc = (struct sg_softc *)periph->softc;