Lines Matching refs:icmd
2548 iscsi_cmd_t icmd;
2575 bzero(&icmd, sizeof (iscsi_cmd_t));
2576 icmd.cmd_sig = ISCSI_SIG_CMD;
2577 icmd.cmd_state = ISCSI_CMD_STATE_FREE;
2578 icmd.cmd_type = ISCSI_CMD_TYPE_RESET;
2579 icmd.cmd_lun = ilp;
2580 icmd.cmd_un.reset.level = level;
2581 icmd.cmd_result = ISCSI_STATUS_SUCCESS;
2582 icmd.cmd_completed = B_FALSE;
2583 icmd.cmd_un.reset.response = SCSI_TCP_TM_RESP_COMPLETE;
2585 mutex_init(&icmd.cmd_mutex, NULL, MUTEX_DRIVER, NULL);
2586 cv_init(&icmd.cmd_completion, NULL, CV_DRIVER, NULL);
2611 iscsi_cmd_state_machine(&icmd, ISCSI_CMD_EVENT_E1, isp);
2616 mutex_enter(&icmd.cmd_mutex);
2617 while (icmd.cmd_completed == B_FALSE) {
2618 cv_wait(&icmd.cmd_completion, &icmd.cmd_mutex);
2620 mutex_exit(&icmd.cmd_mutex);
2623 rval = icmd.cmd_result;
2653 if (icmd.cmd_lun == NULL ||
2655 (icmd.cmd_lun->lun_num !=
2663 if (icmd.cmd_sn == t_icmdp->cmd_sn) {
2679 } else if ((icmd.cmd_sn > t_icmdp->cmd_sn) ||
2680 ((t_icmdp->cmd_sn - icmd.cmd_sn) >
2711 cv_destroy(&icmd.cmd_completion);
2712 mutex_destroy(&icmd.cmd_mutex);