Lines Matching refs:rqi
128 struct snic_req_info *rqi, in snic_release_req_buf() argument
131 struct snic_host_req *req = rqi_to_req(rqi); in snic_release_req_buf()
144 sc, snic_cmd_tag(sc), rqi, rqi->req, rqi->abort_req, in snic_release_req_buf()
145 rqi->dr_req, snic_ioreq_state_to_str(CMD_STATE(sc)), in snic_release_req_buf()
156 snic_req_free(snic, rqi); in snic_release_req_buf()
164 struct snic_req_info *rqi, in snic_queue_icmnd_req() argument
178 sgd = (struct snic_sg_desc *) req_to_sgl(rqi->req); in snic_queue_icmnd_req()
209 snic_icmnd_init(rqi->req, in snic_queue_icmnd_req()
212 (ulong) rqi, in snic_queue_icmnd_req()
214 rqi->tgt_id, in snic_queue_icmnd_req()
220 (ulong) req_to_sgl(rqi->req), in snic_queue_icmnd_req()
224 ret = snic_queue_wq_desc(snic, rqi->req, rqi->req_len); in snic_queue_icmnd_req()
241 struct snic_req_info *rqi = NULL; in snic_issue_scsi_req() local
262 rqi = snic_req_init(snic, sg_cnt); in snic_issue_scsi_req()
263 if (!rqi) { in snic_issue_scsi_req()
270 rqi->tgt_id = tgt->id; in snic_issue_scsi_req()
271 rqi->sc = sc; in snic_issue_scsi_req()
274 CMD_SP(sc) = (char *) rqi; in snic_issue_scsi_req()
281 ret = snic_queue_icmnd_req(snic, rqi, sc, sg_cnt); in snic_issue_scsi_req()
288 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_issue_scsi_req()
294 if (rqi) in snic_issue_scsi_req()
295 snic_release_req_buf(snic, rqi, sc); in snic_issue_scsi_req()
301 u32 qtime = jiffies - rqi->start_time; in snic_issue_scsi_req()
314 SNIC_TRC(snic->shost->host_no, tag, (ulong) sc, (ulong) rqi, in snic_issue_scsi_req()
553 struct snic_req_info *rqi = NULL; in snic_icmnd_cmpl_handler() local
595 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_icmnd_cmpl_handler()
599 CMD_FLAGS(sc), rqi); in snic_icmnd_cmpl_handler()
601 SNIC_BUG_ON(rqi != (struct snic_req_info *)ctx); in snic_icmnd_cmpl_handler()
603 if (!rqi) { in snic_icmnd_cmpl_handler()
615 rqi = (struct snic_req_info *) ctx; in snic_icmnd_cmpl_handler()
616 start_time = rqi->start_time; in snic_icmnd_cmpl_handler()
619 rqi->io_cmpl = 1; in snic_icmnd_cmpl_handler()
664 snic_calc_io_process_time(snic, rqi); in snic_icmnd_cmpl_handler()
666 snic_release_req_buf(snic, rqi, sc); in snic_icmnd_cmpl_handler()
686 struct snic_req_info *rqi = (struct snic_req_info *) CMD_SP(sc); in snic_proc_dr_cmpl_locked() local
687 u32 start_time = rqi->start_time; in snic_proc_dr_cmpl_locked()
734 if (rqi->dr_done) in snic_proc_dr_cmpl_locked()
735 complete(rqi->dr_done); in snic_proc_dr_cmpl_locked()
773 struct snic_req_info *rqi = NULL; in snic_process_itmf_cmpl() local
782 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_process_itmf_cmpl()
783 WARN_ON_ONCE(!rqi); in snic_process_itmf_cmpl()
785 if (!rqi) { in snic_process_itmf_cmpl()
800 start_time = rqi->start_time; in snic_process_itmf_cmpl()
830 if (rqi->abts_done) { in snic_process_itmf_cmpl()
831 complete(rqi->abts_done); in snic_process_itmf_cmpl()
845 snic_release_req_buf(snic, rqi, sc); in snic_process_itmf_cmpl()
878 if (rqi->abts_done) in snic_process_itmf_cmpl()
879 complete(rqi->abts_done); in snic_process_itmf_cmpl()
912 struct snic_req_info *rqi = NULL; in snic_itmf_cmpl_handler() local
932 rqi = (struct snic_req_info *) ctx; in snic_itmf_cmpl_handler()
933 sc = rqi->sc; in snic_itmf_cmpl_handler()
999 struct snic_req_info *rqi = NULL; in snic_hba_reset_cmpl_handler() local
1014 rqi = (struct snic_req_info *) ctx; in snic_hba_reset_cmpl_handler()
1015 sc = rqi->sc; in snic_hba_reset_cmpl_handler()
1053 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_hba_reset_cmpl_handler()
1054 WARN_ON_ONCE(!rqi); in snic_hba_reset_cmpl_handler()
1056 if (!rqi) { in snic_hba_reset_cmpl_handler()
1294 struct snic_req_info *rqi = req_to_rqi(tmreq); in snic_queue_itmf_req() local
1296 int tm_tag = snic_cmd_tag(sc) | rqi->tm_tag; in snic_queue_itmf_req()
1299 SNIC_BUG_ON(!rqi); in snic_queue_itmf_req()
1300 SNIC_BUG_ON(!rqi->tm_tag); in snic_queue_itmf_req()
1309 (ulong) rqi, in snic_queue_itmf_req()
1312 rqi->tgt_id, in snic_queue_itmf_req()
1327 tmf, sc, rqi, req_id, snic_cmd_tag(sc), ret); in snic_queue_itmf_req()
1331 tmf, sc, rqi, req_id, snic_cmd_tag(sc)); in snic_queue_itmf_req()
1338 struct snic_req_info *rqi, in snic_issue_tm_req() argument
1353 tmf, rqi, tag); in snic_issue_tm_req()
1357 tmreq = snic_dr_req_init(snic, rqi); in snic_issue_tm_req()
1360 tmreq = snic_abort_req_init(snic, rqi); in snic_issue_tm_req()
1380 tmf, sc, rqi, req_id, tag, ret); in snic_issue_tm_req()
1384 tmf, sc, rqi, req_id, tag); in snic_issue_tm_req()
1397 struct snic_req_info *rqi, in snic_queue_abort_req() argument
1402 sc, rqi, snic_cmd_tag(sc), tmf); in snic_queue_abort_req()
1405 rqi->tm_tag |= SNIC_TAG_ABORT; in snic_queue_abort_req()
1407 return snic_issue_tm_req(snic, rqi, sc, tmf); in snic_queue_abort_req()
1416 struct snic_req_info *rqi = NULL; in snic_abort_finish() local
1423 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_abort_finish()
1424 if (!rqi) { in snic_abort_finish()
1436 rqi->abts_done = NULL; in snic_abort_finish()
1450 rqi = NULL; in snic_abort_finish()
1473 if (rqi) in snic_abort_finish()
1474 snic_release_req_buf(snic, rqi, sc); in snic_abort_finish()
1485 struct snic_req_info *rqi = NULL; in snic_send_abort_and_wait() local
1516 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_send_abort_and_wait()
1517 if (!rqi) { in snic_send_abort_and_wait()
1529 rqi->abts_done = &tm_done; in snic_send_abort_and_wait()
1536 SNIC_BUG_ON(!rqi->abts_done); in snic_send_abort_and_wait()
1555 ret = snic_queue_abort_req(snic, rqi, sc, tmf); in snic_send_abort_and_wait()
1564 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_send_abort_and_wait()
1565 if (rqi) in snic_send_abort_and_wait()
1566 rqi->abts_done = NULL; in snic_send_abort_and_wait()
1651 struct snic_req_info *rqi = NULL; in snic_is_abts_pending() local
1674 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_is_abts_pending()
1675 if (!rqi) { in snic_is_abts_pending()
1705 struct snic_req_info *rqi = NULL; in snic_dr_clean_single_req() local
1722 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_clean_single_req()
1724 if (!rqi) in snic_dr_clean_single_req()
1758 SNIC_BUG_ON(rqi->abts_done); in snic_dr_clean_single_req()
1761 rqi->tm_tag = SNIC_TAG_DEV_RST; in snic_dr_clean_single_req()
1768 rqi->abts_done = &tm_done; in snic_dr_clean_single_req()
1778 ret = snic_queue_abort_req(snic, rqi, sc, tmf); in snic_dr_clean_single_req()
1782 sc, tag, rqi->tm_tag, CMD_FLAGS(sc)); in snic_dr_clean_single_req()
1785 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_clean_single_req()
1786 if (rqi) in snic_dr_clean_single_req()
1787 rqi->abts_done = NULL; in snic_dr_clean_single_req()
1808 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_clean_single_req()
1809 if (!rqi) { in snic_dr_clean_single_req()
1813 rqi->abts_done = NULL; in snic_dr_clean_single_req()
1819 sc, tag, rqi->tm_tag, CMD_FLAGS(sc)); in snic_dr_clean_single_req()
1831 snic_release_req_buf(snic, rqi, sc); in snic_dr_clean_single_req()
1892 struct snic_req_info *rqi = NULL; in snic_dr_finish() local
1900 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_finish()
1901 if (!rqi) { in snic_dr_finish()
1911 rqi->dr_done = NULL; in snic_dr_finish()
1958 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_finish()
1964 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_dr_finish()
1965 if (rqi) in snic_dr_finish()
1973 if (rqi) in snic_dr_finish()
1977 if (rqi) in snic_dr_finish()
1978 snic_release_req_buf(snic, rqi, sc); in snic_dr_finish()
1986 struct snic_req_info *rqi, in snic_queue_dr_req() argument
1990 rqi->tm_tag |= SNIC_TAG_DEV_RST; in snic_queue_dr_req()
1992 return snic_issue_tm_req(snic, rqi, sc, SNIC_ITMF_LUN_RESET); in snic_queue_dr_req()
1998 struct snic_req_info *rqi = NULL; in snic_send_dr_and_wait() local
2008 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_send_dr_and_wait()
2009 if (!rqi) { in snic_send_dr_and_wait()
2027 rqi->dr_done = &tm_done; in snic_send_dr_and_wait()
2028 SNIC_BUG_ON(!rqi->dr_done); in snic_send_dr_and_wait()
2038 ret = snic_queue_dr_req(snic, rqi, sc); in snic_send_dr_and_wait()
2047 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_send_dr_and_wait()
2048 if (rqi) in snic_send_dr_and_wait()
2049 rqi->dr_done = NULL; in snic_send_dr_and_wait()
2087 struct snic_req_info *rqi = NULL; in snic_unlink_and_release_req() local
2094 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_unlink_and_release_req()
2095 if (rqi) { in snic_unlink_and_release_req()
2096 start_time = rqi->start_time; in snic_unlink_and_release_req()
2103 if (rqi) in snic_unlink_and_release_req()
2104 snic_release_req_buf(snic, rqi, sc); in snic_unlink_and_release_req()
2107 jiffies_to_msecs(jiffies - start_time), (ulong) rqi, in snic_unlink_and_release_req()
2121 struct snic_req_info *rqi = NULL; in snic_device_reset() local
2151 rqi = snic_req_init(snic, 0); in snic_device_reset()
2152 if (!rqi) in snic_device_reset()
2157 CMD_SP(sc) = (char *)rqi; in snic_device_reset()
2161 rqi->tm_tag = SNIC_TAG_IOCTL_DEV_RST; in snic_device_reset()
2162 rqi->sc = sc; in snic_device_reset()
2203 struct snic_req_info *rqi = NULL; in snic_issue_hba_reset() local
2210 rqi = snic_req_init(snic, 0); in snic_issue_hba_reset()
2211 if (!rqi) { in snic_issue_hba_reset()
2221 rqi->sc = sc; in snic_issue_hba_reset()
2224 req = rqi_to_req(rqi); in snic_issue_hba_reset()
2230 CMD_SP(sc) = (char *) rqi; in snic_issue_hba_reset()
2237 snic->config.hid, 0, (ulong) rqi); in snic_issue_hba_reset()
2268 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_issue_hba_reset()
2272 if (rqi) in snic_issue_hba_reset()
2273 snic_req_free(snic, rqi); in snic_issue_hba_reset()
2282 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_issue_hba_reset()
2286 if (rqi) in snic_issue_hba_reset()
2287 snic_req_free(snic, rqi); in snic_issue_hba_reset()
2381 struct snic_req_info *rqi = NULL; in snic_cmpl_pending_tmreq() local
2387 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_cmpl_pending_tmreq()
2388 if (!rqi) in snic_cmpl_pending_tmreq()
2391 if (rqi->dr_done) in snic_cmpl_pending_tmreq()
2392 complete(rqi->dr_done); in snic_cmpl_pending_tmreq()
2393 else if (rqi->abts_done) in snic_cmpl_pending_tmreq()
2394 complete(rqi->abts_done); in snic_cmpl_pending_tmreq()
2403 struct snic_req_info *rqi = NULL; in snic_scsi_cleanup() local
2437 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_scsi_cleanup()
2438 if (!rqi) { in snic_scsi_cleanup()
2446 sc, rqi, tag, CMD_FLAGS(sc)); in snic_scsi_cleanup()
2451 st_time = rqi->start_time; in snic_scsi_cleanup()
2455 rqi, CMD_FLAGS(sc)); in snic_scsi_cleanup()
2457 snic_release_req_buf(snic, rqi, sc); in snic_scsi_cleanup()
2463 sc, rqi, (jiffies - st_time)); in snic_scsi_cleanup()
2494 struct snic_req_info *rqi = NULL; in snic_internal_abort_io() local
2502 rqi = (struct snic_req_info *) CMD_SP(sc); in snic_internal_abort_io()
2503 if (!rqi) in snic_internal_abort_io()
2535 rqi->tm_tag = SNIC_TAG_DEV_RST; in snic_internal_abort_io()
2541 SNIC_BUG_ON(rqi->abts_done); in snic_internal_abort_io()
2544 ret = snic_queue_abort_req(snic, rqi, sc, tmf); in snic_internal_abort_io()