Lines Matching refs:cmd_mgr
290 struct qedf_cmd_mgr *cmd_mgr = qedf->cmd_mgr; in qedf_alloc_cmd() local
317 if (atomic_read(&cmd_mgr->free_list_cnt) <= GBL_RSVD_TASKS) { in qedf_alloc_cmd()
320 atomic_read(&cmd_mgr->free_list_cnt)); in qedf_alloc_cmd()
324 spin_lock_irqsave(&cmd_mgr->lock, flags); in qedf_alloc_cmd()
326 io_req = &cmd_mgr->cmds[cmd_mgr->idx]; in qedf_alloc_cmd()
327 cmd_mgr->idx++; in qedf_alloc_cmd()
328 if (cmd_mgr->idx == FCOE_PARAMS_NUM_TASKS) in qedf_alloc_cmd()
329 cmd_mgr->idx = 0; in qedf_alloc_cmd()
337 spin_unlock_irqrestore(&cmd_mgr->lock, flags); in qedf_alloc_cmd()
342 spin_unlock_irqrestore(&cmd_mgr->lock, flags); in qedf_alloc_cmd()
347 atomic_dec(&cmd_mgr->free_list_cnt); in qedf_alloc_cmd()
349 io_req->cmd_mgr = cmd_mgr; in qedf_alloc_cmd()
357 bd_tbl = io_req->bd_tbl = cmd_mgr->io_bdt_pool[xid]; in qedf_alloc_cmd()
413 struct qedf_cmd_mgr *cmd_mgr = io_req->cmd_mgr; in qedf_release_cmd() local
420 atomic_inc(&cmd_mgr->free_list_cnt); in qedf_release_cmd()
1445 struct qedf_cmd_mgr *cmd_mgr; in qedf_flush_active_ios() local
1458 cmd_mgr = qedf->cmd_mgr; in qedf_flush_active_ios()
1463 io_req = &cmd_mgr->cmds[i]; in qedf_flush_active_ios()