• Home
  • Raw
  • Download

Lines Matching refs:rq

46 void esas2r_start_request(struct esas2r_adapter *a, struct esas2r_request *rq)  in esas2r_start_request()  argument
49 struct esas2r_request *startrq = rq; in esas2r_start_request()
54 if (rq->vrq->scsi.function == VDA_FUNC_SCSI) in esas2r_start_request()
55 rq->req_stat = RS_SEL2; in esas2r_start_request()
57 rq->req_stat = RS_DEGRADED; in esas2r_start_request()
58 } else if (likely(rq->vrq->scsi.function == VDA_FUNC_SCSI)) { in esas2r_start_request()
59 t = a->targetdb + rq->target_id; in esas2r_start_request()
63 rq->req_stat = RS_SEL; in esas2r_start_request()
66 rq->vrq->scsi.target_id = cpu_to_le16(t->virt_targ_id); in esas2r_start_request()
75 rq->req_stat = RS_SEL; in esas2r_start_request()
79 if (unlikely(rq->req_stat != RS_PENDING)) { in esas2r_start_request()
80 esas2r_complete_request(a, rq); in esas2r_start_request()
84 esas2r_trace("rq=%p", rq); in esas2r_start_request()
85 esas2r_trace("rq->vrq->scsi.handle=%x", rq->vrq->scsi.handle); in esas2r_start_request()
87 if (rq->vrq->scsi.function == VDA_FUNC_SCSI) { in esas2r_start_request()
88 esas2r_trace("rq->target_id=%d", rq->target_id); in esas2r_start_request()
89 esas2r_trace("rq->vrq->scsi.flags=%x", rq->vrq->scsi.flags); in esas2r_start_request()
120 struct esas2r_request *rq) in esas2r_local_start_request() argument
123 esas2r_trace("rq=%p", rq); in esas2r_local_start_request()
124 esas2r_trace("rq->vrq:%p", rq->vrq); in esas2r_local_start_request()
125 esas2r_trace("rq->vrq_md->phys_addr:%x", rq->vrq_md->phys_addr); in esas2r_local_start_request()
127 if (unlikely(rq->vrq->scsi.function == VDA_FUNC_FLASH in esas2r_local_start_request()
128 && rq->vrq->flash.sub_func == VDA_FLASH_COMMIT)) in esas2r_local_start_request()
131 list_add_tail(&rq->req_list, &a->active_list); in esas2r_local_start_request()
132 esas2r_start_vda_request(a, rq); in esas2r_local_start_request()
138 struct esas2r_request *rq) in esas2r_start_vda_request() argument
143 rq->req_stat = RS_STARTED; in esas2r_start_vda_request()
164 if (rq->vda_req_sz == RQ_SIZE_DEFAULT) in esas2r_start_vda_request()
165 rq->vda_req_sz = (u16)(a->max_vdareq_size / sizeof(u32)); in esas2r_start_vda_request()
167 element->address = cpu_to_le64(rq->vrq_md->phys_addr); in esas2r_start_vda_request()
168 element->length = cpu_to_le32(rq->vda_req_sz); in esas2r_start_vda_request()
176 esas2r_trace("rq->vrq->scsi.handle:%x", rq->vrq->scsi.handle); in esas2r_start_vda_request()
178 esas2r_trace("rq->vda_req_sz:%x", rq->vda_req_sz); in esas2r_start_vda_request()
190 struct esas2r_request *rq = sgc->first_req; in esas2r_build_sg_list_sge() local
191 union atto_vda_req *vrq = rq->vrq; in esas2r_build_sg_list_sge()
273 - (u8 *)rq->sg_table-> in esas2r_build_sg_list_sge()
288 rq->vda_req_sz = in esas2r_build_sg_list_sge()
302 list_add(&sgl->next_desc, &rq->sg_table_head); in esas2r_build_sg_list_sge()
337 (u8 *)rq->sg_table->virt_addr)); in esas2r_build_sg_list_sge()
354 if (reqsize > rq->vda_req_sz) in esas2r_build_sg_list_sge()
355 rq->vda_req_sz = reqsize; in esas2r_build_sg_list_sge()
373 struct esas2r_request *rq = sgc->first_req; in esas2r_build_prd_iblk() local
458 list_add(&sgl->next_desc, &rq->sg_table_head); in esas2r_build_prd_iblk()
512 if (!list_empty(&rq->sg_table_head)) { in esas2r_build_prd_iblk()
527 struct esas2r_request *rq = sgc->first_req; in esas2r_build_sg_list_prd() local
529 struct esas2r_target *t = a->targetdb + rq->target_id; in esas2r_build_sg_list_prd()
533 u8 *cdb = (u8 *)&rq->vrq->scsi.cdb[0]; in esas2r_build_sg_list_prd()
540 if (rq->vrq->scsi.function == VDA_FUNC_SCSI in esas2r_build_sg_list_prd()
545 switch (rq->vrq->scsi.cdb[0]) { in esas2r_build_sg_list_prd()
591 rq->vrq->scsi.iblk_cnt_prd = 0; in esas2r_build_sg_list_prd()
600 rq->flags |= RF_1ST_IBLK_BASE; in esas2r_build_sg_list_prd()
639 rq->vrq->scsi.iblk_cnt_prd++; in esas2r_build_sg_list_prd()
650 reqsize = ((u16)((u8 *)curr_iblk_chn - (u8 *)rq->vrq)) in esas2r_build_sg_list_prd()
659 if (reqsize > rq->vda_req_sz) in esas2r_build_sg_list_prd()
660 rq->vda_req_sz = reqsize; in esas2r_build_sg_list_prd()
770 struct esas2r_request *rq; in esas2r_send_task_mgmt() local
783 rq = list_entry(element, struct esas2r_request, req_list); in esas2r_send_task_mgmt()
785 if (rq->vrq->scsi.function == VDA_FUNC_SCSI in esas2r_send_task_mgmt()
786 && rq->target_id == targetid in esas2r_send_task_mgmt()
787 && (((u8)le32_to_cpu(rq->vrq->scsi.flags)) == lun in esas2r_send_task_mgmt()
790 if (rq->req_stat == RS_PENDING) { in esas2r_send_task_mgmt()
795 if (esas2r_ioreq_aborted(a, rq, RS_ABORTED)) in esas2r_send_task_mgmt()
796 list_add_tail(&rq->comp_list, in esas2r_send_task_mgmt()
816 rq = list_entry(element, struct esas2r_request, in esas2r_send_task_mgmt()
818 if (rq->vrq->scsi.function == VDA_FUNC_SCSI in esas2r_send_task_mgmt()
819 && rq->target_id == targetid in esas2r_send_task_mgmt()
820 && (((u8)le32_to_cpu(rq->vrq->scsi.flags)) == lun in esas2r_send_task_mgmt()
858 bool esas2r_ioreq_aborted(struct esas2r_adapter *a, struct esas2r_request *rq, in esas2r_ioreq_aborted() argument
862 esas2r_trace("rq:%p", rq); in esas2r_ioreq_aborted()
863 list_del_init(&rq->req_list); in esas2r_ioreq_aborted()
864 if (rq->timeout > RQ_MAX_TIMEOUT) { in esas2r_ioreq_aborted()
869 rq->req_stat = RS_BUSY; in esas2r_ioreq_aborted()
874 rq->req_stat = status; in esas2r_ioreq_aborted()