Lines Matching refs:state

109  * The only allowed channel state changes are those that change the channel
110 * state into a state with a higher numerical value. Hence the new > prev test.
119 prev = ch->state;
121 ch->state = new;
223 pr_debug("QP event %d on ch=%p sess_name=%s-%d state=%s\n",
225 get_ch_state_name(ch->state));
235 pr_debug("%s-%d, state %s: received Last WQE event.\n",
237 get_ch_state_name(ch->state));
778 * srpt_set_cmd_state - set the state of a SCSI command
780 * @new: New I/O context state.
782 * Does not modify the state of aborted commands. Returns the previous command
783 * state.
790 previous = ioctx->state;
792 ioctx->state = new;
798 * srpt_test_and_set_cmd_state - test and set the state of a command
800 * @old: Current I/O context state.
801 * @new: New I/O context state.
803 * Returns true if and only if the previous command state was equal to 'old'.
815 previous = ioctx->state;
817 ioctx->state = new;
1115 * remote read and remote write. Also transitions 'qp' to state IB_QPS_INIT.
1147 * srpt_ch_qp_rtr - change the state of a channel to 'ready to receive' (RTR)
1149 * @qp: queue pair to change the state of.
1179 * srpt_ch_qp_rts - change the state of a channel to 'ready to send' (RTS)
1181 * @qp: queue pair to change the state of.
1209 * srpt_ch_qp_err - set the channel queue pair state to 'error'
1237 ioctx->state = SRPT_STATE_NEW;
1260 enum srpt_command_state state;
1265 * If the command is in a state where the target core is waiting for
1266 * the ib_srpt driver, change the state to the next state.
1269 state = ioctx->state;
1270 switch (state) {
1272 ioctx->state = SRPT_STATE_DATA_IN;
1276 ioctx->state = SRPT_STATE_DONE;
1279 WARN_ONCE(true, "%s: unexpected I/O context state %d\n",
1280 __func__, state);
1284 pr_debug("Aborting cmd with state %d -> %d and tag %lld\n", state,
1285 ioctx->state, ioctx->cmd.tag);
1287 switch (state) {
1313 WARN(1, "Unexpected command state (%d)", state);
1317 return state;
1351 pr_err("%s[%d]: wrong state = %d\n", __func__,
1352 __LINE__, ioctx->state);
1635 if (unlikely(ch->state == CH_CONNECTING))
1724 WARN_ON_ONCE(ch->state == CH_CONNECTING);
1761 enum srpt_command_state state;
1763 state = srpt_set_cmd_state(ioctx, SRPT_STATE_DONE);
1765 WARN_ON(state != SRPT_STATE_CMD_RSP_SENT &&
1766 state != SRPT_STATE_MGMT_RSP_SENT);
1774 if (state != SRPT_STATE_DONE) {
1900 * Returns true if and only if the channel state has been modified into
1916 pr_err("%s-%d: changing queue pair into error state failed: %d\n",
1935 * Change the channel state into CH_DISCONNECTING. If a channel has not yet
1936 * reached the connected state, close it. If a channel is in the connected
1937 * state, send a DREQ. If a DREQ has been received, send a DREP. Note: it is
1970 pr_debug("ch %s-%d state %d\n", ch->sess_name, ch->qp->qp_num,
1971 ch->state);
1980 pr_info("%s(%s-%d state %d): still waiting ...\n", __func__,
1981 ch->sess_name, ch->qp->qp_num, ch->state);
2076 * state and remove the channel from the channel list. This function is
2244 ch->state = CH_CONNECTING;
2448 if (sport->enabled && ch->state == CH_CONNECTING) {
2620 * Note: calling srpt_close_ch() if the transition to the LIVE state
2625 pr_err("%s-%d: channel transition to LIVE state failed\n",
2718 if (ch->state < CH_DISCONNECTING)
2820 enum srpt_command_state state;
2824 state = ioctx->state;
2825 switch (state) {
2828 ioctx->state = SRPT_STATE_CMD_RSP_SENT;
2831 ioctx->state = SRPT_STATE_MGMT_RSP_SENT;
2834 WARN(true, "ch %p; cmd %d: unexpected command state %d\n",
2835 ch, ioctx->ioctx.index, ioctx->state);
2839 if (WARN_ON_ONCE(state == SRPT_STATE_CMD_RSP_SENT))
2854 if (state != SRPT_STATE_MGMT)
2977 pr_info("%s-%d: state %s\n",
2979 get_ch_state_name(ch->state));
3205 pr_err("ib_cm_listen() failed: %d (cm_id state = %d)\n", ret,
3206 sdev->cm_id->state);
3346 WARN_ON_ONCE(ioctx->state != SRPT_STATE_DONE &&
3384 return ioctx->state;