Lines Matching refs:ccb_h

182 		bus_path_id = cpi->ccb_h.path_id;  in targbhasync()
242 xpt_setup_ccb(&immed_ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); in targbhenlun()
243 immed_ccb.ccb_h.func_code = XPT_EN_LUN; in targbhenlun()
250 status = immed_ccb.ccb_h.status; in targbhenlun()
274 atio->ccb_h.ccb_descr = targbhallocdescr(); in targbhenlun()
276 if (atio->ccb_h.ccb_descr == NULL) { in targbhenlun()
282 xpt_setup_ccb(&atio->ccb_h, periph->path, CAM_PRIORITY_NORMAL); in targbhenlun()
283 atio->ccb_h.func_code = XPT_ACCEPT_TARGET_IO; in targbhenlun()
284 atio->ccb_h.cbfcnp = targbhdone; in targbhenlun()
285 ((struct targbh_cmd_desc*)atio->ccb_h.ccb_descr)->atio_link = in targbhenlun()
289 status = atio->ccb_h.status; in targbhenlun()
317 xpt_setup_ccb(&inot->ccb_h, periph->path, CAM_PRIORITY_NORMAL); in targbhenlun()
318 inot->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; in targbhenlun()
319 inot->ccb_h.cbfcnp = targbhdone; in targbhenlun()
320 SLIST_INSERT_HEAD(&softc->immed_notify_slist, &inot->ccb_h, in targbhenlun()
323 status = inot->ccb_h.status; in targbhenlun()
345 struct ccb_hdr *ccb_h; in targbhdislun() local
359 ((struct targbh_cmd_desc*)atio->ccb_h.ccb_descr)->atio_link; in targbhdislun()
360 xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, CAM_PRIORITY_NORMAL); in targbhdislun()
361 ccb.cab.ccb_h.func_code = XPT_ABORT; in targbhdislun()
366 while ((ccb_h = SLIST_FIRST(&softc->immed_notify_slist)) != NULL) { in targbhdislun()
368 xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, CAM_PRIORITY_NORMAL); in targbhdislun()
369 ccb.cab.ccb_h.func_code = XPT_ABORT; in targbhdislun()
370 ccb.cab.abort_ccb = (union ccb *)ccb_h; in targbhdislun()
377 xpt_setup_ccb(&ccb.cel.ccb_h, periph->path, CAM_PRIORITY_NORMAL); in targbhdislun()
378 ccb.cel.ccb_h.func_code = XPT_EN_LUN; in targbhdislun()
382 if (ccb.cel.ccb_h.status != CAM_REQ_CMP) in targbhdislun()
384 "with status 0x%x\n", ccb.cel.ccb_h.status); in targbhdislun()
387 return (ccb.cel.ccb_h.status); in targbhdislun()
461 desc = (struct targbh_cmd_desc *)atio->ccb_h.ccb_descr; in targbhstart()
464 flags = atio->ccb_h.flags & in targbhstart()
498 start_ccb->ccb_h.target_id = atio->ccb_h.target_id; in targbhstart()
499 start_ccb->ccb_h.target_lun = atio->ccb_h.target_lun; in targbhstart()
501 start_ccb->ccb_h.ccb_type = TARGBH_CCB_WORKQ; in targbhstart()
502 start_ccb->ccb_h.ccb_atio = atio; in targbhstart()
511 if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) { in targbhstart()
517 atio->ccb_h.status &= ~CAM_DEV_QFRZN; in targbhstart()
532 switch (done_ccb->ccb_h.func_code) { in targbhdone()
541 descr = (struct targbh_cmd_desc*)atio->ccb_h.ccb_descr; in targbhdone()
544 || atio->ccb_h.status == CAM_REQ_ABORTED) { in targbhdone()
569 atio->ccb_h.flags &= ~CAM_DIR_MASK; in targbhdone()
570 atio->ccb_h.flags |= CAM_DIR_NONE; in targbhdone()
588 atio->ccb_h.flags &= ~CAM_DIR_MASK; in targbhdone()
589 atio->ccb_h.flags |= CAM_DIR_IN; in targbhdone()
604 atio->ccb_h.flags &= ~CAM_DIR_MASK; in targbhdone()
605 atio->ccb_h.flags |= CAM_DIR_IN; in targbhdone()
618 atio->ccb_h.flags &= ~CAM_DIR_MASK; in targbhdone()
619 atio->ccb_h.flags |= CAM_DIR_NONE; in targbhdone()
632 if ((atio->ccb_h.flags & CAM_DIS_DISCONNECT) != 0) { in targbhdone()
633 TAILQ_INSERT_HEAD(&softc->work_queue, &atio->ccb_h, in targbhdone()
637 TAILQ_INSERT_TAIL(&softc->work_queue, &atio->ccb_h, in targbhdone()
651 atio = (struct ccb_accept_tio*)done_ccb->ccb_h.ccb_atio; in targbhdone()
652 desc = (struct targbh_cmd_desc *)atio->ccb_h.ccb_descr; in targbhdone()
654 TAILQ_REMOVE(&softc->pending_queue, &atio->ccb_h, in targbhdone()
663 done_ccb->ccb_h.flags &= ~CAM_SEND_SENSE; in targbhdone()
664 done_ccb->ccb_h.status &= ~CAM_SENT_SENSE; in targbhdone()
673 if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { in targbhdone()
675 cam_release_devq(done_ccb->ccb_h.path, in targbhdone()
680 done_ccb->ccb_h.status &= ~CAM_DEV_QFRZN; in targbhdone()
692 atio->ccb_h.target_id = CAM_TARGET_WILDCARD; in targbhdone()
693 atio->ccb_h.target_lun = CAM_LUN_WILDCARD; in targbhdone()
706 frozen = (done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0; in targbhdone()
708 || done_ccb->ccb_h.status == CAM_REQ_ABORTED) { in targbhdone()