Lines Matching refs:init_cmds

496 	mtx_lock(&sc->init_cmds.completion.lock);  in mpi3mr_delete_op_reply_queue()
497 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_delete_op_reply_queue()
501 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_delete_op_reply_queue()
505 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_delete_op_reply_queue()
511 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_delete_op_reply_queue()
512 sc->init_cmds.is_waiting = 1; in mpi3mr_delete_op_reply_queue()
513 sc->init_cmds.callback = NULL; 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()
527 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_delete_op_reply_queue()
537 if ((sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK) in mpi3mr_delete_op_reply_queue()
541 (sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK), in mpi3mr_delete_op_reply_queue()
542 sc->init_cmds.ioc_loginfo); in mpi3mr_delete_op_reply_queue()
558 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; 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()
642 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_create_op_reply_queue()
646 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_create_op_reply_queue()
650 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_create_op_reply_queue()
651 sc->init_cmds.is_waiting = 1; in mpi3mr_create_op_reply_queue()
652 sc->init_cmds.callback = NULL; 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()
672 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_create_op_reply_queue()
682 if ((sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK) in mpi3mr_create_op_reply_queue()
686 (sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK), in mpi3mr_create_op_reply_queue()
687 sc->init_cmds.ioc_loginfo); in mpi3mr_create_op_reply_queue()
695 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; 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()
790 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_create_op_req_queue()
794 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_create_op_req_queue()
798 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_create_op_req_queue()
799 sc->init_cmds.is_waiting = 1; in mpi3mr_create_op_req_queue()
800 sc->init_cmds.callback = NULL; 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()
821 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_create_op_req_queue()
831 if ((sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK) in mpi3mr_create_op_req_queue()
835 (sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK), in mpi3mr_create_op_req_queue()
836 sc->init_cmds.ioc_loginfo); in mpi3mr_create_op_req_queue()
843 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; 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()
1488 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_issue_iocfacts()
1492 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocfacts()
1496 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_issue_iocfacts()
1497 sc->init_cmds.is_waiting = 1; in mpi3mr_issue_iocfacts()
1498 sc->init_cmds.callback = NULL; 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()
1518 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_issue_iocfacts()
1528 if ((sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK) in mpi3mr_issue_iocfacts()
1532 (sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK), in mpi3mr_issue_iocfacts()
1533 sc->init_cmds.ioc_loginfo); in mpi3mr_issue_iocfacts()
1540 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; in mpi3mr_issue_iocfacts()
1541 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocfacts()
1881 if (sc->init_cmds.reply) in mpi3mr_reply_alloc()
1884 sc->init_cmds.reply = malloc(sc->reply_sz, in mpi3mr_reply_alloc()
1887 if (!sc->init_cmds.reply) { in mpi3mr_reply_alloc()
2014 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_print_fw_pkg_ver()
2015 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_print_fw_pkg_ver()
2017 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_print_fw_pkg_ver()
2020 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_print_fw_pkg_ver()
2021 sc->init_cmds.is_waiting = 1; in mpi3mr_print_fw_pkg_ver()
2022 sc->init_cmds.callback = NULL; 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()
2039 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_print_fw_pkg_ver()
2041 sc->init_cmds.is_waiting = 0; in mpi3mr_print_fw_pkg_ver()
2042 if (!(sc->init_cmds.state & MPI3MR_CMD_RESET)) in mpi3mr_print_fw_pkg_ver()
2047 if ((GET_IOC_STATUS(sc->init_cmds.ioc_status)) != MPI3_IOCSTATUS_SUCCESS) { in mpi3mr_print_fw_pkg_ver()
2050 GET_IOC_STATUS(sc->init_cmds.ioc_status), sc->init_cmds.ioc_loginfo); in mpi3mr_print_fw_pkg_ver()
2067 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; 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()
2148 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_issue_iocinit()
2152 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_iocinit()
2155 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_issue_iocinit()
2156 sc->init_cmds.is_waiting = 1; in mpi3mr_issue_iocinit()
2157 sc->init_cmds.callback = NULL; 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()
2193 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_issue_iocinit()
2203 if ((sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK) in mpi3mr_issue_iocinit()
2207 (sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK), in mpi3mr_issue_iocinit()
2208 sc->init_cmds.ioc_loginfo); in mpi3mr_issue_iocinit()
2214 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; 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()
2352 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_issue_event_notification()
2356 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_event_notification()
2359 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_issue_event_notification()
2360 sc->init_cmds.is_waiting = 1; in mpi3mr_issue_event_notification()
2361 sc->init_cmds.callback = NULL; in mpi3mr_issue_event_notification()
2367 init_completion(&sc->init_cmds.completion); in mpi3mr_issue_event_notification()
2377 &sc->init_cmds, in mpi3mr_issue_event_notification()
2379 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_issue_event_notification()
2388 if ((sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK) in mpi3mr_issue_event_notification()
2392 (sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK), in mpi3mr_issue_event_notification()
2393 sc->init_cmds.ioc_loginfo); in mpi3mr_issue_event_notification()
2399 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; 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()
2442 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_process_event_ack()
2446 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_process_event_ack()
2449 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_process_event_ack()
2450 sc->init_cmds.is_waiting = 1; in mpi3mr_process_event_ack()
2451 sc->init_cmds.callback = NULL; 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()
2468 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_process_event_ack()
2475 if ((sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK) in mpi3mr_process_event_ack()
2479 (sc->init_cmds.ioc_status & MPI3_IOCSTATUS_STATUS_MASK), in mpi3mr_process_event_ack()
2480 sc->init_cmds.ioc_loginfo); in mpi3mr_process_event_ack()
2486 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; 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()
2826 sc->init_cmds.reply = NULL; in mpi3mr_initialize_ioc()
2827 sc->init_cmds.state = MPI3MR_CMD_NOTUSED; in mpi3mr_initialize_ioc()
2828 sc->init_cmds.dev_handle = MPI3MR_INVALID_DEV_HANDLE; in mpi3mr_initialize_ioc()
2829 sc->init_cmds.host_tag = MPI3MR_HOSTTAG_INITCMDS; in mpi3mr_initialize_ioc()
3011 mtx_lock(&sc->init_cmds.completion.lock); in mpi3mr_issue_port_enable()
3012 if (sc->init_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_issue_port_enable()
3015 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_port_enable()
3019 sc->init_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_issue_port_enable()
3022 sc->init_cmds.is_waiting = 0; in mpi3mr_issue_port_enable()
3023 sc->init_cmds.callback = mpi3mr_port_enable_complete; in mpi3mr_issue_port_enable()
3025 sc->init_cmds.is_waiting = 1; in mpi3mr_issue_port_enable()
3026 sc->init_cmds.callback = NULL; 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()
3043 if (!(sc->init_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_issue_port_enable()
3050 mpi3mr_port_enable_complete(sc, &sc->init_cmds); in mpi3mr_issue_port_enable()
3053 mtx_unlock(&sc->init_cmds.completion.lock); in mpi3mr_issue_port_enable()
4327 cmdptr = &sc->init_cmds; 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()
5438 if (sc->init_cmds.reply) { in mpi3mr_free_mem()
5439 free(sc->init_cmds.reply, M_MPI3MR); in mpi3mr_free_mem()
5440 sc->init_cmds.reply = NULL; in mpi3mr_free_mem()
5557 cmdptr = &sc->init_cmds; in mpi3mr_flush_drv_cmds()
5602 memset(sc->init_cmds.reply, 0, sc->reply_sz); in mpi3mr_memset_buffers()