Lines Matching refs:descr
138 struct targ_cmd_descr *descr,
141 struct targ_cmd_descr *descr);
499 struct targ_cmd_descr *descr;
512 while ((descr = TAILQ_FIRST(&softc->abort_queue)) != NULL) {
513 TAILQ_REMOVE(&softc->abort_queue, descr, tqe);
514 free(descr, M_TARG);
528 struct targ_cmd_descr *descr;
557 descr = (struct targ_cmd_descr *)ccb->ccb_h.targ_descr;
558 descr->user_ccb = user_ccb;
559 descr->func_code = func_code;
574 descr = targgetdescr(softc);
575 descr->user_ccb = user_ccb;
576 descr->priority = priority;
577 descr->func_code = func_code;
579 descr, tqe);
586 descr = (struct targ_cmd_descr *)
588 descr->user_ccb = user_ccb;
589 descr->priority = priority;
590 descr->func_code = func_code;
591 if (targusermerge(softc, descr, ccb) != EFAULT)
592 targsendccb(softc, ccb, descr);
619 struct targ_cmd_descr *descr, *next_descr;
625 descr = TAILQ_FIRST(&softc->work_queue);
626 if (descr == NULL) {
629 TAILQ_REMOVE(&softc->work_queue, descr, tqe);
632 /* Initiate a transaction using the descr and supplied CCB */
633 error = targusermerge(softc, descr, start_ccb);
635 error = targsendccb(softc, start_ccb, descr);
640 suword(&descr->user_ccb->ccb_h.status,
642 TAILQ_INSERT_TAIL(&softc->abort_queue, descr, tqe);
653 targusermerge(struct targ_softc *softc, struct targ_cmd_descr *descr,
660 u_ccbh = &descr->user_ccb->ccb_h;
667 xpt_setup_ccb(k_ccbh, softc->path, descr->priority);
669 k_ccbh->func_code = descr->func_code;
708 /* Build and send a kernel CCB formed from descr->user_ccb */
711 struct targ_cmd_descr *descr)
718 mapinfo = &descr->mapinfo;
728 ccb_h->targ_descr = descr;
844 struct targ_cmd_descr *descr;
849 descr = (struct targ_cmd_descr *)ccb_h->targ_descr;
850 user_ccb = descr->user_ccb;
873 ("targread aborted descr %p (%p)\n",
903 struct targ_cmd_descr *descr;
909 descr = (struct targ_cmd_descr *)ccb->ccb_h.targ_descr;
910 u_ccbh = &descr->user_ccb->ccb_h;
919 if (descr->mapinfo.num_bufs_used != 0)
920 cam_periph_unmapmem(ccb, &descr->mapinfo);
958 CAM_DEBUG_PRINT(CAM_DEBUG_PERIPH, ("targfreeccb descr %p and\n",
987 struct targ_cmd_descr *descr;
989 descr = malloc(sizeof(*descr), M_TARG,
991 if (descr) {
992 descr->mapinfo.num_bufs_used = 0;
994 return (descr);
1018 struct targ_cmd_descr *descr;
1025 while ((descr = TAILQ_FIRST(&softc->work_queue)) != NULL) {
1027 ("Aborting descr from workq %p\n", descr));
1028 TAILQ_REMOVE(&softc->work_queue, descr, tqe);
1029 TAILQ_INSERT_TAIL(&softc->abort_queue, descr, tqe);