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

Lines Matching refs:periph

145 	struct cam_periph	 *periph;
171 static void passdone(struct cam_periph *periph,
173 static int passcreatezone(struct cam_periph *periph);
176 static int passcopysglist(struct cam_periph *periph,
179 static int passmemsetup(struct cam_periph *periph,
181 static int passmemdone(struct cam_periph *periph,
185 static int passsendccb(struct cam_periph *periph, union ccb *ccb,
234 passrejectios(struct cam_periph *periph)
239 softc = (struct pass_softc *)periph->softc;
282 cam_periph_doacquire(periph);
290 struct cam_periph *periph;
295 periph = (struct cam_periph *)arg;
296 mtx = cam_periph_mtx(periph);
299 softc = (struct pass_softc *)periph->softc;
309 cam_periph_release_locked(periph);
317 cam_periph_release_locked(periph);
318 passrejectios(periph);
323 * cam_periph_release_locked() above could result in the periph
324 * getting freed. If that is the case, dereferencing the periph
338 passoninvalidate(struct cam_periph *periph)
342 softc = (struct pass_softc *)periph->softc;
347 xpt_register_async(0, passasync, periph, periph->path);
355 destroy_dev_sched_cb(softc->dev, passdevgonecb, periph);
359 passcleanup(struct cam_periph *periph)
363 softc = (struct pass_softc *)periph->softc;
365 cam_periph_assert(periph, MA_OWNED);
381 cam_periph_unlock(periph);
390 * is because we hold a reference on the periph for kqueue, and
401 cam_periph_lock(periph);
409 struct cam_periph *periph;
412 periph = context;
413 softc = periph->softc;
421 cam_periph_release(periph);
427 struct cam_periph *periph;
436 periph = context;
437 softc = periph->softc;
439 mtx = cam_periph_mtx(periph);
442 if (periph->flags & CAM_PERIPH_INVALID)
446 "GEOM::physpath", periph->path) == 0
463 * We always acquire a reference to the periph before queueing this
467 cam_periph_release_locked(periph);
477 struct cam_periph *periph;
479 periph = (struct cam_periph *)callback_arg;
522 softc = (struct pass_softc *)periph->softc;
524 * Acquire a reference to the periph before we
526 * a situation where the periph goes away before
529 if (cam_periph_acquire(periph) != 0)
538 cam_periph_async(periph, code, path, arg);
544 passregister(struct cam_periph *periph, void *arg)
576 periph->softc = softc;
577 softc->periph = periph;
583 periph->periph_name, periph->unit_number);
585 periph->periph_name, periph->unit_number);
587 knlist_init_mtx(&softc->read_select.si_note, cam_periph_mtx(periph));
589 xpt_path_inq(&cpi, periph->path);
606 cam_periph_unlock(periph);
609 periph->unit_number, 0,
621 pass_shutdown_kqueue, periph);
624 * Acquire a reference to the periph that we can release once we've
627 if (cam_periph_acquire(periph) != 0) {
628 xpt_print(periph->path, "%s: lost periph during "
630 cam_periph_lock(periph);
635 * Acquire a reference to the periph before we create the devfs
639 if (cam_periph_acquire(periph) != 0) {
640 xpt_print(periph->path, "%s: lost periph during "
642 cam_periph_lock(periph);
649 args.mda_unit = periph->unit_number;
653 args.mda_si_drv1 = periph;
655 error = make_dev_s(&args, &softc->dev, "%s%d", periph->periph_name,
656 periph->unit_number);
658 cam_periph_lock(periph);
659 cam_periph_release_locked(periph);
664 * Hold a reference to the periph before we create the physical
667 if (cam_periph_acquire(periph) != 0) {
668 xpt_print(periph->path, "%s: lost periph during "
670 cam_periph_lock(periph);
674 cam_periph_lock(periph);
677 pass_add_physpath, periph);
691 passasync, periph, periph->path);
694 xpt_announce_periph(periph, NULL);
702 struct cam_periph *periph;
706 periph = (struct cam_periph *)dev->si_drv1;
707 if (cam_periph_acquire(periph) != 0)
710 cam_periph_lock(periph);
712 softc = (struct pass_softc *)periph->softc;
715 cam_periph_release_locked(periph);
716 cam_periph_unlock(periph);
725 cam_periph_release_locked(periph);
726 cam_periph_unlock(periph);
734 cam_periph_release_locked(periph);
735 cam_periph_unlock(periph);
743 xpt_print(periph->path, "can't do nonblocking access\n");
744 cam_periph_release_locked(periph);
745 cam_periph_unlock(periph);
751 cam_periph_unlock(periph);
759 struct cam_periph *periph;
763 periph = (struct cam_periph *)dev->si_drv1;
764 mtx = cam_periph_mtx(periph);
767 softc = periph->softc;
795 cam_periph_doacquire(periph);
816 cam_periph_release_locked(periph);
821 * cam_periph_release_locked() above could result in the periph
822 * getting freed. If that is the case, dereferencing the periph
836 passstart(struct cam_periph *periph, union ccb *start_ccb)
840 softc = (struct pass_softc *)periph->softc;
875 xpt_schedule(periph, CAM_PRIORITY_NORMAL);
884 passdone(struct cam_periph *periph, union ccb *done_ccb)
889 softc = (struct pass_softc *)periph->softc;
891 cam_periph_assert(periph, MA_OWNED);
900 xpt_print(periph->path, "%s: called for user CCB %p\n",
1003 * our reference to the periph since we won't have
1009 cam_periph_release_locked(periph);
1025 passcreatezone(struct cam_periph *periph)
1031 softc = (struct pass_softc *)periph->softc;
1033 cam_periph_assert(periph, MA_OWNED);
1050 cam_periph_unlock(periph);
1060 cam_periph_lock(periph);
1065 xpt_print(periph->path, "unable to allocate "
1068 xpt_print(periph->path, "unable to allocate "
1090 cam_periph_mtx(periph), PRIBIO,
1203 passcopysglist(struct cam_periph *periph, struct pass_io_req *io_req,
1236 xpt_print(periph->path, "%s: copyout of %u "
1245 xpt_print(periph->path, "%s: copyin of %u "
1272 passmemsetup(struct cam_periph *periph, struct pass_io_req *io_req)
1285 cam_periph_assert(periph, MA_NOTOWNED);
1287 softc = periph->softc;
1418 xpt_print(periph->path, "%s: data length %u > max allowed %u "
1443 xpt_print(periph->path, "%s: malloced %p len %u, user "
1457 xpt_print(periph->path, "%s: copy of user "
1481 xpt_print(periph->path, "%s: cannot currently handle "
1491 xpt_print(periph->path, "%s: CAM_DATA_SG flag set, "
1502 xpt_print(periph->path, "%s: no dxfer_len specified, "
1541 xpt_print(periph->path, "%s: copy of user S/G list "
1584 error = passcopysglist(periph, io_req, dirs[0]);
1604 xpt_print(periph->path, "%s: CAM_DATA_SG_PADDR flag "
1615 xpt_print(periph->path, "%s: no dxfer_len specified, "
1640 xpt_print(periph->path, "%s: copy of user S/G list "
1666 passmemdone(struct cam_periph *periph, struct pass_io_req *io_req)
1673 softc = (struct pass_softc *)periph->softc;
1687 xpt_print(periph->path, "Unable to copy %u "
1705 error = passcopysglist(periph, io_req, io_req->dirs[0]);
1743 struct cam_periph *periph;
1748 periph = (struct cam_periph *)dev->si_drv1;
1749 cam_periph_lock(periph);
1750 softc = (struct pass_softc *)periph->softc;
1777 xpt_print(periph->path, "CCB function code %#x is "
1797 ccb = cam_periph_getccb(periph, priority);
1803 xpt_setup_ccb(&ccb->ccb_h, periph->path,
1809 xpt_print(periph->path, "unable to allocate CCB\n");
1814 error = passsendccb(periph, ccb, inccb);
1836 error = passcreatezone(periph);
1845 cam_periph_unlock(periph);
1863 xpt_print(periph->path, "Copying user CCB %p to "
1868 xpt_print(periph->path, "Copy of user CCB %p to "
1900 xpt_print(periph->path, "CCB function code %#x is "
1932 xpt_setup_ccb_flags(&ccb->ccb_h, periph->path, priority,
1950 error = passmemsetup(periph, io_req);
1956 cam_periph_lock(periph);
1971 xpt_schedule(periph, priority);
2000 cam_periph_lock(periph);
2033 cam_periph_unlock(periph);
2039 error = passmemdone(periph, io_req);
2047 xpt_print(periph->path, "Copying to user CCB %p from "
2053 xpt_print(periph->path, "Copy to user CCB %p from "
2065 cam_periph_lock(periph);
2077 error = cam_periph_ioctl(periph, cmd, addr, passerror);
2082 cam_periph_unlock(periph);
2090 struct cam_periph *periph;
2094 periph = (struct cam_periph *)dev->si_drv1;
2095 softc = (struct pass_softc *)periph->softc;
2099 cam_periph_lock(periph);
2104 cam_periph_unlock(periph);
2115 struct cam_periph *periph;
2118 periph = (struct cam_periph *)dev->si_drv1;
2119 softc = (struct pass_softc *)periph->softc;
2121 kn->kn_hook = (caddr_t)periph;
2131 struct cam_periph *periph;
2134 periph = (struct cam_periph *)kn->kn_hook;
2135 softc = (struct pass_softc *)periph->softc;
2143 struct cam_periph *periph;
2147 periph = (struct cam_periph *)kn->kn_hook;
2148 softc = (struct pass_softc *)periph->softc;
2150 cam_periph_assert(periph, MA_OWNED);
2165 passsendccb(struct cam_periph *periph, union ccb *ccb, union ccb *inccb)
2173 softc = (struct pass_softc *)periph->softc;
2205 cam_periph_unlock(periph);
2207 cam_periph_lock(periph);
2229 cam_periph_unlock(periph);
2231 cam_periph_lock(periph);
2243 struct cam_periph *periph;
2246 periph = xpt_path_periph(ccb->ccb_h.path);
2247 softc = (struct pass_softc *)periph->softc;