Lines Matching refs:rqi

114 		   struct snic_req_info *rqi,  in snic_release_req_buf()  argument
117 struct snic_host_req *req = rqi_to_req(rqi); in snic_release_req_buf()
130 sc, snic_cmd_tag(sc), rqi, rqi->req, rqi->abort_req, in snic_release_req_buf()
131 rqi->dr_req, snic_ioreq_state_to_str(CMD_STATE(sc)), in snic_release_req_buf()
142 snic_req_free(snic, rqi); in snic_release_req_buf()
150 struct snic_req_info *rqi, in snic_queue_icmnd_req() argument
164 sgd = (struct snic_sg_desc *) req_to_sgl(rqi->req); in snic_queue_icmnd_req()
194 snic_icmnd_init(rqi->req, in snic_queue_icmnd_req()
197 (ulong) rqi, in snic_queue_icmnd_req()
199 rqi->tgt_id, in snic_queue_icmnd_req()
205 (ulong) req_to_sgl(rqi->req), in snic_queue_icmnd_req()
210 ret = snic_queue_wq_desc(snic, rqi->req, rqi->req_len); in snic_queue_icmnd_req()
230 struct snic_req_info *rqi = NULL; in snic_issue_scsi_req() local
251 rqi = snic_req_init(snic, sg_cnt); in snic_issue_scsi_req()
252 if (!rqi) { in snic_issue_scsi_req()
259 rqi->tgt_id = tgt->id; in snic_issue_scsi_req()
260 rqi->sc = sc; in snic_issue_scsi_req()
263 CMD_SP(sc) = (char *) rqi; in snic_issue_scsi_req()
270 ret = snic_queue_icmnd_req(snic, rqi, sc, sg_cnt); in snic_issue_scsi_req()
277 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_issue_scsi_req()
283 if (rqi) in snic_issue_scsi_req()
284 snic_release_req_buf(snic, rqi, sc); in snic_issue_scsi_req()
290 u32 qtime = jiffies - rqi->start_time; in snic_issue_scsi_req()
303 SNIC_TRC(snic->shost->host_no, tag, (ulong) sc, (ulong) rqi, in snic_issue_scsi_req()
534 struct snic_req_info *rqi = NULL; in snic_icmnd_cmpl_handler() local
576 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_icmnd_cmpl_handler()
580 CMD_FLAGS(sc), rqi); in snic_icmnd_cmpl_handler()
588 SNIC_BUG_ON(rqi != (struct snic_req_info *)ctx); in snic_icmnd_cmpl_handler()
590 if (!rqi) { in snic_icmnd_cmpl_handler()
602 rqi = (struct snic_req_info *) ctx; in snic_icmnd_cmpl_handler()
603 start_time = rqi->start_time; in snic_icmnd_cmpl_handler()
606 rqi->io_cmpl = 1; in snic_icmnd_cmpl_handler()
651 snic_calc_io_process_time(snic, rqi); in snic_icmnd_cmpl_handler()
653 snic_release_req_buf(snic, rqi, sc); in snic_icmnd_cmpl_handler()
672 struct snic_req_info *rqi = (struct snic_req_info *) CMD_SP(sc); in snic_proc_dr_cmpl_locked() local
673 u32 start_time = rqi->start_time; in snic_proc_dr_cmpl_locked()
720 if (rqi->dr_done) in snic_proc_dr_cmpl_locked()
721 complete(rqi->dr_done); in snic_proc_dr_cmpl_locked()
759 struct snic_req_info *rqi = NULL; in snic_process_itmf_cmpl() local
773 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_process_itmf_cmpl()
774 WARN_ON_ONCE(!rqi); in snic_process_itmf_cmpl()
776 if (!rqi) { in snic_process_itmf_cmpl()
791 start_time = rqi->start_time; in snic_process_itmf_cmpl()
821 if (rqi->abts_done) { in snic_process_itmf_cmpl()
822 complete(rqi->abts_done); in snic_process_itmf_cmpl()
836 snic_release_req_buf(snic, rqi, sc); in snic_process_itmf_cmpl()
867 if (rqi->abts_done) in snic_process_itmf_cmpl()
868 complete(rqi->abts_done); in snic_process_itmf_cmpl()
901 struct snic_req_info *rqi = NULL; in snic_itmf_cmpl_handler() local
921 rqi = (struct snic_req_info *) ctx; in snic_itmf_cmpl_handler()
922 sc = rqi->sc; in snic_itmf_cmpl_handler()
988 struct snic_req_info *rqi = NULL; in snic_hba_reset_cmpl_handler() local
1004 rqi = (struct snic_req_info *) ctx; in snic_hba_reset_cmpl_handler()
1008 sc = rqi->sc; in snic_hba_reset_cmpl_handler()
1036 sc, rqi, cmnd_id, CMD_FLAGS(sc)); in snic_hba_reset_cmpl_handler()
1050 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_hba_reset_cmpl_handler()
1051 WARN_ON_ONCE(!rqi); in snic_hba_reset_cmpl_handler()
1053 if (!rqi) { in snic_hba_reset_cmpl_handler()
1291 struct snic_req_info *rqi = req_to_rqi(tmreq); in snic_queue_itmf_req() local
1293 int tm_tag = snic_cmd_tag(sc) | rqi->tm_tag; in snic_queue_itmf_req()
1296 SNIC_BUG_ON(!rqi); in snic_queue_itmf_req()
1297 SNIC_BUG_ON(!rqi->tm_tag); in snic_queue_itmf_req()
1306 (ulong) rqi, in snic_queue_itmf_req()
1309 rqi->tgt_id, in snic_queue_itmf_req()
1324 tmf, sc, rqi, req_id, snic_cmd_tag(sc), ret); in snic_queue_itmf_req()
1328 tmf, sc, rqi, req_id, snic_cmd_tag(sc)); in snic_queue_itmf_req()
1335 struct snic_req_info *rqi, in snic_issue_tm_req() argument
1350 tmf, rqi, tag); in snic_issue_tm_req()
1354 tmreq = snic_dr_req_init(snic, rqi); in snic_issue_tm_req()
1357 tmreq = snic_abort_req_init(snic, rqi); in snic_issue_tm_req()
1373 tmf, sc, rqi, req_id, tag, ret); in snic_issue_tm_req()
1377 tmf, sc, rqi, req_id, tag); in snic_issue_tm_req()
1390 struct snic_req_info *rqi, in snic_queue_abort_req() argument
1395 sc, rqi, snic_cmd_tag(sc), tmf); in snic_queue_abort_req()
1398 rqi->tm_tag |= SNIC_TAG_ABORT; in snic_queue_abort_req()
1400 return snic_issue_tm_req(snic, rqi, sc, tmf); in snic_queue_abort_req()
1409 struct snic_req_info *rqi = NULL; in snic_abort_finish() local
1416 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_abort_finish()
1417 if (!rqi) { in snic_abort_finish()
1429 rqi->abts_done = NULL; in snic_abort_finish()
1443 rqi = NULL; in snic_abort_finish()
1462 rqi = NULL; in snic_abort_finish()
1474 if (rqi) in snic_abort_finish()
1475 snic_release_req_buf(snic, rqi, sc); in snic_abort_finish()
1486 struct snic_req_info *rqi = NULL; in snic_send_abort_and_wait() local
1517 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_send_abort_and_wait()
1518 if (!rqi) { in snic_send_abort_and_wait()
1530 rqi->abts_done = &tm_done; in snic_send_abort_and_wait()
1537 SNIC_BUG_ON(!rqi->abts_done); in snic_send_abort_and_wait()
1556 ret = snic_queue_abort_req(snic, rqi, sc, tmf); in snic_send_abort_and_wait()
1566 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_send_abort_and_wait()
1567 if (rqi) in snic_send_abort_and_wait()
1568 rqi->abts_done = NULL; in snic_send_abort_and_wait()
1653 struct snic_req_info *rqi = NULL; in snic_is_abts_pending() local
1676 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_is_abts_pending()
1677 if (!rqi) { in snic_is_abts_pending()
1707 struct snic_req_info *rqi = NULL; in snic_dr_clean_single_req() local
1724 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_clean_single_req()
1726 if (!rqi) in snic_dr_clean_single_req()
1760 SNIC_BUG_ON(rqi->abts_done); in snic_dr_clean_single_req()
1763 rqi->tm_tag = SNIC_TAG_DEV_RST; in snic_dr_clean_single_req()
1770 rqi->abts_done = &tm_done; in snic_dr_clean_single_req()
1780 ret = snic_queue_abort_req(snic, rqi, sc, tmf); in snic_dr_clean_single_req()
1784 sc, tag, rqi->tm_tag, CMD_FLAGS(sc)); in snic_dr_clean_single_req()
1787 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_clean_single_req()
1788 if (rqi) in snic_dr_clean_single_req()
1789 rqi->abts_done = NULL; in snic_dr_clean_single_req()
1810 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_clean_single_req()
1811 if (!rqi) { in snic_dr_clean_single_req()
1815 rqi->abts_done = NULL; in snic_dr_clean_single_req()
1821 sc, tag, rqi->tm_tag, CMD_FLAGS(sc)); in snic_dr_clean_single_req()
1833 snic_release_req_buf(snic, rqi, sc); in snic_dr_clean_single_req()
1891 struct snic_req_info *rqi = NULL; in snic_dr_finish() local
1899 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_finish()
1900 if (!rqi) { in snic_dr_finish()
1910 rqi->dr_done = NULL; in snic_dr_finish()
1957 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_finish()
1963 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_finish()
1964 if (rqi) in snic_dr_finish()
1972 if (rqi) in snic_dr_finish()
1976 if (rqi) in snic_dr_finish()
1977 snic_release_req_buf(snic, rqi, sc); in snic_dr_finish()
1985 struct snic_req_info *rqi, in snic_queue_dr_req() argument
1989 rqi->tm_tag |= SNIC_TAG_DEV_RST; in snic_queue_dr_req()
1991 return snic_issue_tm_req(snic, rqi, sc, SNIC_ITMF_LUN_RESET); in snic_queue_dr_req()
1997 struct snic_req_info *rqi = NULL; in snic_send_dr_and_wait() local
2007 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_send_dr_and_wait()
2008 if (!rqi) { in snic_send_dr_and_wait()
2026 rqi->dr_done = &tm_done; in snic_send_dr_and_wait()
2027 SNIC_BUG_ON(!rqi->dr_done); in snic_send_dr_and_wait()
2037 ret = snic_queue_dr_req(snic, rqi, sc); in snic_send_dr_and_wait()
2046 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_send_dr_and_wait()
2047 if (rqi) in snic_send_dr_and_wait()
2048 rqi->dr_done = NULL; in snic_send_dr_and_wait()
2086 struct snic_req_info *rqi = NULL; in snic_unlink_and_release_req() local
2093 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_unlink_and_release_req()
2094 if (rqi) { in snic_unlink_and_release_req()
2095 start_time = rqi->start_time; in snic_unlink_and_release_req()
2102 if (rqi) in snic_unlink_and_release_req()
2103 snic_release_req_buf(snic, rqi, sc); in snic_unlink_and_release_req()
2106 jiffies_to_msecs(jiffies - start_time), (ulong) rqi, in snic_unlink_and_release_req()
2120 struct snic_req_info *rqi = NULL; in snic_device_reset() local
2150 rqi = snic_req_init(snic, 0); in snic_device_reset()
2151 if (!rqi) in snic_device_reset()
2156 CMD_SP(sc) = (char *)rqi; in snic_device_reset()
2160 rqi->tm_tag = SNIC_TAG_IOCTL_DEV_RST; in snic_device_reset()
2161 rqi->sc = sc; in snic_device_reset()
2202 struct snic_req_info *rqi = NULL; in snic_issue_hba_reset() local
2209 rqi = snic_req_init(snic, 0); in snic_issue_hba_reset()
2210 if (!rqi) { in snic_issue_hba_reset()
2220 rqi->sc = sc; in snic_issue_hba_reset()
2223 req = rqi_to_req(rqi); in snic_issue_hba_reset()
2229 CMD_SP(sc) = (char *) rqi; in snic_issue_hba_reset()
2236 snic->config.hid, 0, (ulong) rqi); in snic_issue_hba_reset()
2267 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_issue_hba_reset()
2271 if (rqi) in snic_issue_hba_reset()
2272 snic_req_free(snic, rqi); in snic_issue_hba_reset()
2281 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_issue_hba_reset()
2285 if (rqi) in snic_issue_hba_reset()
2286 snic_req_free(snic, rqi); in snic_issue_hba_reset()
2380 struct snic_req_info *rqi = NULL; in snic_cmpl_pending_tmreq() local
2393 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_cmpl_pending_tmreq()
2394 if (!rqi) in snic_cmpl_pending_tmreq()
2397 if (rqi->dr_done) in snic_cmpl_pending_tmreq()
2398 complete(rqi->dr_done); in snic_cmpl_pending_tmreq()
2399 else if (rqi->abts_done) in snic_cmpl_pending_tmreq()
2400 complete(rqi->abts_done); in snic_cmpl_pending_tmreq()
2409 struct snic_req_info *rqi = NULL; in snic_scsi_cleanup() local
2443 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_scsi_cleanup()
2444 if (!rqi) { in snic_scsi_cleanup()
2452 sc, rqi, tag, CMD_FLAGS(sc)); in snic_scsi_cleanup()
2457 st_time = rqi->start_time; in snic_scsi_cleanup()
2461 rqi, CMD_FLAGS(sc)); in snic_scsi_cleanup()
2463 snic_release_req_buf(snic, rqi, sc); in snic_scsi_cleanup()
2469 sc, scsi_cmd_to_rq(sc)->tag, CMD_FLAGS(sc), rqi, in snic_scsi_cleanup()
2499 struct snic_req_info *rqi = NULL; in snic_internal_abort_io() local
2507 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_internal_abort_io()
2508 if (!rqi) in snic_internal_abort_io()
2540 rqi->tm_tag = SNIC_TAG_DEV_RST; in snic_internal_abort_io()
2546 SNIC_BUG_ON(rqi->abts_done); in snic_internal_abort_io()
2549 ret = snic_queue_abort_req(snic, rqi, sc, tmf); in snic_internal_abort_io()