Searched refs:ioreq (Results 1 - 12 of 12) sorted by relevance

/linux-4.4.14/drivers/scsi/csiostor/
H A Dcsio_scsi.h156 spinlock_t freelist_lock; /* Lock for ioreq freelist */
158 struct list_head ioreq_freelist; /* Free list of ioreq's */
207 csio_put_scsi_ioreq(struct csio_scsim *scm, struct csio_ioreq *ioreq) csio_put_scsi_ioreq() argument
209 list_add_tail(&ioreq->sm.sm_list, &scm->ioreq_freelist); csio_put_scsi_ioreq()
252 csio_scsi_completed(struct csio_ioreq *ioreq, struct list_head *cbfn_q) csio_scsi_completed() argument
254 csio_post_event(&ioreq->sm, CSIO_SCSIE_COMPLETED); csio_scsi_completed()
255 if (csio_list_deleted(&ioreq->sm.sm_list)) csio_scsi_completed()
256 list_add_tail(&ioreq->sm.sm_list, cbfn_q); csio_scsi_completed()
260 csio_scsi_aborted(struct csio_ioreq *ioreq, struct list_head *cbfn_q) csio_scsi_aborted() argument
262 csio_post_event(&ioreq->sm, CSIO_SCSIE_ABORTED); csio_scsi_aborted()
263 list_add_tail(&ioreq->sm.sm_list, cbfn_q); csio_scsi_aborted()
267 csio_scsi_closed(struct csio_ioreq *ioreq, struct list_head *cbfn_q) csio_scsi_closed() argument
269 csio_post_event(&ioreq->sm, CSIO_SCSIE_CLOSED); csio_scsi_closed()
270 list_add_tail(&ioreq->sm.sm_list, cbfn_q); csio_scsi_closed()
274 csio_scsi_drvcleanup(struct csio_ioreq *ioreq) csio_scsi_drvcleanup() argument
276 csio_post_event(&ioreq->sm, CSIO_SCSIE_DRVCLEANUP); csio_scsi_drvcleanup()
286 csio_scsi_start_io(struct csio_ioreq *ioreq) csio_scsi_start_io() argument
288 csio_post_event(&ioreq->sm, CSIO_SCSIE_START_IO); csio_scsi_start_io()
289 return ioreq->drv_status; csio_scsi_start_io()
299 csio_scsi_start_tm(struct csio_ioreq *ioreq) csio_scsi_start_tm() argument
301 csio_post_event(&ioreq->sm, CSIO_SCSIE_START_TM); csio_scsi_start_tm()
302 return ioreq->drv_status; csio_scsi_start_tm()
312 csio_scsi_abort(struct csio_ioreq *ioreq) csio_scsi_abort() argument
314 csio_post_event(&ioreq->sm, CSIO_SCSIE_ABORT); csio_scsi_abort()
315 return ioreq->drv_status; csio_scsi_abort()
325 csio_scsi_close(struct csio_ioreq *ioreq) csio_scsi_close() argument
327 csio_post_event(&ioreq->sm, CSIO_SCSIE_CLOSE); csio_scsi_close()
328 return ioreq->drv_status; csio_scsi_close()
H A Dcsio_scsi.c76 * csio_scsi_match_io - Match an ioreq with the given SCSI level data.
77 * @ioreq: The I/O request
84 csio_scsi_match_io(struct csio_ioreq *ioreq, struct csio_scsi_level_data *sld) csio_scsi_match_io() argument
86 struct scsi_cmnd *scmnd = csio_scsi_cmnd(ioreq); csio_scsi_match_io()
93 return ((ioreq->lnode == sld->lnode) && csio_scsi_match_io()
94 (ioreq->rnode == sld->rnode) && csio_scsi_match_io()
98 return ((ioreq->lnode == sld->lnode) && csio_scsi_match_io()
99 (ioreq->rnode == sld->rnode)); csio_scsi_match_io()
101 return (ioreq->lnode == sld->lnode); csio_scsi_match_io()
669 /* Since we re-use the same ioreq for abort as well */ csio_scsi_init_abrt_cls_wr()
896 "ioreq %p recvd cmpltd (wr_status:%d) " csio_scsis_aborting()
972 * and left this ioreq in this state. For now, just ignore csio_scsis_aborting()
993 "ioreq %p recvd cmpltd (wr_status:%d) " csio_scsis_closing()
1094 * It then gets the status, WR handle (ioreq pointer) and the len of
1096 * WR copied into the WR cache (ioreq->fw_wr).
1097 * The ioreq corresponding to the WR is returned to the caller.
1105 struct csio_ioreq *ioreq = NULL; csio_scsi_cmpl_handler() local
1128 ioreq = (struct csio_ioreq *)((uintptr_t) csio_scsi_cmpl_handler()
1130 CSIO_DB_ASSERT(virt_addr_valid(ioreq)); csio_scsi_cmpl_handler()
1132 ioreq->wr_status = status; csio_scsi_cmpl_handler()
1134 return ioreq; csio_scsi_cmpl_handler()
1138 ioreq = (struct csio_ioreq *)((uintptr_t) csio_scsi_cmpl_handler()
1140 CSIO_DB_ASSERT(virt_addr_valid(ioreq)); csio_scsi_cmpl_handler()
1142 ioreq->wr_status = status; csio_scsi_cmpl_handler()
1143 return ioreq; csio_scsi_cmpl_handler()
1162 struct csio_ioreq *ioreq; csio_scsi_cleanup_io_q() local
1168 ioreq = (struct csio_ioreq *)tmp; list_for_each_safe()
1169 csio_scsi_drvcleanup(ioreq); list_for_each_safe()
1170 list_del_init(&ioreq->sm.sm_list); list_for_each_safe()
1171 scmnd = csio_scsi_cmnd(ioreq); list_for_each_safe()
1179 ioreq->io_cbfn(hw, ioreq); list_for_each_safe()
1182 csio_put_scsi_ioreq(scm, ioreq); list_for_each_safe()
1192 csio_abrt_cls(struct csio_ioreq *ioreq, struct scsi_cmnd *scmnd) csio_abrt_cls() argument
1194 struct csio_lnode *ln = ioreq->lnode; csio_abrt_cls()
1200 if (csio_scsi_cmnd(ioreq) != scmnd) { csio_abrt_cls()
1207 rv = csio_do_abrt_cls(hw, ioreq, (ready ? SCSI_ABORT : SCSI_CLOSE)); csio_abrt_cls()
1530 csio_err(hw, "failed to kmap sg:%p of ioreq:%p\n", csio_scsi_copy_to_sgl()
1764 * - Gets a free ioreq structure (which is already initialized
1767 * - Initializes ioreq members.
1778 struct csio_ioreq *ioreq = NULL; csio_queuecommand() local
1823 /* Get a free ioreq structure - SM is already set to uninit */ csio_queuecommand()
1824 ioreq = csio_get_scsi_ioreq_lock(hw, scsim); csio_queuecommand()
1825 if (!ioreq) { csio_queuecommand()
1832 ioreq->nsge = nsge; csio_queuecommand()
1833 ioreq->lnode = ln; csio_queuecommand()
1834 ioreq->rnode = rn; csio_queuecommand()
1835 ioreq->iq_idx = sqset->iq_idx; csio_queuecommand()
1836 ioreq->eq_idx = sqset->eq_idx; csio_queuecommand()
1837 ioreq->wr_status = 0; csio_queuecommand()
1838 ioreq->drv_status = 0; csio_queuecommand()
1839 csio_scsi_cmnd(ioreq) = (void *)cmnd; csio_queuecommand()
1840 ioreq->tmo = 0; csio_queuecommand()
1841 ioreq->datadir = cmnd->sc_data_direction; csio_queuecommand()
1853 ioreq->io_cbfn = csio_scsi_cbfn; csio_queuecommand()
1856 cmnd->host_scribble = (unsigned char *)ioreq; csio_queuecommand()
1859 /* Kick off SCSI IO SM on the ioreq */ csio_queuecommand()
1861 retval = csio_scsi_start_io(ioreq); csio_queuecommand()
1865 csio_err(hw, "ioreq: %p couldnt be started, status:%d\n", csio_queuecommand()
1866 ioreq, retval); csio_queuecommand()
1874 csio_put_scsi_ioreq_lock(hw, scsim, ioreq); csio_queuecommand()
1887 csio_do_abrt_cls(struct csio_hw *hw, struct csio_ioreq *ioreq, bool abort) csio_do_abrt_cls() argument
1891 struct csio_lnode *ln = ioreq->lnode; csio_do_abrt_cls()
1894 ioreq->tmo = CSIO_SCSI_ABRT_TMO_MS; csio_do_abrt_cls()
1901 ioreq->eq_idx = sqset->eq_idx; csio_do_abrt_cls()
1904 rv = csio_scsi_abort(ioreq); csio_do_abrt_cls()
1906 rv = csio_scsi_close(ioreq); csio_do_abrt_cls()
1914 struct csio_ioreq *ioreq; csio_eh_abort_handler() local
1927 ioreq = (struct csio_ioreq *)cmnd->host_scribble; csio_eh_abort_handler()
1928 if (!ioreq) csio_eh_abort_handler()
1935 "Request to abort ioreq:%p cmd:%p cdb:%08llx" csio_eh_abort_handler()
1937 ioreq, cmnd, *((uint64_t *)cmnd->cmnd), rn->flowid, csio_eh_abort_handler()
1938 cmnd->device->lun, csio_q_physiqid(hw, ioreq->iq_idx)); csio_eh_abort_handler()
1940 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) != cmnd) { csio_eh_abort_handler()
1949 rv = csio_do_abrt_cls(hw, ioreq, (ready ? SCSI_ABORT : SCSI_CLOSE)); csio_eh_abort_handler()
1968 init_completion(&ioreq->cmplobj); csio_eh_abort_handler()
1969 wait_for_completion_timeout(&ioreq->cmplobj, msecs_to_jiffies(tmo)); csio_eh_abort_handler()
1972 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) { csio_eh_abort_handler()
1974 csio_err(hw, "Abort timed out -- req: %p\n", ioreq); csio_eh_abort_handler()
1978 if (ioreq->nsge > 0) csio_eh_abort_handler()
1982 csio_scsi_cmnd(ioreq) = NULL; csio_eh_abort_handler()
2012 * Cache the result in 'cmnd', since ioreq will be freed soon
2014 * the ioreq contents.
2068 struct csio_ioreq *ioreq = NULL; csio_eh_lun_reset_handler() local
2110 /* Get a free ioreq structure - SM is already set to uninit */ csio_eh_lun_reset_handler()
2111 ioreq = csio_get_scsi_ioreq_lock(hw, scsim); csio_eh_lun_reset_handler()
2113 if (!ioreq) { csio_eh_lun_reset_handler()
2120 ioreq->nsge = 0; csio_eh_lun_reset_handler()
2121 ioreq->lnode = ln; csio_eh_lun_reset_handler()
2122 ioreq->rnode = rn; csio_eh_lun_reset_handler()
2123 ioreq->iq_idx = sqset->iq_idx; csio_eh_lun_reset_handler()
2124 ioreq->eq_idx = sqset->eq_idx; csio_eh_lun_reset_handler()
2126 csio_scsi_cmnd(ioreq) = cmnd; csio_eh_lun_reset_handler()
2127 cmnd->host_scribble = (unsigned char *)ioreq; csio_eh_lun_reset_handler()
2131 ioreq->tmo = CSIO_SCSI_LUNRST_TMO_MS / 1000; csio_eh_lun_reset_handler()
2134 * FW times the LUN reset for ioreq->tmo, so we got to wait a little csio_eh_lun_reset_handler()
2138 count = DIV_ROUND_UP((ioreq->tmo + 10) * 1000, CSIO_SCSI_TM_POLL_MS); csio_eh_lun_reset_handler()
2141 ioreq->io_cbfn = csio_tm_cbfn; csio_eh_lun_reset_handler()
2143 /* Save of the ioreq info for later use */ csio_eh_lun_reset_handler()
2145 sld.lnode = ioreq->lnode; csio_eh_lun_reset_handler()
2146 sld.rnode = ioreq->rnode; csio_eh_lun_reset_handler()
2150 /* Kick off TM SM on the ioreq */ csio_eh_lun_reset_handler()
2151 retval = csio_scsi_start_tm(ioreq); csio_eh_lun_reset_handler()
2156 ioreq, retval); csio_eh_lun_reset_handler()
2163 while ((((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) csio_eh_lun_reset_handler()
2168 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) { csio_eh_lun_reset_handler()
2173 csio_scsi_drvcleanup(ioreq); csio_eh_lun_reset_handler()
2174 list_del_init(&ioreq->sm.sm_list); csio_eh_lun_reset_handler()
2219 csio_put_scsi_ioreq_lock(hw, scsim, ioreq); csio_eh_lun_reset_handler()
2419 struct csio_ioreq *ioreq; csio_scsim_init() local
2435 ioreq = kzalloc(sizeof(struct csio_ioreq), GFP_KERNEL); csio_scsim_init()
2436 if (!ioreq) { csio_scsim_init()
2446 dma_buf = &ioreq->dma_buf; csio_scsim_init()
2453 kfree(ioreq); csio_scsim_init()
2460 csio_init_state(&ioreq->sm, csio_scsis_uninit); csio_scsim_init()
2461 INIT_LIST_HEAD(&ioreq->gen_list); csio_scsim_init()
2462 init_completion(&ioreq->cmplobj); csio_scsim_init()
2464 list_add_tail(&ioreq->sm.sm_list, &scm->ioreq_freelist); csio_scsim_init()
2484 ioreq = (struct csio_ioreq *)tmp; csio_scsim_init()
2486 dma_buf = &ioreq->dma_buf; csio_scsim_init()
2490 kfree(ioreq); csio_scsim_init()
2506 struct csio_ioreq *ioreq; csio_scsim_exit() local
2515 ioreq = (struct csio_ioreq *)tmp; csio_scsim_exit()
2517 dma_buf = &ioreq->dma_buf; csio_scsim_exit()
2521 kfree(ioreq); csio_scsim_exit()
H A Dcsio_isr.c149 struct csio_ioreq *ioreq; csio_process_scsi_cmpl() local
155 ioreq = csio_scsi_cmpl_handler(hw, wr, len, flb, NULL, &scsiwr); csio_process_scsi_cmpl()
156 if (likely(ioreq)) { csio_process_scsi_cmpl()
162 csio_dbg(hw, "%s cmpl recvd ioreq:%p status:%d\n", csio_process_scsi_cmpl()
164 ioreq, ioreq->wr_status); csio_process_scsi_cmpl()
168 csio_scsi_closed(ioreq, csio_process_scsi_cmpl()
171 csio_scsi_aborted(ioreq, csio_process_scsi_cmpl()
184 cmnd = csio_scsi_cmnd(ioreq); csio_process_scsi_cmpl()
186 list_del_init(&ioreq->sm.sm_list); csio_process_scsi_cmpl()
192 csio_hw_to_scsim(hw), ioreq); csio_process_scsi_cmpl()
195 csio_scsi_completed(ioreq, (struct list_head *)cbfn_q); csio_process_scsi_cmpl()
218 struct csio_ioreq *ioreq; csio_scsi_isr_handler() local
229 ioreq = (struct csio_ioreq *)tmp; csio_scsi_isr_handler()
231 ioreq->io_cbfn(hw, ioreq); csio_scsi_isr_handler()
233 if (unlikely(ioreq->dcopy)) csio_scsi_isr_handler()
234 csio_put_scsi_ddp_list_lock(hw, scm, &ioreq->gen_list, csio_scsi_isr_handler()
235 ioreq->nsge); csio_scsi_isr_handler()
239 /* Return the ioreqs back to ioreq->freelist */ csio_scsi_isr_handler()
H A Dcsio_init.h92 struct csio_ioreq *ioreq; csio_get_scsi_ioreq_lock() local
96 ioreq = csio_get_scsi_ioreq(scsim); csio_get_scsi_ioreq_lock()
99 return ioreq; csio_get_scsi_ioreq_lock()
104 struct csio_ioreq *ioreq) csio_put_scsi_ioreq_lock()
109 csio_put_scsi_ioreq(scsim, ioreq); csio_put_scsi_ioreq_lock()
103 csio_put_scsi_ioreq_lock(struct csio_hw *hw, struct csio_scsim *scsim, struct csio_ioreq *ioreq) csio_put_scsi_ioreq_lock() argument
H A Dcsio_wr.h259 * this ioreq.
267 struct completion cmplobj; /* ioreq completion object */
H A Dcsio_lnode.c1434 /* lookup ioreq exists in our active Q */ csio_ln_mgmt_wr_handler()
1823 csio_ln_err(ln, "Failed to alloc ioreq for FDMI\n"); csio_ln_fdmi_init()
H A Dcsio_hw.c3626 /* Lookup ioreq in the ACTIVEQ */ csio_mgmt_req_lookup()
/linux-4.4.14/drivers/net/wireless/zd1211rw/
H A Dzd_chip.h835 struct zd_ioreq16 ioreq; zd_iowrite16_locked() local
838 ioreq.addr = addr; zd_iowrite16_locked()
839 ioreq.value = value; zd_iowrite16_locked()
841 return zd_usb_iowrite16v(&chip->usb, &ioreq, 1); zd_iowrite16_locked()
853 struct zd_ioreq32 ioreq; zd_iowrite32_locked() local
855 ioreq.addr = addr; zd_iowrite32_locked()
856 ioreq.value = value; zd_iowrite32_locked()
858 return _zd_iowrite32v_locked(chip, &ioreq, 1); zd_iowrite32_locked()
/linux-4.4.14/drivers/staging/rtl8712/
H A Drtl871x_io.h245 /*ioreq */
/linux-4.4.14/drivers/scsi/snic/
H A Dsnic_io.c318 "Req_free:rqi %p:ioreq %p:abt %p:dr %p\n", snic_req_free()
H A Dsnic_scsi.c143 "Rel_req:sc %p:tag %x:rqi %p:ioreq %p:abt %p:dr %p: state %s:flags 0x%llx\n", snic_release_req_buf()
/linux-4.4.14/drivers/scsi/fnic/
H A Dfnic_scsi.c1757 * The ioreq is linked to the SCSI Cmd, thus a link with the ULP's IO.
2326 * issue the device reset, if enqueue failed, clean up the ioreq fnic_device_reset()

Completed in 507 milliseconds