Lines Matching refs:fcpreq

30 	struct nvmefc_tgt_fcp_req	*fcpreq;	/* only if RS */  member
71 struct nvmefc_tgt_fcp_req *fcpreq; member
648 fod->fcpreq = NULL; in nvmet_fc_prep_fcp_iodlist()
708 struct nvmefc_tgt_fcp_req *fcpreq) in nvmet_fc_queue_fcp_req() argument
710 struct nvmet_fc_fcp_iod *fod = fcpreq->nvmet_fc_private; in nvmet_fc_queue_fcp_req()
716 fcpreq->hwqid = queue->qid ? in nvmet_fc_queue_fcp_req()
729 nvmet_fc_queue_fcp_req(fod->tgtport, fod->queue, fod->fcpreq); in nvmet_fc_fcp_rqst_op_defer_work()
737 struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq; in nvmet_fc_free_fcp_iod() local
745 fcpreq->nvmet_fc_private = NULL; in nvmet_fc_free_fcp_iod()
751 fod->fcpreq = NULL; in nvmet_fc_free_fcp_iod()
753 tgtport->ops->fcp_req_release(&tgtport->fc_target_port, fcpreq); in nvmet_fc_free_fcp_iod()
770 fcpreq = deferfcp->fcp_req; in nvmet_fc_free_fcp_iod()
778 memcpy(&fod->cmdiubuf, fcpreq->rspaddr, fcpreq->rsplen); in nvmet_fc_free_fcp_iod()
781 fcpreq->rspaddr = NULL; in nvmet_fc_free_fcp_iod()
782 fcpreq->rsplen = 0; in nvmet_fc_free_fcp_iod()
783 fcpreq->nvmet_fc_private = fod; in nvmet_fc_free_fcp_iod()
784 fod->fcpreq = fcpreq; in nvmet_fc_free_fcp_iod()
788 tgtport->ops->defer_rcv(&tgtport->fc_target_port, fcpreq); in nvmet_fc_free_fcp_iod()
908 &tgtport->fc_target_port, fod->fcpreq); in nvmet_fc_delete_target_queue()
2076 iod->fcpreq = NULL; in nvmet_fc_rcv_ls_req()
2160 if (fod->fcpreq->op == NVMET_FCOP_READDATA_RSP) in nvmet_fc_prep_fcp_rsp()
2194 fod->fcpreq->rspaddr = ersp; in nvmet_fc_prep_fcp_rsp()
2195 fod->fcpreq->rspdma = fod->rspdma; in nvmet_fc_prep_fcp_rsp()
2199 fod->fcpreq->rsplen = NVME_FC_SIZEOF_ZEROS_RSP; in nvmet_fc_prep_fcp_rsp()
2205 fod->fcpreq->rsplen = sizeof(*ersp); in nvmet_fc_prep_fcp_rsp()
2212 static void nvmet_fc_xmt_fcp_op_done(struct nvmefc_tgt_fcp_req *fcpreq);
2218 struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq; in nvmet_fc_abort_op() local
2229 tgtport->ops->fcp_abort(&tgtport->fc_target_port, fcpreq); in nvmet_fc_abort_op()
2240 fod->fcpreq->op = NVMET_FCOP_RSP; in nvmet_fc_xmt_fcp_rsp()
2241 fod->fcpreq->timeout = 0; in nvmet_fc_xmt_fcp_rsp()
2245 ret = tgtport->ops->fcp_op(&tgtport->fc_target_port, fod->fcpreq); in nvmet_fc_xmt_fcp_rsp()
2254 struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq; in nvmet_fc_transfer_fcp_data() local
2261 fcpreq->op = op; in nvmet_fc_transfer_fcp_data()
2262 fcpreq->offset = fod->offset; in nvmet_fc_transfer_fcp_data()
2263 fcpreq->timeout = NVME_FC_TGTOP_TIMEOUT_SEC; in nvmet_fc_transfer_fcp_data()
2274 fcpreq->sg = sg; in nvmet_fc_transfer_fcp_data()
2275 fcpreq->sg_cnt = 0; in nvmet_fc_transfer_fcp_data()
2277 fcpreq->sg_cnt < tgtport->max_sg_cnt && in nvmet_fc_transfer_fcp_data()
2279 fcpreq->sg_cnt++; in nvmet_fc_transfer_fcp_data()
2283 if (tlen < remaininglen && fcpreq->sg_cnt == 0) { in nvmet_fc_transfer_fcp_data()
2284 fcpreq->sg_cnt++; in nvmet_fc_transfer_fcp_data()
2293 fcpreq->transfer_length = tlen; in nvmet_fc_transfer_fcp_data()
2294 fcpreq->transferred_length = 0; in nvmet_fc_transfer_fcp_data()
2295 fcpreq->fcp_error = 0; in nvmet_fc_transfer_fcp_data()
2296 fcpreq->rsplen = 0; in nvmet_fc_transfer_fcp_data()
2303 ((fod->offset + fcpreq->transfer_length) == fod->req.transfer_len) && in nvmet_fc_transfer_fcp_data()
2305 fcpreq->op = NVMET_FCOP_READDATA_RSP; in nvmet_fc_transfer_fcp_data()
2309 ret = tgtport->ops->fcp_op(&tgtport->fc_target_port, fod->fcpreq); in nvmet_fc_transfer_fcp_data()
2324 fcpreq->fcp_error = ret; in nvmet_fc_transfer_fcp_data()
2325 fcpreq->transferred_length = 0; in nvmet_fc_transfer_fcp_data()
2326 nvmet_fc_xmt_fcp_op_done(fod->fcpreq); in nvmet_fc_transfer_fcp_data()
2334 struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq; in __nvmet_fc_fod_op_abort() local
2339 if (fcpreq->op == NVMET_FCOP_WRITEDATA) { in __nvmet_fc_fod_op_abort()
2357 struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq; in nvmet_fc_fod_op_done() local
2367 switch (fcpreq->op) { in nvmet_fc_fod_op_done()
2372 if (fcpreq->fcp_error || in nvmet_fc_fod_op_done()
2373 fcpreq->transferred_length != fcpreq->transfer_length) { in nvmet_fc_fod_op_done()
2382 fod->offset += fcpreq->transferred_length; in nvmet_fc_fod_op_done()
2402 if (fcpreq->fcp_error || in nvmet_fc_fod_op_done()
2403 fcpreq->transferred_length != fcpreq->transfer_length) { in nvmet_fc_fod_op_done()
2410 if (fcpreq->op == NVMET_FCOP_READDATA_RSP) { in nvmet_fc_fod_op_done()
2417 fod->offset += fcpreq->transferred_length; in nvmet_fc_fod_op_done()
2446 nvmet_fc_xmt_fcp_op_done(struct nvmefc_tgt_fcp_req *fcpreq) in nvmet_fc_xmt_fcp_op_done() argument
2448 struct nvmet_fc_fcp_iod *fod = fcpreq->nvmet_fc_private; in nvmet_fc_xmt_fcp_op_done()
2540 fod->fcpreq->done = nvmet_fc_xmt_fcp_op_done; in nvmet_fc_handle_fcp_rqst()
2662 struct nvmefc_tgt_fcp_req *fcpreq, in nvmet_fc_rcv_fcp_req() argument
2697 fcpreq->nvmet_fc_private = fod; in nvmet_fc_rcv_fcp_req()
2698 fod->fcpreq = fcpreq; in nvmet_fc_rcv_fcp_req()
2702 nvmet_fc_queue_fcp_req(tgtport, queue, fcpreq); in nvmet_fc_rcv_fcp_req()
2733 fcpreq->rspaddr = cmdiubuf; in nvmet_fc_rcv_fcp_req()
2734 fcpreq->rsplen = cmdiubuf_len; in nvmet_fc_rcv_fcp_req()
2735 deferfcp->fcp_req = fcpreq; in nvmet_fc_rcv_fcp_req()
2773 struct nvmefc_tgt_fcp_req *fcpreq) in nvmet_fc_rcv_fcp_abort() argument
2775 struct nvmet_fc_fcp_iod *fod = fcpreq->nvmet_fc_private; in nvmet_fc_rcv_fcp_abort()
2779 if (!fod || fod->fcpreq != fcpreq) in nvmet_fc_rcv_fcp_abort()