• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-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
464 * We always acquire a reference to the periph before queueing this
468 cam_periph_release_locked(periph);
478 struct cam_periph *periph;
480 periph = (struct cam_periph *)callback_arg;
523 softc = (struct pass_softc *)periph->softc;
525 * Acquire a reference to the periph before we
527 * a situation where the periph goes away before
530 if (cam_periph_acquire(periph) != 0)
539 cam_periph_async(periph, code, path, arg);
545 passregister(struct cam_periph *periph, void *arg)
577 periph->softc = softc;
578 softc->periph = periph;
584 periph->periph_name, periph->unit_number);
586 periph->periph_name, periph->unit_number);
588 knlist_init_mtx(&softc->read_select.si_note, cam_periph_mtx(periph));
590 xpt_path_inq(&cpi, periph->path);
607 cam_periph_unlock(periph);
610 periph->unit_number, 0,
622 pass_shutdown_kqueue, periph);
625 * Acquire a reference to the periph that we can release once we've
628 if (cam_periph_acquire(periph) != 0) {
629 xpt_print(periph->path, "%s: lost periph during "
631 cam_periph_lock(periph);
636 * Acquire a reference to the periph before we create the devfs
640 if (cam_periph_acquire(periph) != 0) {
641 xpt_print(periph->path, "%s: lost periph during "
643 cam_periph_lock(periph);
650 args.mda_unit = periph->unit_number;
654 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
837 passstart(struct cam_periph *periph, union ccb *start_ccb)
841 softc = (struct pass_softc *)periph->softc;
876 xpt_schedule(periph, CAM_PRIORITY_NORMAL);
885 passdone(struct cam_periph *periph, union ccb *done_ccb)
890 softc = (struct pass_softc *)periph->softc;
892 cam_periph_assert(periph, MA_OWNED);
901 xpt_print(periph->path, "%s: called for user CCB %p\n",
1004 * our reference to the periph since we won't have
1010 cam_periph_release_locked(periph);
1026 passcreatezone(struct cam_periph *periph)
1032 softc = (struct pass_softc *)periph->softc;
1034 cam_periph_assert(periph, MA_OWNED);
1052 cam_periph_unlock(periph);
1062 cam_periph_lock(periph);
1067 xpt_print(periph->path, "unable to allocate "
1070 xpt_print(periph->path, "unable to allocate "
1092 cam_periph_mtx(periph), PRIBIO,
1205 passcopysglist(struct cam_periph *periph, struct pass_io_req *io_req,
1237 xpt_print(periph->path, "%s: unable to access user "
1247 xpt_print(periph->path, "%s: copyout of %u "
1256 xpt_print(periph->path, "%s: copyin of %u "
1283 passmemsetup(struct cam_periph *periph, struct pass_io_req *io_req)
1296 cam_periph_assert(periph, MA_NOTOWNED);
1298 softc = periph->softc;
1429 xpt_print(periph->path, "%s: data length %u > max allowed %u "
1455 xpt_print(periph->path, "%s: user address %p "
1468 xpt_print(periph->path, "%s: malloced %p len %u, user "
1482 xpt_print(periph->path, "%s: copy of user "
1506 xpt_print(periph->path, "%s: cannot currently handle "
1516 xpt_print(periph->path, "%s: CAM_DATA_SG flag set, "
1527 xpt_print(periph->path, "%s: no dxfer_len specified, "
1565 xpt_print(periph->path, "%s: unable to access user "
1573 xpt_print(periph->path, "%s: copy of user S/G list "
1616 error = passcopysglist(periph, io_req, dirs[0]);
1636 xpt_print(periph->path, "%s: CAM_DATA_SG_PADDR flag "
1647 xpt_print(periph->path, "%s: no dxfer_len specified, "
1672 xpt_print(periph->path, "%s: copy of user S/G list "
1698 passmemdone(struct cam_periph *periph, struct pass_io_req *io_req)
1705 softc = (struct pass_softc *)periph->softc;
1719 xpt_print(periph->path, "Unable to copy %u "
1738 error = passcopysglist(periph, io_req, io_req->dirs[0]);
1776 struct cam_periph *periph;
1781 periph = (struct cam_periph *)dev->si_drv1;
1782 cam_periph_lock(periph);
1783 softc = (struct pass_softc *)periph->softc;
1811 xpt_print(periph->path, "CCB function code %#x is "
1831 ccb = cam_periph_getccb(periph, priority);
1837 xpt_setup_ccb(&ccb->ccb_h, periph->path,
1843 xpt_print(periph->path, "unable to allocate CCB\n");
1848 error = passsendccb(periph, ccb, inccb);
1870 error = passcreatezone(periph);
1879 cam_periph_unlock(periph);
1897 xpt_print(periph->path, "Copying user CCB %p to "
1902 xpt_print(periph->path, "Copy of user CCB %p to "
1934 xpt_print(periph->path, "CCB function code %#x is "
1966 xpt_setup_ccb_flags(&ccb->ccb_h, periph->path, priority,
1984 error = passmemsetup(periph, io_req);
1990 cam_periph_lock(periph);
2005 xpt_schedule(periph, priority);
2034 cam_periph_lock(periph);
2067 cam_periph_unlock(periph);
2073 error = passmemdone(periph, io_req);
2081 xpt_print(periph->path, "Copying to user CCB %p from "
2087 xpt_print(periph->path, "Copy to user CCB %p from "
2099 cam_periph_lock(periph);
2111 error = cam_periph_ioctl(periph, cmd, addr, passerror);
2116 cam_periph_unlock(periph);
2124 struct cam_periph *periph;
2128 periph = (struct cam_periph *)dev->si_drv1;
2129 softc = (struct pass_softc *)periph->softc;
2133 cam_periph_lock(periph);
2138 cam_periph_unlock(periph);
2149 struct cam_periph *periph;
2152 periph = (struct cam_periph *)dev->si_drv1;
2153 softc = (struct pass_softc *)periph->softc;
2155 kn->kn_hook = (caddr_t)periph;
2165 struct cam_periph *periph;
2168 periph = (struct cam_periph *)kn->kn_hook;
2169 softc = (struct pass_softc *)periph->softc;
2177 struct cam_periph *periph;
2181 periph = (struct cam_periph *)kn->kn_hook;
2182 softc = (struct pass_softc *)periph->softc;
2184 cam_periph_assert(periph, MA_OWNED);
2199 passsendccb(struct cam_periph *periph, union ccb *ccb, union ccb *inccb)
2207 softc = (struct pass_softc *)periph->softc;
2240 cam_periph_unlock(periph);
2242 cam_periph_lock(periph);
2264 cam_periph_unlock(periph);
2266 cam_periph_lock(periph);
2278 struct cam_periph *periph;
2281 periph = xpt_path_periph(ccb->ccb_h.path);
2282 softc = (struct pass_softc *)periph->softc;