• Home
  • Raw
  • Download

Lines Matching refs:rqi

102 	struct snic_req_info *rqi = NULL;  in snic_free_wq_buf()  local
107 rqi = req_to_rqi(req); in snic_free_wq_buf()
109 if (list_empty(&rqi->list)) { in snic_free_wq_buf()
114 SNIC_BUG_ON(rqi->list.next == NULL); /* if not added to spl_cmd_list */ in snic_free_wq_buf()
115 list_del_init(&rqi->list); in snic_free_wq_buf()
118 if (rqi->sge_va) { in snic_free_wq_buf()
119 snic_pci_unmap_rsp_buf(snic, rqi); in snic_free_wq_buf()
120 kfree((void *)rqi->sge_va); in snic_free_wq_buf()
121 rqi->sge_va = 0; in snic_free_wq_buf()
123 snic_req_free(snic, rqi); in snic_free_wq_buf()
187 snic_handle_untagged_req(struct snic *snic, struct snic_req_info *rqi) in snic_handle_untagged_req() argument
191 INIT_LIST_HEAD(&rqi->list); in snic_handle_untagged_req()
194 list_add_tail(&rqi->list, &snic->spl_cmd_list); in snic_handle_untagged_req()
206 struct snic_req_info *rqi = NULL; in snic_req_init() local
211 rqi = mempool_alloc(snic->req_pool[typ], GFP_ATOMIC); in snic_req_init()
212 if (!rqi) { in snic_req_init()
217 return rqi; in snic_req_init()
220 memset(rqi, 0, sizeof(*rqi)); in snic_req_init()
221 rqi->rq_pool_type = typ; in snic_req_init()
222 rqi->start_time = jiffies; in snic_req_init()
223 rqi->req = (struct snic_host_req *) (rqi + 1); in snic_req_init()
224 rqi->req_len = sizeof(struct snic_host_req); in snic_req_init()
225 rqi->snic = snic; in snic_req_init()
227 rqi->req = (struct snic_host_req *)(rqi + 1); in snic_req_init()
232 rqi->req_len += (sg_cnt * sizeof(struct snic_sg_desc)); in snic_req_init()
241 memset(rqi->req, 0, rqi->req_len); in snic_req_init()
244 rqi->req->hdr.init_ctx = (ulong) rqi; in snic_req_init()
246 SNIC_SCSI_DBG(snic->shost, "Req_alloc:rqi = %p allocatd.\n", rqi); in snic_req_init()
248 return rqi; in snic_req_init()
255 snic_abort_req_init(struct snic *snic, struct snic_req_info *rqi) in snic_abort_req_init() argument
259 SNIC_BUG_ON(!rqi); in snic_abort_req_init()
262 if (rqi->abort_req) in snic_abort_req_init()
263 return rqi->abort_req; in snic_abort_req_init()
274 rqi->abort_req = req; in snic_abort_req_init()
277 req->hdr.init_ctx = (ulong) rqi; in snic_abort_req_init()
286 snic_dr_req_init(struct snic *snic, struct snic_req_info *rqi) in snic_dr_req_init() argument
290 SNIC_BUG_ON(!rqi); in snic_dr_req_init()
300 SNIC_BUG_ON(rqi->dr_req != NULL); in snic_dr_req_init()
301 rqi->dr_req = req; in snic_dr_req_init()
304 req->hdr.init_ctx = (ulong) rqi; in snic_dr_req_init()
311 snic_req_free(struct snic *snic, struct snic_req_info *rqi) in snic_req_free() argument
313 SNIC_BUG_ON(rqi->req == rqi->abort_req); in snic_req_free()
314 SNIC_BUG_ON(rqi->req == rqi->dr_req); in snic_req_free()
315 SNIC_BUG_ON(rqi->sge_va != 0); in snic_req_free()
319 rqi, rqi->req, rqi->abort_req, rqi->dr_req); in snic_req_free()
321 if (rqi->abort_req) in snic_req_free()
322 mempool_free(rqi->abort_req, snic->req_pool[SNIC_REQ_TM_CACHE]); in snic_req_free()
324 if (rqi->dr_req) in snic_req_free()
325 mempool_free(rqi->dr_req, snic->req_pool[SNIC_REQ_TM_CACHE]); in snic_req_free()
327 mempool_free(rqi, snic->req_pool[rqi->rq_pool_type]); in snic_req_free()
331 snic_pci_unmap_rsp_buf(struct snic *snic, struct snic_req_info *rqi) in snic_pci_unmap_rsp_buf() argument
335 sgd = req_to_sgl(rqi_to_req(rqi)); in snic_pci_unmap_rsp_buf()
349 struct snic_req_info *rqi; in snic_free_all_untagged_reqs() local
355 rqi = list_entry(cur, struct snic_req_info, list); in snic_free_all_untagged_reqs()
356 list_del_init(&rqi->list); in snic_free_all_untagged_reqs()
357 if (rqi->sge_va) { in snic_free_all_untagged_reqs()
358 snic_pci_unmap_rsp_buf(snic, rqi); in snic_free_all_untagged_reqs()
359 kfree((void *)rqi->sge_va); in snic_free_all_untagged_reqs()
360 rqi->sge_va = 0; in snic_free_all_untagged_reqs()
363 snic_req_free(snic, rqi); in snic_free_all_untagged_reqs()
372 snic_release_untagged_req(struct snic *snic, struct snic_req_info *rqi) in snic_release_untagged_req() argument
384 if (list_empty(&rqi->list)) { in snic_release_untagged_req()
388 list_del_init(&rqi->list); in snic_release_untagged_req()
390 snic_req_free(snic, rqi); in snic_release_untagged_req()
410 struct snic_req_info *rqi = NULL; in snic_dump_desc() local
415 rqi = (struct snic_req_info *) fwreq->hdr.init_ctx; in snic_dump_desc()
417 rqi = (struct snic_req_info *) req->hdr.init_ctx; in snic_dump_desc()
419 SNIC_BUG_ON(rqi == NULL || rqi->req == NULL); in snic_dump_desc()
459 rqi->req->u.icmnd.cdb[0]); in snic_dump_desc()
510 snic_calc_io_process_time(struct snic *snic, struct snic_req_info *rqi) in snic_calc_io_process_time() argument
514 duration = jiffies - rqi->start_time; in snic_calc_io_process_time()