Lines Matching refs:ccb_h

342 	struct ccb_hdr *ccb_h;
352 while ((ccb_h = TAILQ_FIRST(&pending_queue)) != NULL) {
353 TAILQ_REMOVE(&pending_queue, ccb_h, periph_links.tqe);
354 free_ccb((union ccb *)ccb_h);
356 while ((ccb_h = TAILQ_FIRST(&work_queue)) != NULL) {
357 TAILQ_REMOVE(&work_queue, ccb_h, periph_links.tqe);
358 free_ccb((union ccb *)ccb_h);
387 atio->ccb_h.func_code = XPT_ACCEPT_TARGET_IO;
388 atio->ccb_h.targ_descr = a_descr;
396 inot->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY;
430 struct ccb_hdr *ccb_h;
467 ctio->ccb_h.targ_descr;
495 if ((ccb_h = TAILQ_FIRST(&work_queue)) != NULL) {
498 ccb = (union ccb *)ccb_h;
499 switch (ccb_h->func_code) {
509 ccb_h->func_code);
515 if ((ccb_h->status & CAM_DEV_QFRZN) != 0) {
525 TAILQ_REMOVE(&work_queue, ccb_h,
562 TAILQ_REMOVE(&pending_queue, &ccb->ccb_h, periph_links.tqe);
564 switch (ccb->ccb_h.func_code) {
572 a_descr = (struct atio_descr *)atio->ccb_h.targ_descr;
575 a_descr->flags = atio->ccb_h.flags &
578 if ((atio->ccb_h.flags & CAM_CDB_POINTER) == 0)
584 TAILQ_INSERT_TAIL(&work_queue, &ccb->ccb_h,
594 c_descr = (struct ctio_descr *)ctio->ccb_h.targ_descr;
604 TAILQ_INSERT_HEAD(&work_queue, &ccb->ccb_h,
609 ccb->ccb_h.func_code);
628 a_descr = (struct atio_descr *)atio->ccb_h.targ_descr;
636 ctio->ccb_h.flags = a_descr->flags;
640 c_descr = (struct ctio_descr *)ctio->ccb_h.targ_descr;
667 status = atio->ccb_h.status & CAM_STATUS_MASK;
675 TAILQ_REMOVE(&work_queue, &atio->ccb_h, periph_links.tqe);
692 struct ccb_hdr *ccb_h;
696 c_descr = (struct ctio_descr *)ctio->ccb_h.targ_descr;
700 ioq = &((struct atio_descr *)c_descr->atio->ccb_h.targ_descr)->cmplt_io;
703 TAILQ_INSERT_HEAD(ioq, &ctio->ccb_h, periph_links.tqe);
707 TAILQ_FOREACH_REVERSE(ccb_h, ioq, io_queue, periph_links.tqe) {
709 (struct ctio_descr *)ccb_h->targ_descr;
715 if (ccb_h) {
716 TAILQ_INSERT_AFTER(ioq, ccb_h, &ctio->ccb_h, periph_links.tqe);
718 TAILQ_INSERT_HEAD(ioq, &ctio->ccb_h, periph_links.tqe);
730 struct ccb_hdr *ccb_h;
736 a_descr = (struct atio_descr *)atio->ccb_h.targ_descr;
738 while ((ccb_h = TAILQ_FIRST(&a_descr->cmplt_io)) != NULL) {
742 ctio = (struct ccb_scsiio *)ccb_h;
743 c_descr = (struct ctio_descr *)ctio->ccb_h.targ_descr;
745 if (ctio->ccb_h.status == CAM_REQ_ABORTED) {
746 TAILQ_REMOVE(&a_descr->cmplt_io, ccb_h,
758 sent_status = (ccb_h->flags & CAM_SEND_STATUS) != 0;
761 TAILQ_REMOVE(&a_descr->cmplt_io, ccb_h,
771 warnx("IO %p:%p out of order %s", ccb_h,
788 status = inot->ccb_h.status;
825 TAILQ_REMOVE(&work_queue, &inot->ccb_h, periph_links.tqe);
835 warnx("sending ccb (%#x)", ccb->ccb_h.func_code);
836 ccb->ccb_h.pinfo.priority = priority;
838 TAILQ_INSERT_TAIL(&pending_queue, &ccb->ccb_h,
843 ccb->ccb_h.status = CAM_PROVIDE_FAIL;
881 ctio->ccb_h.func_code = XPT_CONT_TARGET_IO;
882 ctio->ccb_h.retry_count = 2;
883 ctio->ccb_h.timeout = CAM_TIME_INFINITY;
885 ctio->ccb_h.targ_descr = c_descr;
899 switch (ccb->ccb_h.func_code) {
904 c_descr = (struct ctio_descr *)ccb->ccb_h.targ_descr;
910 free(ccb->ccb_h.targ_descr);
927 cpi.ccb_h.func_code = XPT_PATH_INQ;
929 status = cpi.ccb_h.status & CAM_STATUS_MASK;
952 crs.ccb_h.func_code = XPT_REL_SIMQ;
965 struct ccb_hdr *ccb_h;
971 cab.ccb_h.func_code = XPT_ABORT;
972 TAILQ_FOREACH(ccb_h, &pending_queue, periph_links.tqe) {
974 warnx("Aborting pending CCB %p\n", ccb_h);
975 cab.abort_ccb = (union ccb *)ccb_h;
977 if (cab.ccb_h.status != CAM_REQ_CMP) {
979 cab.ccb_h.status);