Lines Matching refs:periph

96 static	void		ptdone(struct cam_periph *periph,
135 struct cam_periph *periph; in ptopen() local
139 periph = (struct cam_periph *)dev->si_drv1; in ptopen()
140 if (cam_periph_acquire(periph) != 0) in ptopen()
143 softc = (struct pt_softc *)periph->softc; in ptopen()
145 cam_periph_lock(periph); in ptopen()
147 cam_periph_release_locked(periph); in ptopen()
148 cam_periph_unlock(periph); in ptopen()
156 cam_periph_release(periph); in ptopen()
159 CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, in ptopen()
162 cam_periph_unlock(periph); in ptopen()
169 struct cam_periph *periph; in ptclose() local
172 periph = (struct cam_periph *)dev->si_drv1; in ptclose()
173 softc = (struct pt_softc *)periph->softc; in ptclose()
175 cam_periph_lock(periph); in ptclose()
178 cam_periph_release_locked(periph); in ptclose()
179 cam_periph_unlock(periph); in ptclose()
191 struct cam_periph *periph; in ptstrategy() local
194 periph = (struct cam_periph *)bp->bio_dev->si_drv1; in ptstrategy()
196 if (periph == NULL) { in ptstrategy()
200 cam_periph_lock(periph); in ptstrategy()
201 softc = (struct pt_softc *)periph->softc; in ptstrategy()
207 cam_periph_unlock(periph); in ptstrategy()
220 xpt_schedule(periph, CAM_PRIORITY_NORMAL); in ptstrategy()
221 cam_periph_unlock(periph); in ptstrategy()
244 ptctor(struct cam_periph *periph, void *arg) in ptctor() argument
273 periph->softc = softc; in ptctor()
275 xpt_path_inq(&cpi, periph->path); in ptctor()
277 cam_periph_unlock(periph); in ptctor()
281 args.mda_unit = periph->unit_number; in ptctor()
285 args.mda_si_drv1 = periph; in ptctor()
286 error = make_dev_s(&args, &softc->dev, "%s%d", periph->periph_name, in ptctor()
287 periph->unit_number); in ptctor()
289 cam_periph_lock(periph); in ptctor()
294 periph->unit_number, 0, in ptctor()
300 cam_periph_lock(periph); in ptctor()
311 ptasync, periph, periph->path); in ptctor()
314 xpt_announce_periph(periph, NULL); in ptctor()
320 ptoninvalidate(struct cam_periph *periph) in ptoninvalidate() argument
324 softc = (struct pt_softc *)periph->softc; in ptoninvalidate()
329 xpt_register_async(0, ptasync, periph, periph->path); in ptoninvalidate()
342 ptdtor(struct cam_periph *periph) in ptdtor() argument
346 softc = (struct pt_softc *)periph->softc; in ptdtor()
349 cam_periph_unlock(periph); in ptdtor()
351 cam_periph_lock(periph); in ptdtor()
358 struct cam_periph *periph; in ptasync() local
360 periph = (struct cam_periph *)callback_arg; in ptasync()
400 softc = (struct pt_softc *)periph->softc; in ptasync()
411 cam_periph_async(periph, code, path, arg); in ptasync()
417 ptstart(struct cam_periph *periph, union ccb *start_ccb) in ptstart() argument
422 softc = (struct pt_softc *)periph->softc; in ptstart()
424 CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("ptstart\n")); in ptstart()
464 xpt_schedule(periph, CAM_PRIORITY_NORMAL); in ptstart()
470 ptdone(struct cam_periph *periph, union ccb *done_ccb) in ptdone() argument
475 softc = (struct pt_softc *)periph->softc; in ptdone()
477 CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("ptdone\n")); in ptdone()
510 xpt_print(periph->path, in ptdone()
567 struct cam_periph *periph; in ptioctl() local
571 periph = (struct cam_periph *)dev->si_drv1; in ptioctl()
572 softc = (struct pt_softc *)periph->softc; in ptioctl()
574 cam_periph_lock(periph); in ptioctl()
593 error = cam_periph_ioctl(periph, cmd, addr, pterror); in ptioctl()
597 cam_periph_unlock(periph); in ptioctl()