Lines Matching refs:scsiq
2049 ASC_SCSI_Q * scsiq,
3382 #define AdvAbortQueue(asc_dvc, scsiq) \ argument
3384 (ADV_DCNT) (scsiq))
9208 DvcGetPhyAddr(ADV_DVC_VAR *asc_dvc, ADV_SCSI_REQ_Q *scsiq, in DvcGetPhyAddr() argument
10526 ASC_SCSI_Q *scsiq; /* Ptr to driver request. */ in AscIsrChipHalted() local
10549 scsiq = (ASC_SCSI_Q *) in AscIsrChipHalted()
10571 sg_head = scsiq->sg_head; in AscIsrChipHalted()
10582 if (scsiq->remain_sg_entry_cnt > (ASC_MAX_SG_LIST - 1)) in AscIsrChipHalted()
10590 scsiq->remain_sg_entry_cnt -= (ASC_MAX_SG_LIST - 1); in AscIsrChipHalted()
10593 sg_entry_cnt = scsiq->remain_sg_entry_cnt; in AscIsrChipHalted()
10594 scsiq->remain_sg_entry_cnt = 0; in AscIsrChipHalted()
10629 if (scsiq->remain_sg_entry_cnt != 0) in AscIsrChipHalted()
10651 (uchar *) &sg_head->sg_list[scsiq->next_sg_index], in AscIsrChipHalted()
10654 scsiq->next_sg_index += ASC_SG_LIST_PER_Q; in AscIsrChipHalted()
10686 ASC_QDONE_INFO * scsiq, in _AscCopyLramScsiDoneQ() argument
10695 (uchar *) scsiq, in _AscCopyLramScsiDoneQ()
10700 scsiq->q_status = (uchar) _val; in _AscCopyLramScsiDoneQ()
10701 scsiq->q_no = (uchar) (_val >> 8); in _AscCopyLramScsiDoneQ()
10704 scsiq->cntl = (uchar) _val; in _AscCopyLramScsiDoneQ()
10708 scsiq->sense_len = (uchar) _val; in _AscCopyLramScsiDoneQ()
10709 scsiq->extra_bytes = (uchar) (_val >> 8); in _AscCopyLramScsiDoneQ()
10714 scsiq->remain_bytes = (((ADV_DCNT) AscReadLramWord( iop_base, in _AscCopyLramScsiDoneQ()
10719 scsiq->remain_bytes += AscReadLramWord(iop_base, in _AscCopyLramScsiDoneQ()
10722 scsiq->remain_bytes &= max_dma_count; in _AscCopyLramScsiDoneQ()
10745 ASC_QDONE_INFO *scsiq; in AscIsrQDone() local
10752 scsiq = (ASC_QDONE_INFO *) & scsiq_buf; in AscIsrQDone()
10760 sg_queue_cnt = _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, in AscIsrQDone()
10764 (uchar) (scsiq->q_status & (uchar) ~ (QS_READY | QS_ABORTED))); in AscIsrQDone()
10765 tid_no = ASC_TIX_TO_TID(scsiq->d2.target_ix); in AscIsrQDone()
10766 target_id = ASC_TIX_TO_TARGET_ID(scsiq->d2.target_ix); in AscIsrQDone()
10767 if ((scsiq->cntl & QC_SG_HEAD) != 0) { in AscIsrQDone()
10776 scsiq->d3.done_stat = QD_WITH_ERROR; in AscIsrQDone()
10777 scsiq->d3.host_stat = QHSTA_D_QDONE_SG_LIST_CORRUPTED; in AscIsrQDone()
10789 (ushort) ((ushort) ASC_QADR_BEG + (ushort) scsiq->d2.target_ix)); in AscIsrQDone()
10806 scsiq->d3.done_stat = QD_WITH_ERROR; in AscIsrQDone()
10809 if ((scsiq->d2.srb_ptr == 0UL) || in AscIsrQDone()
10810 ((scsiq->q_status & QS_ABORTED) != 0)) { in AscIsrQDone()
10812 } else if (scsiq->q_status == QS_DONE) { in AscIsrQDone()
10814 if (scsiq->extra_bytes != 0) { in AscIsrQDone()
10815 scsiq->remain_bytes += (ADV_DCNT) scsiq->extra_bytes; in AscIsrQDone()
10817 if (scsiq->d3.done_stat == QD_WITH_ERROR) { in AscIsrQDone()
10818 if (scsiq->d3.host_stat == QHSTA_M_DATA_OVER_RUN) { in AscIsrQDone()
10819 if ((scsiq->cntl & (QC_DATA_IN | QC_DATA_OUT)) == 0) { in AscIsrQDone()
10820 scsiq->d3.done_stat = QD_NO_ERROR; in AscIsrQDone()
10821 scsiq->d3.host_stat = QHSTA_NO_ERROR; in AscIsrQDone()
10823 scsiq->d3.done_stat = QD_NO_ERROR; in AscIsrQDone()
10824 scsiq->d3.host_stat = QHSTA_NO_ERROR; in AscIsrQDone()
10826 } else if (scsiq->d3.host_stat == in AscIsrQDone()
10838 if ((scsiq->cntl & QC_NO_CALLBACK) == 0) { in AscIsrQDone()
10839 (*asc_isr_callback) (asc_dvc, scsiq); in AscIsrQDone()
10845 if (scsiq->d3.done_stat != QD_NO_ERROR) { in AscIsrQDone()
10854 if ((scsiq->cntl & QC_NO_CALLBACK) == 0) { in AscIsrQDone()
10855 (*asc_isr_callback) (asc_dvc, scsiq); in AscIsrQDone()
11137 ASC_SCSI_Q *scsiq in AscExeScsiQueue() argument
11160 sg_head = scsiq->sg_head; in AscExeScsiQueue()
11164 if (scsiq == (ASC_SCSI_Q *) 0L) { in AscExeScsiQueue()
11168 scsiq->q1.q_no = 0; in AscExeScsiQueue()
11169 if ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0) { in AscExeScsiQueue()
11170 scsiq->q1.extra_bytes = 0; in AscExeScsiQueue()
11173 target_ix = scsiq->q2.target_ix; in AscExeScsiQueue()
11176 if (scsiq->cdbptr[0] == SCSICMD_RequestSense) { in AscExeScsiQueue()
11177 if ((asc_dvc->init_sdtr & scsiq->q1.target_id) != 0) { in AscExeScsiQueue()
11178 asc_dvc->sdtr_done &= ~scsiq->q1.target_id; in AscExeScsiQueue()
11184 scsiq->q1.cntl |= (QC_MSG_OUT | QC_URGENT); in AscExeScsiQueue()
11194 if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) { in AscExeScsiQueue()
11209 scsiq->q1.data_addr = (ADV_PADDR) sg_head->sg_list[0].addr; in AscExeScsiQueue()
11210 scsiq->q1.data_cnt = (ADV_DCNT) sg_head->sg_list[0].bytes; in AscExeScsiQueue()
11211 scsiq->q1.cntl &= ~(QC_SG_HEAD | QC_SG_SWAP_QUEUE); in AscExeScsiQueue()
11215 scsi_cmd = scsiq->cdbptr[0]; in AscExeScsiQueue()
11217 if ((asc_dvc->pci_fix_asyn_xfer & scsiq->q1.target_id) && in AscExeScsiQueue()
11218 !(asc_dvc->pci_fix_asyn_xfer_always & scsiq->q1.target_id)) { in AscExeScsiQueue()
11219 if (scsiq->q1.cntl & QC_SG_HEAD) { in AscExeScsiQueue()
11225 data_cnt = le32_to_cpu(scsiq->q1.data_cnt); in AscExeScsiQueue()
11245 scsiq->q2.tag_code &= ~M2_QTAG_MSG_SIMPLE; in AscExeScsiQueue()
11246 scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX | in AscExeScsiQueue()
11249 scsiq->q2.tag_code &= 0x27; in AscExeScsiQueue()
11251 if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) { in AscExeScsiQueue()
11263 ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) in AscExeScsiQueue()
11265 scsiq->q2.tag_code |= ASC_TAG_FLAG_EXTRA_BYTES; in AscExeScsiQueue()
11266 scsiq->q1.extra_bytes = extra_bytes; in AscExeScsiQueue()
11290 (uint) n_q_required) || ((scsiq->q1.cntl & QC_URGENT) != 0)) { in AscExeScsiQueue()
11291 if ((sta = AscSendScsiQueue(asc_dvc, scsiq, in AscExeScsiQueue()
11295 (*asc_exe_callback) (asc_dvc, scsiq); in AscExeScsiQueue()
11306 addr = le32_to_cpu(scsiq->q1.data_addr) + in AscExeScsiQueue()
11307 le32_to_cpu(scsiq->q1.data_cnt); in AscExeScsiQueue()
11310 ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) in AscExeScsiQueue()
11312 data_cnt = le32_to_cpu(scsiq->q1.data_cnt); in AscExeScsiQueue()
11314 scsiq->q2.tag_code |= ASC_TAG_FLAG_EXTRA_BYTES; in AscExeScsiQueue()
11316 scsiq->q1.data_cnt = cpu_to_le32(data_cnt); in AscExeScsiQueue()
11317 scsiq->q1.extra_bytes = extra_bytes; in AscExeScsiQueue()
11325 ((scsiq->q1.cntl & QC_URGENT) != 0)) { in AscExeScsiQueue()
11326 if ((sta = AscSendScsiQueue(asc_dvc, scsiq, in AscExeScsiQueue()
11330 (*asc_exe_callback) (asc_dvc, scsiq); in AscExeScsiQueue()
11345 ASC_SCSI_Q *scsiq, in AscSendScsiQueue() argument
11357 target_ix = scsiq->q2.target_ix; in AscSendScsiQueue()
11366 scsiq->sg_head->queue_cnt = n_q_required - 1; in AscSendScsiQueue()
11367 scsiq->q1.q_no = free_q_head; in AscSendScsiQueue()
11368 if ((sta = AscPutReadySgListQueue(asc_dvc, scsiq, in AscSendScsiQueue()
11379 scsiq->q1.q_no = free_q_head; in AscSendScsiQueue()
11380 if ((sta = AscPutReadyQueue(asc_dvc, scsiq, in AscSendScsiQueue()
11451 ASC_SCSI_Q *scsiq, in AscPutReadyQueue() argument
11463 if (((asc_dvc->init_sdtr & scsiq->q1.target_id) != 0) && in AscPutReadyQueue()
11464 ((asc_dvc->sdtr_done & scsiq->q1.target_id) == 0)) { in AscPutReadyQueue()
11465 tid_no = ASC_TIX_TO_TID(scsiq->q2.target_ix); in AscPutReadyQueue()
11472 scsiq->q1.cntl |= QC_MSG_OUT; in AscPutReadyQueue()
11475 if ((scsiq->q1.target_id & asc_dvc->use_tagged_qng) == 0) { in AscPutReadyQueue()
11476 scsiq->q2.tag_code &= ~M2_QTAG_MSG_SIMPLE; in AscPutReadyQueue()
11478 scsiq->q1.status = QS_FREE; in AscPutReadyQueue()
11481 (uchar *) scsiq->cdbptr, in AscPutReadyQueue()
11482 scsiq->q2.cdb_len >> 1); in AscPutReadyQueue()
11486 (uchar *) &scsiq->q1.cntl, in AscPutReadyQueue()
11490 (ushort) (((ushort) scsiq->q1.q_no << 8) | (ushort) QS_READY)); in AscPutReadyQueue()
11497 ASC_SCSI_Q *scsiq, in AscPutReadySgListQueue() argument
11515 sg_head = scsiq->sg_head; in AscPutReadySgListQueue()
11516 saved_data_addr = scsiq->q1.data_addr; in AscPutReadySgListQueue()
11517 saved_data_cnt = scsiq->q1.data_cnt; in AscPutReadySgListQueue()
11518 scsiq->q1.data_addr = (ASC_PADDR) sg_head->sg_list[0].addr; in AscPutReadySgListQueue()
11519 scsiq->q1.data_cnt = (ASC_DCNT) sg_head->sg_list[0].bytes; in AscPutReadySgListQueue()
11542 scsiq->remain_sg_entry_cnt = sg_head->entry_cnt - ASC_MAX_SG_LIST; in AscPutReadySgListQueue()
11556 scsiq->q1.cntl |= QC_SG_HEAD; in AscPutReadySgListQueue()
11559 scsiq->q1.sg_queue_cnt = sg_head->queue_cnt; in AscPutReadySgListQueue()
11615 scsiq->next_sg_index = sg_index; in AscPutReadySgListQueue()
11618 scsiq->q1.cntl &= ~QC_SG_HEAD; in AscPutReadySgListQueue()
11620 sta = AscPutReadyQueue(asc_dvc, scsiq, q_no); in AscPutReadySgListQueue()
11621 scsiq->q1.data_addr = saved_data_addr; in AscPutReadySgListQueue()
11622 scsiq->q1.data_cnt = saved_data_cnt; in AscPutReadySgListQueue()
17995 ADV_SCSI_REQ_Q *scsiq) in AdvExeScsiQueue() argument
18003 ASC_ASSERT(scsiq != NULL); /* 'scsiq' should never be NULL. */ in AdvExeScsiQueue()
18008 if (scsiq->target_id > ADV_MAX_TID) in AdvExeScsiQueue()
18010 scsiq->host_status = QHSTA_M_INVALID_DEVICE; in AdvExeScsiQueue()
18011 scsiq->done_status = QD_WITH_ERROR; in AdvExeScsiQueue()
18042 scsiq->a_flag &= ~ADV_SCSIQ_DONE; in AdvExeScsiQueue()
18045 req_paddr = DvcGetPhyAddr(asc_dvc, scsiq, (uchar *) scsiq, in AdvExeScsiQueue()
18055 scsiq->scsiq_ptr = cpu_to_le32(ADV_VADDR_TO_U32(scsiq)); in AdvExeScsiQueue()
18056 scsiq->scsiq_rptr = req_paddr; in AdvExeScsiQueue()
18058 scsiq->carr_va = cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->icq_sp)); in AdvExeScsiQueue()
18063 scsiq->carr_pa = asc_dvc->icq_sp->carr_pa; in AdvExeScsiQueue()
18292 ADV_SCSI_REQ_Q *scsiq; in AdvISR() local
18354 scsiq = (ADV_SCSI_REQ_Q *) in AdvISR()
18364 scsiq->done_status = QD_NO_ERROR; in AdvISR()
18365 scsiq->host_status = scsiq->scsi_status = 0; in AdvISR()
18366 scsiq->data_cnt = 0L; in AdvISR()
18383 ASC_ASSERT(scsiq != NULL); in AdvISR()
18384 target_bit = ADV_TID_TO_TIDMASK(scsiq->target_id); in AdvISR()
18389 scsiq->cntl = 0; in AdvISR()
18400 if (scsiq->done_status == QD_NO_ERROR && in AdvISR()
18401 scsiq->cdb[0] == SCSICMD_Inquiry && in AdvISR()
18402 scsiq->target_lun == 0 && in AdvISR()
18403 (scsiq->cdb[1] & ADV_INQ_RTN_VPD_AND_CMDDT) in AdvISR()
18406 AdvInquiryHandling(asc_dvc, scsiq); in AdvISR()
18413 scsiq->a_flag |= ADV_SCSIQ_DONE; in AdvISR()
18414 (*asc_dvc->isr_callback)(asc_dvc, scsiq); in AdvISR()
18528 ADV_SCSI_REQ_Q *scsiq) in AdvInquiryHandling() argument
18546 if (scsiq->cdb[4] < 8 || in AdvInquiryHandling()
18547 (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) < 8) in AdvInquiryHandling()
18553 tid = scsiq->target_id; in AdvInquiryHandling()
18555 inq = (ADV_SCSI_INQUIRY *) scsiq->vdata_addr; in AdvInquiryHandling()
18638 (scsiq->cdb[4] >= 57 || in AdvInquiryHandling()
18639 (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) >= 57)) in AdvInquiryHandling()