Lines Matching refs:scsiq
6052 ADV_SCSI_REQ_Q *scsiq; in AdvISR() local
6110 scsiq = &reqp->scsi_req_q; in AdvISR()
6118 scsiq->done_status = QD_NO_ERROR; in AdvISR()
6119 scsiq->host_status = scsiq->scsi_status = 0; in AdvISR()
6120 scsiq->data_cnt = 0L; in AdvISR()
6139 scsiq->cntl = 0; in AdvISR()
6145 adv_isr_callback(asc_dvc, scsiq); in AdvISR()
6624 ASC_QDONE_INFO *scsiq, unsigned int max_dma_count) in _AscCopyLramScsiDoneQ() argument
6631 (uchar *)scsiq, in _AscCopyLramScsiDoneQ()
6636 scsiq->q_status = (uchar)_val; in _AscCopyLramScsiDoneQ()
6637 scsiq->q_no = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
6640 scsiq->cntl = (uchar)_val; in _AscCopyLramScsiDoneQ()
6645 scsiq->sense_len = (uchar)_val; in _AscCopyLramScsiDoneQ()
6646 scsiq->extra_bytes = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
6651 scsiq->remain_bytes = (((u32)AscReadLramWord(iop_base, in _AscCopyLramScsiDoneQ()
6659 scsiq->remain_bytes += AscReadLramWord(iop_base, in _AscCopyLramScsiDoneQ()
6663 scsiq->remain_bytes &= max_dma_count; in _AscCopyLramScsiDoneQ()
6780 ASC_QDONE_INFO *scsiq; in AscIsrQDone() local
6785 scsiq = (ASC_QDONE_INFO *)&scsiq_buf; in AscIsrQDone()
6793 sg_queue_cnt = _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, in AscIsrQDone()
6798 (uchar)(scsiq-> in AscIsrQDone()
6801 tid_no = ASC_TIX_TO_TID(scsiq->d2.target_ix); in AscIsrQDone()
6802 target_id = ASC_TIX_TO_TARGET_ID(scsiq->d2.target_ix); in AscIsrQDone()
6803 if ((scsiq->cntl & QC_SG_HEAD) != 0) { in AscIsrQDone()
6815 scsiq->d3.done_stat = QD_WITH_ERROR; in AscIsrQDone()
6816 scsiq->d3.host_stat = in AscIsrQDone()
6833 scsiq->d2. in AscIsrQDone()
6852 scsiq->d3.done_stat = QD_WITH_ERROR; in AscIsrQDone()
6855 if ((scsiq->d2.srb_tag == 0UL) || in AscIsrQDone()
6856 ((scsiq->q_status & QS_ABORTED) != 0)) { in AscIsrQDone()
6858 } else if (scsiq->q_status == QS_DONE) { in AscIsrQDone()
6864 if (scsiq->extra_bytes != 0) { in AscIsrQDone()
6865 scsiq->remain_bytes += scsiq->extra_bytes; in AscIsrQDone()
6867 if (scsiq->d3.done_stat == QD_WITH_ERROR) { in AscIsrQDone()
6868 if (scsiq->d3.host_stat == in AscIsrQDone()
6870 if ((scsiq-> in AscIsrQDone()
6873 scsiq->d3.done_stat = in AscIsrQDone()
6875 scsiq->d3.host_stat = in AscIsrQDone()
6878 scsiq->d3.done_stat = in AscIsrQDone()
6880 scsiq->d3.host_stat = in AscIsrQDone()
6883 } else if (scsiq->d3.host_stat == in AscIsrQDone()
6897 if ((scsiq->cntl & QC_NO_CALLBACK) == 0) { in AscIsrQDone()
6898 asc_isr_callback(asc_dvc, scsiq); in AscIsrQDone()
6905 if (scsiq->d3.done_stat != QD_NO_ERROR) { in AscIsrQDone()
6915 if ((scsiq->cntl & QC_NO_CALLBACK) == 0) { in AscIsrQDone()
6916 asc_isr_callback(asc_dvc, scsiq); in AscIsrQDone()
7871 static int AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no) in AscPutReadyQueue() argument
7881 if (((asc_dvc->init_sdtr & scsiq->q1.target_id) != 0) && in AscPutReadyQueue()
7882 ((asc_dvc->sdtr_done & scsiq->q1.target_id) == 0)) { in AscPutReadyQueue()
7883 tid_no = ASC_TIX_TO_TID(scsiq->q2.target_ix); in AscPutReadyQueue()
7891 scsiq->q1.cntl |= QC_MSG_OUT; in AscPutReadyQueue()
7894 if ((scsiq->q1.target_id & asc_dvc->use_tagged_qng) == 0) { in AscPutReadyQueue()
7895 scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG; in AscPutReadyQueue()
7897 scsiq->q1.status = QS_FREE; in AscPutReadyQueue()
7900 (uchar *)scsiq->cdbptr, scsiq->q2.cdb_len >> 1); in AscPutReadyQueue()
7904 (uchar *)&scsiq->q1.cntl, in AscPutReadyQueue()
7908 (ushort)(((ushort)scsiq->q1. in AscPutReadyQueue()
7914 AscPutReadySgListQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no) in AscPutReadySgListQueue() argument
7930 sg_head = scsiq->sg_head; in AscPutReadySgListQueue()
7931 saved_data_addr = scsiq->q1.data_addr; in AscPutReadySgListQueue()
7932 saved_data_cnt = scsiq->q1.data_cnt; in AscPutReadySgListQueue()
7933 scsiq->q1.data_addr = cpu_to_le32(sg_head->sg_list[0].addr); in AscPutReadySgListQueue()
7934 scsiq->q1.data_cnt = cpu_to_le32(sg_head->sg_list[0].bytes); in AscPutReadySgListQueue()
7943 scsiq->q1.cntl |= QC_SG_HEAD; in AscPutReadySgListQueue()
7946 scsiq->q1.sg_queue_cnt = sg_head->queue_cnt; in AscPutReadySgListQueue()
7995 scsiq->next_sg_index = sg_index; in AscPutReadySgListQueue()
7998 scsiq->q1.cntl &= ~QC_SG_HEAD; in AscPutReadySgListQueue()
8000 sta = AscPutReadyQueue(asc_dvc, scsiq, q_no); in AscPutReadySgListQueue()
8001 scsiq->q1.data_addr = saved_data_addr; in AscPutReadySgListQueue()
8002 scsiq->q1.data_cnt = saved_data_cnt; in AscPutReadySgListQueue()
8007 AscSendScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar n_q_required) in AscSendScsiQueue() argument
8017 target_ix = scsiq->q2.target_ix; in AscSendScsiQueue()
8026 scsiq->sg_head->queue_cnt = n_q_required - 1; in AscSendScsiQueue()
8027 scsiq->q1.q_no = free_q_head; in AscSendScsiQueue()
8028 sta = AscPutReadySgListQueue(asc_dvc, scsiq, in AscSendScsiQueue()
8034 scsiq->q1.q_no = free_q_head; in AscSendScsiQueue()
8035 sta = AscPutReadyQueue(asc_dvc, scsiq, free_q_head); in AscSendScsiQueue()
8066 static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq) in AscExeScsiQueue() argument
8086 sg_head = scsiq->sg_head; in AscExeScsiQueue()
8089 scsiq->q1.q_no = 0; in AscExeScsiQueue()
8090 if ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0) { in AscExeScsiQueue()
8091 scsiq->q1.extra_bytes = 0; in AscExeScsiQueue()
8094 target_ix = scsiq->q2.target_ix; in AscExeScsiQueue()
8097 if (scsiq->cdbptr[0] == REQUEST_SENSE) { in AscExeScsiQueue()
8098 if ((asc_dvc->init_sdtr & scsiq->q1.target_id) != 0) { in AscExeScsiQueue()
8099 asc_dvc->sdtr_done &= ~scsiq->q1.target_id; in AscExeScsiQueue()
8109 scsiq->q1.cntl |= (QC_MSG_OUT | QC_URGENT); in AscExeScsiQueue()
8117 if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) { in AscExeScsiQueue()
8127 scsiq->q1.data_addr = cpu_to_le32(sg_head->sg_list[0].addr); in AscExeScsiQueue()
8128 scsiq->q1.data_cnt = cpu_to_le32(sg_head->sg_list[0].bytes); in AscExeScsiQueue()
8129 scsiq->q1.cntl &= ~(QC_SG_HEAD | QC_SG_SWAP_QUEUE); in AscExeScsiQueue()
8133 scsi_cmd = scsiq->cdbptr[0]; in AscExeScsiQueue()
8135 if ((asc_dvc->pci_fix_asyn_xfer & scsiq->q1.target_id) && in AscExeScsiQueue()
8136 !(asc_dvc->pci_fix_asyn_xfer_always & scsiq->q1.target_id)) { in AscExeScsiQueue()
8137 if (scsiq->q1.cntl & QC_SG_HEAD) { in AscExeScsiQueue()
8144 data_cnt = le32_to_cpu(scsiq->q1.data_cnt); in AscExeScsiQueue()
8167 scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG; in AscExeScsiQueue()
8168 scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX | in AscExeScsiQueue()
8171 scsiq->q2.tag_code &= 0x27; in AscExeScsiQueue()
8173 if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) { in AscExeScsiQueue()
8190 ((scsiq->q2. in AscExeScsiQueue()
8194 scsiq->q2.tag_code |= in AscExeScsiQueue()
8196 scsiq->q1.extra_bytes = in AscExeScsiQueue()
8217 || ((scsiq->q1.cntl & QC_URGENT) != 0)) { in AscExeScsiQueue()
8219 AscSendScsiQueue(asc_dvc, scsiq, in AscExeScsiQueue()
8231 le32_to_cpu(scsiq->q1.data_addr) + in AscExeScsiQueue()
8232 le32_to_cpu(scsiq->q1.data_cnt); in AscExeScsiQueue()
8237 ((scsiq->q2. in AscExeScsiQueue()
8242 le32_to_cpu(scsiq->q1. in AscExeScsiQueue()
8246 scsiq->q2.tag_code |= in AscExeScsiQueue()
8249 scsiq->q1.data_cnt = in AscExeScsiQueue()
8252 scsiq->q1.extra_bytes = in AscExeScsiQueue()
8261 ((scsiq->q1.cntl & QC_URGENT) != 0)) { in AscExeScsiQueue()
8262 if ((sta = AscSendScsiQueue(asc_dvc, scsiq, in AscExeScsiQueue()
8298 ADV_SCSI_REQ_Q *scsiq = &reqp->scsi_req_q; in AdvExeScsiQueue() local
8303 if (scsiq->target_id > ADV_MAX_TID) { in AdvExeScsiQueue()
8304 scsiq->host_status = QHSTA_M_INVALID_DEVICE; in AdvExeScsiQueue()
8305 scsiq->done_status = QD_WITH_ERROR; in AdvExeScsiQueue()
8324 scsiq->scsiq_ptr = cpu_to_le32(scsiq->srb_tag); in AdvExeScsiQueue()
8325 scsiq->scsiq_rptr = cpu_to_le32(reqp->req_addr); in AdvExeScsiQueue()
8327 scsiq->carr_va = asc_dvc->icq_sp->carr_va; in AdvExeScsiQueue()
8328 scsiq->carr_pa = asc_dvc->icq_sp->carr_pa; in AdvExeScsiQueue()
8335 asc_dvc->icq_sp->areq_vpa = scsiq->scsiq_rptr; in AdvExeScsiQueue()