Lines Matching refs:atio
2280 isp_prt(isp, ISP_LOGWARN, "bad atio (0x%x) leaked to platform", status);
2389 isp_prt(isp, ISP_LOGWARN, "bogus atio (0x%x) leaked to platform", aep->at_status);
3566 atp = isp_find_atpd(isp, tptr, accb->atio.tag_id);
3735 struct ccb_accept_tio *atio;
3762 atio = (struct ccb_accept_tio *)ccbh;
3772 atio = (struct ccb_accept_tio *)ccbh;
3777 ATIO_PPD(atio)->on_queue = 0;
3779 if (atio->tag_id == 0xffffffff || atio->ccb_h.func_code != XPT_ACCEPT_TARGET_IO) {
3788 memset(&atio->sense_data, 0, sizeof (atio->sense_data));
3789 cdb = atio->cdb_io.cdb_bytes;
3790 ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG0, ccbh->path, "%s: [0x%x] processing ATIO from %s queue initiator 0x%x CDB=0x%x data_offset=%u\n", __func__, atio->tag_id,
3791 queue, atio->init_id, cdb[0], ATIO_PPD(atio)->offset);
3793 return_lun = XS_LUN(atio);
3795 xpt_print(atio->ccb_h.path, "[0x%x] Non-Zero Lun %d: cdb0=0x%x\n", atio->tag_id, return_lun, cdb[0]);
3798 SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR;
3799 SDFIXED(atio->sense_data)->flags = SSD_KEY_ILLEGAL_REQUEST;
3800 SDFIXED(atio->sense_data)->add_sense_code = 0x25; /* LOGICAL UNIT NOT SUPPORTED */
3801 atio->sense_len = SSD_MIN_SIZE;
3809 data_len = sizeof (atio->sense_data);
3830 r = isptarg_rwparm(cdb, disk_data, disk_size, ATIO_PPD(atio)->offset, &data_ptr, &data_len, &last);
3833 SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR;
3834 SDFIXED(atio->sense_data)->flags = SSD_KEY_ILLEGAL_REQUEST;
3836 SDFIXED(atio->sense_data)->add_sense_code = 0x21; /* LOGICAL BLOCK ADDRESS OUT OF RANGE */
3838 SDFIXED(atio->sense_data)->add_sense_code = 0x20; /* INVALID COMMAND OPERATION CODE */
3840 atio->sense_len = SSD_MIN_SIZE;
3851 ATIO_PPD(atio)->offset += data_len;
3865 SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR;
3866 SDFIXED(atio->sense_data)->flags = SSD_KEY_UNIT_ATTENTION;
3867 SDFIXED(atio->sense_data)->add_sense_code = 0x24; /* INVALID FIELD IN CDB */
3868 atio->sense_len = SSD_MIN_SIZE;
3889 SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR;
3890 SDFIXED(atio->sense_data)->flags = SSD_KEY_UNIT_ATTENTION;
3891 SDFIXED(atio->sense_data)->add_sense_code = 0x29; /* POWER ON, RESET, OR BUS DEVICE RESET OCCURRED */
3892 atio->sense_len = SSD_MIN_SIZE;
3907 SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR;
3908 SDFIXED(atio->sense_data)->flags = SSD_KEY_ILLEGAL_REQUEST;
3909 SDFIXED(atio->sense_data)->add_sense_code = 0x24; /* INVALID FIELD IN CDB */
3910 atio->sense_len = SSD_MIN_SIZE;
3961 SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR;
3962 SDFIXED(atio->sense_data)->flags = SSD_KEY_ILLEGAL_REQUEST;
3963 SDFIXED(atio->sense_data)->add_sense_code = 0x20; /* INVALID COMMAND OPERATION CODE */
3964 atio->sense_len = SSD_MIN_SIZE;
3976 csio->sense_len = atio->sense_len;
3977 csio->sense_data = atio->sense_data;
3982 cam_fill_ctio(csio, 0, isptarg_done, flags, MSG_SIMPLE_Q_TAG, atio->tag_id, atio->init_id, status, data_ptr, data_len, 30 * hz);
3983 iccb->ccb_h.target_id = atio->ccb_h.target_id;
3985 iccb->ccb_h.ccb_atio = atio;
3986 CTIO_SEQ(iccb) = ATIO_PPD(atio)->sequence++;
3987 ATIO_PPD(atio)->ctio_cnt++;
3989 KASSERT((ATIO_PPD(atio)->status_sent == 0), ("we have already sent status for 0x%x in %s", atio->tag_id, __func__));
3990 ATIO_PPD(atio)->status_sent = 1;
3992 ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG0, atio->ccb_h.path, "%s: sending downstream for 0x%x sequence %u len %u flags %x\n", __func__, atio->tag_id, CTIO_SEQ(iccb), data_len, flags);
3995 if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) {
3997 atio->ccb_h.status &= ~CAM_DEV_QFRZN;
4000 if (is_data_cmd && ATIO_PPD(atio)->status_sent == 0 && ATIO_PPD(atio)->ctio_cnt < MULTI_CCB_DATA_CNT && ATIO_PPD(atio)->on_queue == 0) {
4001 ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG0, atio->ccb_h.path, "%s: more still to do for 0x%x\n", __func__, atio->tag_id);
4002 TAILQ_INSERT_TAIL(&softc->rework_queue, &atio->ccb_h, periph_links.tqe);
4003 ATIO_PPD(atio)->on_queue = 1;
4042 struct ccb_accept_tio *atio;
4052 atio = (struct ccb_accept_tio *) ccb;
4053 ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "[0x%x] ATIO seen in %s\n", atio->tag_id, __func__);
4054 memset(ATIO_PPD(atio), 0, sizeof (ppd_t));
4056 ATIO_PPD(atio)->on_queue = 1;
4066 atio = ccb->ccb_h.ccb_atio;
4067 KASSERT((ATIO_PPD(atio)->ctio_cnt != 0), ("ctio zero when finishing a CTIO"));
4068 ATIO_PPD(atio)->ctio_cnt--;
4073 ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, "[0x%x] got message to return to reset offset to 0x%x at sequence %u\n", atio->tag_id, newoff, CTIO_SEQ(ccb));
4074 ATIO_PPD(atio)->offset = newoff;
4075 ATIO_PPD(atio)->status_sent = 0;
4076 if (ATIO_PPD(atio)->on_queue == 0) {
4077 TAILQ_INSERT_TAIL(&softc->rework_queue, &atio->ccb_h, periph_links.tqe);
4078 ATIO_PPD(atio)->on_queue = 1;
4084 xpt_action((union ccb *)atio);
4088 ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "[0x%x] MID CTIO sequence %u seen in %s\n", atio->tag_id, CTIO_SEQ(ccb), __func__);
4089 if (ATIO_PPD(atio)->status_sent == 0 && ATIO_PPD(atio)->on_queue == 0) {
4090 TAILQ_INSERT_TAIL(&softc->rework_queue, &atio->ccb_h, periph_links.tqe);
4091 ATIO_PPD(atio)->on_queue = 1;
4095 KASSERT((ATIO_PPD(atio)->ctio_cnt == 0), ("ctio count still %d when we think we've sent the STATUS ctio", ATIO_PPD(atio)->ctio_cnt));
4096 ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "[0x%x] FINAL CTIO sequence %u seen in %s\n", atio->tag_id, CTIO_SEQ(ccb), __func__);
4097 xpt_action((union ccb *)atio);
5051 tag = ccb->atio.tag_id;
5063 if (ccb->atio.tag_id) {
5064 atio_private_data_t *atp = isp_find_atpd(isp, tptr, ccb->atio.tag_id);
5072 ccb->atio.tag_id, tptr->atio_count);
5073 ccb->atio.tag_id = 0;