Lines Matching refs:io_req
168 struct bnx2fc_cmd *io_req; in bnx2fc_flush_active_ios() local
178 list_for_each_entry_safe(io_req, tmp, &tgt->active_cmd_queue, link) { in bnx2fc_flush_active_ios()
180 list_del_init(&io_req->link); in bnx2fc_flush_active_ios()
181 io_req->on_active_queue = 0; in bnx2fc_flush_active_ios()
182 BNX2FC_IO_DBG(io_req, "cmd_queue cleanup\n"); in bnx2fc_flush_active_ios()
184 if (cancel_delayed_work(&io_req->timeout_work)) { in bnx2fc_flush_active_ios()
186 &io_req->req_flags)) { in bnx2fc_flush_active_ios()
188 BNX2FC_IO_DBG(io_req, "eh_abort for IO " in bnx2fc_flush_active_ios()
190 complete(&io_req->abts_done); in bnx2fc_flush_active_ios()
192 kref_put(&io_req->refcount, in bnx2fc_flush_active_ios()
196 set_bit(BNX2FC_FLAG_IO_COMPL, &io_req->req_flags); in bnx2fc_flush_active_ios()
197 set_bit(BNX2FC_FLAG_IO_CLEANUP, &io_req->req_flags); in bnx2fc_flush_active_ios()
201 bnx2fc_process_cleanup_compl(io_req, io_req->task, 0); in bnx2fc_flush_active_ios()
203 rc = bnx2fc_initiate_cleanup(io_req); in bnx2fc_flush_active_ios()
208 list_for_each_entry_safe(io_req, tmp, &tgt->active_tm_queue, link) { in bnx2fc_flush_active_ios()
210 list_del_init(&io_req->link); in bnx2fc_flush_active_ios()
211 io_req->on_tmf_queue = 0; in bnx2fc_flush_active_ios()
212 BNX2FC_IO_DBG(io_req, "tm_queue cleanup\n"); in bnx2fc_flush_active_ios()
213 if (io_req->wait_for_abts_comp) in bnx2fc_flush_active_ios()
214 complete(&io_req->abts_done); in bnx2fc_flush_active_ios()
217 list_for_each_entry_safe(io_req, tmp, &tgt->els_queue, link) { in bnx2fc_flush_active_ios()
219 list_del_init(&io_req->link); in bnx2fc_flush_active_ios()
220 io_req->on_active_queue = 0; in bnx2fc_flush_active_ios()
222 BNX2FC_IO_DBG(io_req, "els_queue cleanup\n"); in bnx2fc_flush_active_ios()
224 if (cancel_delayed_work(&io_req->timeout_work)) in bnx2fc_flush_active_ios()
225 kref_put(&io_req->refcount, in bnx2fc_flush_active_ios()
228 if ((io_req->cb_func) && (io_req->cb_arg)) { in bnx2fc_flush_active_ios()
229 io_req->cb_func(io_req->cb_arg); in bnx2fc_flush_active_ios()
230 io_req->cb_arg = NULL; in bnx2fc_flush_active_ios()
235 bnx2fc_process_cleanup_compl(io_req, io_req->task, 0); in bnx2fc_flush_active_ios()
237 rc = bnx2fc_initiate_cleanup(io_req); in bnx2fc_flush_active_ios()
242 list_for_each_entry_safe(io_req, tmp, &tgt->io_retire_queue, link) { in bnx2fc_flush_active_ios()
244 list_del_init(&io_req->link); in bnx2fc_flush_active_ios()
246 BNX2FC_IO_DBG(io_req, "retire_queue flush\n"); in bnx2fc_flush_active_ios()
248 if (cancel_delayed_work(&io_req->timeout_work)) { in bnx2fc_flush_active_ios()
250 &io_req->req_flags)) { in bnx2fc_flush_active_ios()
252 BNX2FC_IO_DBG(io_req, "eh_abort for IO " in bnx2fc_flush_active_ios()
254 if (io_req->wait_for_abts_comp) in bnx2fc_flush_active_ios()
255 complete(&io_req->abts_done); in bnx2fc_flush_active_ios()
257 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_flush_active_ios()
260 clear_bit(BNX2FC_FLAG_ISSUE_RRQ, &io_req->req_flags); in bnx2fc_flush_active_ios()