Lines Matching refs:completion
117 init_completion(struct completion *completion) in init_completion() argument
119 completion->done = 0; in init_completion()
123 complete(struct completion *completion) in complete() argument
125 completion->done = 1; in complete()
129 void wait_for_completion_timeout(struct completion *completion, in wait_for_completion_timeout() argument
134 while ((completion->done == 0) && count) { in wait_for_completion_timeout()
139 if (completion->done == 0) { in wait_for_completion_timeout()
141 completion->done = 1; in wait_for_completion_timeout()
144 void wait_for_completion_timeout_tm(struct completion *completion, in wait_for_completion_timeout_tm() argument
149 while ((completion->done == 0) && count) { in wait_for_completion_timeout_tm()
155 if (completion->done == 0) { in wait_for_completion_timeout_tm()
157 completion->done = 1; in wait_for_completion_timeout_tm()
496 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_delete_op_reply_queue()
501 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_delete_op_reply_queue()
518 init_completion(&sc->init_cmds.completion); in mpi3mr_delete_op_reply_queue()
525 wait_for_completion_timeout(&sc->init_cmds.completion, in mpi3mr_delete_op_reply_queue()
559 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_delete_op_reply_queue()
641 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_create_op_reply_queue()
646 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_create_op_reply_queue()
661 init_completion(&sc->init_cmds.completion); in mpi3mr_create_op_reply_queue()
670 wait_for_completion_timeout(&sc->init_cmds.completion, in mpi3mr_create_op_reply_queue()
696 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_create_op_reply_queue()
789 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_create_op_req_queue()
794 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_create_op_req_queue()
809 init_completion(&sc->init_cmds.completion); in mpi3mr_create_op_req_queue()
818 wait_for_completion_timeout(&sc->init_cmds.completion, in mpi3mr_create_op_req_queue()
844 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_create_op_req_queue()
1485 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocfacts()
1492 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocfacts()
1505 init_completion(&sc->init_cmds.completion); in mpi3mr_issue_iocfacts()
1516 wait_for_completion_timeout(&sc->init_cmds.completion, in mpi3mr_issue_iocfacts()
1541 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocfacts()
2014 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_print_fw_pkg_ver()
2017 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_print_fw_pkg_ver()
2032 init_completion(&sc->init_cmds.completion); in mpi3mr_print_fw_pkg_ver()
2037 wait_for_completion_timeout(&sc->init_cmds.completion, in mpi3mr_print_fw_pkg_ver()
2068 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_print_fw_pkg_ver()
2147 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocinit()
2152 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocinit()
2181 init_completion(&sc->init_cmds.completion); in mpi3mr_issue_iocinit()
2191 wait_for_completion_timeout(&sc->init_cmds.completion, in mpi3mr_issue_iocinit()
2215 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocinit()
2351 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_issue_event_notification()
2356 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_event_notification()
2367 init_completion(&sc->init_cmds.completion); in mpi3mr_issue_event_notification()
2400 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_event_notification()
2441 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_process_event_ack()
2446 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_process_event_ack()
2457 init_completion(&sc->init_cmds.completion); in mpi3mr_process_event_ack()
2466 wait_for_completion_timeout(&sc->init_cmds.completion, in mpi3mr_process_event_ack()
2487 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_process_event_ack()
2825 mtx_init(&sc->init_cmds.completion.lock, "Init commands lock", NULL, MTX_DEF); in mpi3mr_initialize_ioc()
2831 mtx_init(&sc->ioctl_cmds.completion.lock, "IOCTL commands lock", NULL, MTX_DEF); in mpi3mr_initialize_ioc()
2837 mtx_init(&sc->pel_abort_cmd.completion.lock, "PEL Abort command lock", NULL, MTX_DEF); in mpi3mr_initialize_ioc()
2843 mtx_init(&sc->host_tm_cmds.completion.lock, "TM commands lock", NULL, MTX_DEF); in mpi3mr_initialize_ioc()
2856 mtx_init(&sc->dev_rmhs_cmds[i].completion.lock, str, NULL, MTX_DEF); in mpi3mr_initialize_ioc()
3011 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_issue_port_enable()
3015 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_port_enable()
3027 init_completion(&sc->init_cmds.completion); in mpi3mr_issue_port_enable()
3041 wait_for_completion_timeout(&sc->init_cmds.completion, in mpi3mr_issue_port_enable()
3053 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_port_enable()
4379 complete(&cmdptr->completion); in mpi3mr_process_admin_reply_desc()
5262 if (mtx_initialized(&sc->init_cmds.completion.lock)) in mpi3mr_destory_mtx()
5263 mtx_destroy(&sc->init_cmds.completion.lock); in mpi3mr_destory_mtx()
5265 if (mtx_initialized(&sc->ioctl_cmds.completion.lock)) in mpi3mr_destory_mtx()
5266 mtx_destroy(&sc->ioctl_cmds.completion.lock); in mpi3mr_destory_mtx()
5268 if (mtx_initialized(&sc->host_tm_cmds.completion.lock)) in mpi3mr_destory_mtx()
5269 mtx_destroy(&sc->host_tm_cmds.completion.lock); in mpi3mr_destory_mtx()
5272 if (mtx_initialized(&sc->dev_rmhs_cmds[i].completion.lock)) in mpi3mr_destory_mtx()
5273 mtx_destroy(&sc->dev_rmhs_cmds[i].completion.lock); in mpi3mr_destory_mtx()
5537 complete(&cmdptr->completion); in mpi3mr_drv_cmd_comp_reset()