Lines Matching defs:ccb_h
589 atio->ccb_h.status = CAM_CDB_RECVD;
590 atio->ccb_h.target_lun = lun;
595 atio->ccb_h.ccb_io_ptr = io;
736 inot->ccb_h.status = CAM_MESSAGE_RECV;
737 inot->ccb_h.target_lun = lun;
752 STAILQ_INSERT_TAIL(&trsrc->inot, &inot->ccb_h, sim_links.stqe);
777 STAILQ_INSERT_TAIL(&trsrc->inot, &inot->ccb_h, sim_links.stqe);
783 xpt_print(inot->ccb_h.path, "%s: func=%#x stat=%#x id=%#x lun=%#x"
785 __func__, inot->ccb_h.func_code, inot->ccb_h.status,
786 inot->ccb_h.target_id,
787 (unsigned int)inot->ccb_h.target_lun, inot->ccb_h.flags,
1047 if (CAM_REQ_CMP != xpt_create_path(&ccb->ccb_h.path, xpt_periph,
1288 ccb->ccb_h.status &= ~CAM_STATUS_MASK;
1289 ccb->ccb_h.status |= status;
1373 struct ocs_softc *ocs = csio->ccb_h.ccb_ocs_ptr;
1374 uint32_t cam_dir = ccb->ccb_h.flags & CAM_DIR_MASK;
1376 (ccb->ccb_h.flags & CAM_SEND_STATUS) == CAM_SEND_STATUS;
1378 ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
1400 if (ccb->ccb_h.flags & CAM_SEND_SENSE) {
1490 struct ocs_softc *ocs = csio->ccb_h.ccb_ocs_ptr;
1491 uint32_t cam_dir = ccb->ccb_h.flags & CAM_DIR_MASK;
1527 !(ccb->ccb_h.flags & (CAM_SENSE_PHYS | CAM_SENSE_PTR))) {
1530 ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
1549 xpt_path_sbuf(ccb->ccb_h.path, &sb);
1558 if (ccb->ccb_h.func_code == XPT_SCSI_IO) {
1604 csio->ccb_h.ccb_io_ptr = NULL;
1605 csio->ccb_h.ccb_ocs_ptr = NULL;
1607 ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
1610 ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0)) {
1611 ccb->ccb_h.status |= CAM_DEV_QFRZN;
1612 xpt_freeze_devq(ccb->ccb_h.path, 1);
1723 uint32_t cam_dir = ccb->ccb_h.flags & CAM_DIR_MASK;
1724 bool sendstatus = ccb->ccb_h.flags & CAM_SEND_STATUS;
1743 if (ccb->ccb_h.flags & CAM_SEND_STATUS) {
1757 ccb->ccb_h.status |= CAM_SIM_QUEUED;
1759 csio->ccb_h.ccb_ocs_ptr = ocs;
1760 csio->ccb_h.ccb_io_ptr = io;
1765 ocs_assert(ccb->ccb_h.flags & CAM_SEND_STATUS, -1);
1771 if (ccb->ccb_h.flags & CAM_SEND_SENSE) {
1822 ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
1860 struct ccb_hdr *ccb_h = &csio->ccb_h;
1867 fcp = FCPORT(ocs, cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path)));
1869 if (fcp->tgt[ccb_h->target_id].state == OCS_TGT_STATE_LOST) {
1871 ccb_h->target_id);
1875 if (fcp->tgt[ccb_h->target_id].state == OCS_TGT_STATE_NONE) {
1877 ccb_h->target_id);
1881 node = ocs_node_get_instance(ocs, fcp->tgt[ccb_h->target_id].node_id);
1884 ccb_h->target_id);
1890 ccb_h->target_id);
1904 csio->ccb_h.ccb_ocs_ptr = ocs;
1905 csio->ccb_h.ccb_io_ptr = io;
1915 if (ccb->ccb_h.timeout == CAM_TIME_INFINITY) {
1917 } else if (ccb->ccb_h.timeout == CAM_TIME_DEFAULT) {
1920 if (ccb->ccb_h.timeout < 1000)
1923 io->timeout = ccb->ccb_h.timeout / 1000;
1946 switch (ccb->ccb_h.flags & CAM_DIR_MASK) {
1948 rc = ocs_scsi_send_nodata_io(node, io, ccb_h->target_lun,
1949 ccb->ccb_h.flags & CAM_CDB_POINTER ?
1955 rc = ocs_scsi_send_rd_io(node, io, ccb_h->target_lun,
1956 ccb->ccb_h.flags & CAM_CDB_POINTER ?
1964 rc = ocs_scsi_send_wr_io(node, io, ccb_h->target_lun,
1965 ccb->ccb_h.flags & CAM_CDB_POINTER ?
1974 ccb->ccb_h.flags);
2054 struct ccb_hdr *ccb_h = &ccb->ccb_h;
2059 switch (ccb_h->func_code) {
2062 if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0) {
2063 if ((ccb->ccb_h.flags & CAM_CDB_PHYS) != 0) {
2064 ccb->ccb_h.status = CAM_REQ_INVALID;
2076 cam_freeze_devq(ccb->ccb_h.path);
2077 cam_release_devq(ccb->ccb_h.path, RELSIM_RELEASE_AFTER_TIMEOUT, 0, 100, 0);
2078 ccb->ccb_h.status = CAM_REQUEUE_REQ;
2083 ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
2160 cpi->ccb_h.status = CAM_REQ_CMP;
2179 if (cts->ccb_h.target_id > OCS_MAX_TARGETS) {
2185 tgt = &fcp->tgt[cts->ccb_h.target_id];
2329 switch (accb->ccb_h.func_code) {
2339 ccb->ccb_h.status = CAM_UA_ABORT;
2341 ccb->ccb_h.status = CAM_REQ_CMP;
2347 accb->ccb_h.func_code);
2348 ccb->ccb_h.status = CAM_REQ_INVALID;
2373 node = ocs_node_get_instance(ocs, fcp->tgt[ccb_h->target_id].node_id);
2376 __func__, ccb_h->target_id);
2391 rc = ocs_scsi_send_tmf(node, io, NULL, ccb_h->target_lun,
2403 ocs_reset_crn(node, ccb_h->target_lun);
2417 ccb->ccb_h.target_id,
2418 (unsigned int)ccb->ccb_h.target_lun);
2420 trsrc = ocs_tgt_resource_get(fcp, &ccb->ccb_h, &status);
2460 /*printf("XPT_%s %p\n", ccb_h->func_code == XPT_ACCEPT_TARGET_IO ?
2462 trsrc = ocs_tgt_resource_get(fcp, &ccb->ccb_h, &status);
2469 if (XPT_ACCEPT_TARGET_IO == ccb->ccb_h.func_code) {
2476 STAILQ_INSERT_TAIL(&trsrc->atio, &ccb->ccb_h,
2479 STAILQ_INSERT_TAIL(&trsrc->inot, &ccb->ccb_h,
2482 ccb->ccb_h.ccb_io_ptr = NULL;
2483 ccb->ccb_h.ccb_ocs_ptr = ocs;
2532 ccb->ccb_h.flags, ccb->csio.tag_id);
2538 ccb_h->func_code);
2539 ccb_h->status = CAM_REQ_INVALID;
2600 * @param ccb_h pointer to the CCB header
2607 struct ccb_hdr *ccb_h, uint32_t *status)
2609 target_id_t tid = ccb_h->target_id;
2610 lun_id_t lun = ccb_h->target_lun;
2638 ccb->ccb_h.status = CAM_REQ_ABORTED;
2647 ccb->ccb_h.status = CAM_REQ_ABORTED;
2665 int bus = cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path));
2668 trsrc = ocs_tgt_resource_get(fcp, &accb->ccb_h, &status);
2671 if (cur != &accb->ccb_h)
2676 accb->ccb_h.status = CAM_REQ_ABORTED;
2687 aio = accb->ccb_h.ccb_io_ptr;
2689 ccb->ccb_h.status = CAM_UA_ABORT;
2724 int bus = cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path));
2727 trsrc = ocs_tgt_resource_get(fcp, &accb->ccb_h, &status);
2730 if (cur != &accb->ccb_h)
2735 accb->ccb_h.status = CAM_REQ_ABORTED;
2755 ocs_fcport *fcp = FCPORT(ocs, cam_sim_bus(xpt_path_sim((accb)->ccb_h.path)));
2756 node = ocs_node_get_instance(ocs, fcp->tgt[accb->ccb_h.target_id].node_id);
2759 __func__, accb->ccb_h.target_id);
2775 (ocs_io_t *)csio->ccb_h.ccb_io_ptr,
2776 accb->ccb_h.target_lun,
2860 ((union ccb *)(io->tgt_io.app))->ccb_h.flags);
2862 ((union ccb *)(io->tgt_io.app))->ccb_h.status);