Lines Matching refs:scsiq
2083 #define AdvAbortQueue(asc_dvc, scsiq) \ argument
2085 (ADV_DCNT) (scsiq))
6828 ADV_SCSI_REQ_Q *scsiq; in AdvISR() local
6881 scsiq = (ADV_SCSI_REQ_Q *) in AdvISR()
6890 scsiq->done_status = QD_NO_ERROR; in AdvISR()
6891 scsiq->host_status = scsiq->scsi_status = 0; in AdvISR()
6892 scsiq->data_cnt = 0L; in AdvISR()
6909 target_bit = ADV_TID_TO_TIDMASK(scsiq->target_id); in AdvISR()
6914 scsiq->cntl = 0; in AdvISR()
6920 scsiq->a_flag |= ADV_SCSIQ_DONE; in AdvISR()
6921 adv_isr_callback(asc_dvc, scsiq); in AdvISR()
7373 ASC_SCSI_Q *scsiq; /* Ptr to driver request. */ in AscIsrChipHalted() local
7394 scsiq = (ASC_SCSI_Q *) in AscIsrChipHalted()
7420 sg_head = scsiq->sg_head; in AscIsrChipHalted()
7431 if (scsiq->remain_sg_entry_cnt > (ASC_MAX_SG_LIST - 1)) { in AscIsrChipHalted()
7438 scsiq->remain_sg_entry_cnt -= (ASC_MAX_SG_LIST - 1); in AscIsrChipHalted()
7440 sg_entry_cnt = scsiq->remain_sg_entry_cnt; in AscIsrChipHalted()
7441 scsiq->remain_sg_entry_cnt = 0; in AscIsrChipHalted()
7475 if (scsiq->remain_sg_entry_cnt != 0) { in AscIsrChipHalted()
7496 sg_list[scsiq->next_sg_index], in AscIsrChipHalted()
7499 scsiq->next_sg_index += ASC_SG_LIST_PER_Q; in AscIsrChipHalted()
7558 ASC_QDONE_INFO *scsiq, ASC_DCNT max_dma_count) in _AscCopyLramScsiDoneQ() argument
7565 (uchar *)scsiq, in _AscCopyLramScsiDoneQ()
7570 scsiq->q_status = (uchar)_val; in _AscCopyLramScsiDoneQ()
7571 scsiq->q_no = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
7574 scsiq->cntl = (uchar)_val; in _AscCopyLramScsiDoneQ()
7579 scsiq->sense_len = (uchar)_val; in _AscCopyLramScsiDoneQ()
7580 scsiq->extra_bytes = (uchar)(_val >> 8); in _AscCopyLramScsiDoneQ()
7585 scsiq->remain_bytes = (((ADV_DCNT)AscReadLramWord(iop_base, in _AscCopyLramScsiDoneQ()
7593 scsiq->remain_bytes += AscReadLramWord(iop_base, in _AscCopyLramScsiDoneQ()
7597 scsiq->remain_bytes &= max_dma_count; in _AscCopyLramScsiDoneQ()
7734 ASC_QDONE_INFO *scsiq; in AscIsrQDone() local
7739 scsiq = (ASC_QDONE_INFO *)&scsiq_buf; in AscIsrQDone()
7747 sg_queue_cnt = _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, in AscIsrQDone()
7752 (uchar)(scsiq-> in AscIsrQDone()
7755 tid_no = ASC_TIX_TO_TID(scsiq->d2.target_ix); in AscIsrQDone()
7756 target_id = ASC_TIX_TO_TARGET_ID(scsiq->d2.target_ix); in AscIsrQDone()
7757 if ((scsiq->cntl & QC_SG_HEAD) != 0) { in AscIsrQDone()
7769 scsiq->d3.done_stat = QD_WITH_ERROR; in AscIsrQDone()
7770 scsiq->d3.host_stat = in AscIsrQDone()
7787 scsiq->d2. in AscIsrQDone()
7806 scsiq->d3.done_stat = QD_WITH_ERROR; in AscIsrQDone()
7809 if ((scsiq->d2.srb_ptr == 0UL) || in AscIsrQDone()
7810 ((scsiq->q_status & QS_ABORTED) != 0)) { in AscIsrQDone()
7812 } else if (scsiq->q_status == QS_DONE) { in AscIsrQDone()
7814 if (scsiq->extra_bytes != 0) { in AscIsrQDone()
7815 scsiq->remain_bytes += in AscIsrQDone()
7816 (ADV_DCNT)scsiq->extra_bytes; in AscIsrQDone()
7818 if (scsiq->d3.done_stat == QD_WITH_ERROR) { in AscIsrQDone()
7819 if (scsiq->d3.host_stat == in AscIsrQDone()
7821 if ((scsiq-> in AscIsrQDone()
7824 scsiq->d3.done_stat = in AscIsrQDone()
7826 scsiq->d3.host_stat = in AscIsrQDone()
7829 scsiq->d3.done_stat = in AscIsrQDone()
7831 scsiq->d3.host_stat = in AscIsrQDone()
7834 } else if (scsiq->d3.host_stat == in AscIsrQDone()
7848 if ((scsiq->cntl & QC_NO_CALLBACK) == 0) { in AscIsrQDone()
7849 asc_isr_callback(asc_dvc, scsiq); in AscIsrQDone()
7856 if (scsiq->d3.done_stat != QD_NO_ERROR) { in AscIsrQDone()
7866 if ((scsiq->cntl & QC_NO_CALLBACK) == 0) { in AscIsrQDone()
7867 asc_isr_callback(asc_dvc, scsiq); in AscIsrQDone()
8829 static int AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no) in AscPutReadyQueue() argument
8839 if (((asc_dvc->init_sdtr & scsiq->q1.target_id) != 0) && in AscPutReadyQueue()
8840 ((asc_dvc->sdtr_done & scsiq->q1.target_id) == 0)) { in AscPutReadyQueue()
8841 tid_no = ASC_TIX_TO_TID(scsiq->q2.target_ix); in AscPutReadyQueue()
8849 scsiq->q1.cntl |= QC_MSG_OUT; in AscPutReadyQueue()
8852 if ((scsiq->q1.target_id & asc_dvc->use_tagged_qng) == 0) { in AscPutReadyQueue()
8853 scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG; in AscPutReadyQueue()
8855 scsiq->q1.status = QS_FREE; in AscPutReadyQueue()
8858 (uchar *)scsiq->cdbptr, scsiq->q2.cdb_len >> 1); in AscPutReadyQueue()
8862 (uchar *)&scsiq->q1.cntl, in AscPutReadyQueue()
8866 (ushort)(((ushort)scsiq->q1. in AscPutReadyQueue()
8872 AscPutReadySgListQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no) in AscPutReadySgListQueue() argument
8888 sg_head = scsiq->sg_head; in AscPutReadySgListQueue()
8889 saved_data_addr = scsiq->q1.data_addr; in AscPutReadySgListQueue()
8890 saved_data_cnt = scsiq->q1.data_cnt; in AscPutReadySgListQueue()
8891 scsiq->q1.data_addr = (ASC_PADDR) sg_head->sg_list[0].addr; in AscPutReadySgListQueue()
8892 scsiq->q1.data_cnt = (ASC_DCNT) sg_head->sg_list[0].bytes; in AscPutReadySgListQueue()
8914 scsiq->remain_sg_entry_cnt = in AscPutReadySgListQueue()
8928 scsiq->q1.cntl |= QC_SG_HEAD; in AscPutReadySgListQueue()
8931 scsiq->q1.sg_queue_cnt = sg_head->queue_cnt; in AscPutReadySgListQueue()
8994 scsiq->next_sg_index = sg_index; in AscPutReadySgListQueue()
8997 scsiq->q1.cntl &= ~QC_SG_HEAD; in AscPutReadySgListQueue()
8999 sta = AscPutReadyQueue(asc_dvc, scsiq, q_no); in AscPutReadySgListQueue()
9000 scsiq->q1.data_addr = saved_data_addr; in AscPutReadySgListQueue()
9001 scsiq->q1.data_cnt = saved_data_cnt; in AscPutReadySgListQueue()
9006 AscSendScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar n_q_required) in AscSendScsiQueue() argument
9016 target_ix = scsiq->q2.target_ix; in AscSendScsiQueue()
9025 scsiq->sg_head->queue_cnt = n_q_required - 1; in AscSendScsiQueue()
9026 scsiq->q1.q_no = free_q_head; in AscSendScsiQueue()
9027 sta = AscPutReadySgListQueue(asc_dvc, scsiq, in AscSendScsiQueue()
9033 scsiq->q1.q_no = free_q_head; in AscSendScsiQueue()
9034 sta = AscPutReadyQueue(asc_dvc, scsiq, free_q_head); in AscSendScsiQueue()
9065 static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq) in AscExeScsiQueue() argument
9085 sg_head = scsiq->sg_head; in AscExeScsiQueue()
9088 scsiq->q1.q_no = 0; in AscExeScsiQueue()
9089 if ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0) { in AscExeScsiQueue()
9090 scsiq->q1.extra_bytes = 0; in AscExeScsiQueue()
9093 target_ix = scsiq->q2.target_ix; in AscExeScsiQueue()
9096 if (scsiq->cdbptr[0] == REQUEST_SENSE) { in AscExeScsiQueue()
9097 if ((asc_dvc->init_sdtr & scsiq->q1.target_id) != 0) { in AscExeScsiQueue()
9098 asc_dvc->sdtr_done &= ~scsiq->q1.target_id; in AscExeScsiQueue()
9108 scsiq->q1.cntl |= (QC_MSG_OUT | QC_URGENT); in AscExeScsiQueue()
9116 if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) { in AscExeScsiQueue()
9128 scsiq->q1.data_addr = in AscExeScsiQueue()
9130 scsiq->q1.data_cnt = in AscExeScsiQueue()
9132 scsiq->q1.cntl &= ~(QC_SG_HEAD | QC_SG_SWAP_QUEUE); in AscExeScsiQueue()
9136 scsi_cmd = scsiq->cdbptr[0]; in AscExeScsiQueue()
9138 if ((asc_dvc->pci_fix_asyn_xfer & scsiq->q1.target_id) && in AscExeScsiQueue()
9139 !(asc_dvc->pci_fix_asyn_xfer_always & scsiq->q1.target_id)) { in AscExeScsiQueue()
9140 if (scsiq->q1.cntl & QC_SG_HEAD) { in AscExeScsiQueue()
9148 data_cnt = le32_to_cpu(scsiq->q1.data_cnt); in AscExeScsiQueue()
9171 scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG; in AscExeScsiQueue()
9172 scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX | in AscExeScsiQueue()
9175 scsiq->q2.tag_code &= 0x27; in AscExeScsiQueue()
9177 if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) { in AscExeScsiQueue()
9195 ((scsiq->q2. in AscExeScsiQueue()
9199 scsiq->q2.tag_code |= in AscExeScsiQueue()
9201 scsiq->q1.extra_bytes = in AscExeScsiQueue()
9233 || ((scsiq->q1.cntl & QC_URGENT) != 0)) { in AscExeScsiQueue()
9235 AscSendScsiQueue(asc_dvc, scsiq, in AscExeScsiQueue()
9247 le32_to_cpu(scsiq->q1.data_addr) + in AscExeScsiQueue()
9248 le32_to_cpu(scsiq->q1.data_cnt); in AscExeScsiQueue()
9253 ((scsiq->q2. in AscExeScsiQueue()
9258 le32_to_cpu(scsiq->q1. in AscExeScsiQueue()
9262 scsiq->q2.tag_code |= in AscExeScsiQueue()
9266 scsiq->q1.data_cnt = in AscExeScsiQueue()
9269 scsiq->q1.extra_bytes = in AscExeScsiQueue()
9278 ((scsiq->q1.cntl & QC_URGENT) != 0)) { in AscExeScsiQueue()
9279 if ((sta = AscSendScsiQueue(asc_dvc, scsiq, in AscExeScsiQueue()
9311 static int AdvExeScsiQueue(ADV_DVC_VAR *asc_dvc, ADV_SCSI_REQ_Q *scsiq) in AdvExeScsiQueue() argument
9320 if (scsiq->target_id > ADV_MAX_TID) { in AdvExeScsiQueue()
9321 scsiq->host_status = QHSTA_M_INVALID_DEVICE; in AdvExeScsiQueue()
9322 scsiq->done_status = QD_WITH_ERROR; in AdvExeScsiQueue()
9349 scsiq->a_flag &= ~ADV_SCSIQ_DONE; in AdvExeScsiQueue()
9351 req_paddr = virt_to_bus(scsiq); in AdvExeScsiQueue()
9357 scsiq->scsiq_ptr = cpu_to_le32(ADV_VADDR_TO_U32(scsiq)); in AdvExeScsiQueue()
9358 scsiq->scsiq_rptr = req_paddr; in AdvExeScsiQueue()
9360 scsiq->carr_va = cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->icq_sp)); in AdvExeScsiQueue()
9365 scsiq->carr_pa = asc_dvc->icq_sp->carr_pa; in AdvExeScsiQueue()