Lines Matching refs:state

105  * The only allowed channel state changes are those that change the channel
106 * state into a state with a higher numerical value. Hence the new > prev test.
115 prev = ch->state;
117 ch->state = new;
217 pr_debug("QP event %d on ch=%p sess_name=%s-%d state=%s\n",
219 get_ch_state_name(ch->state));
229 pr_debug("%s-%d, state %s: received Last WQE event.\n",
231 get_ch_state_name(ch->state));
772 * srpt_set_cmd_state - set the state of a SCSI command
774 * @new: New I/O context state.
776 * Does not modify the state of aborted commands. Returns the previous command
777 * state.
784 previous = ioctx->state;
786 ioctx->state = new;
792 * srpt_test_and_set_cmd_state - test and set the state of a command
794 * @old: Current I/O context state.
795 * @new: New I/O context state.
797 * Returns true if and only if the previous command state was equal to 'old'.
809 previous = ioctx->state;
811 ioctx->state = new;
1109 * remote read and remote write. Also transitions 'qp' to state IB_QPS_INIT.
1141 * srpt_ch_qp_rtr - change the state of a channel to 'ready to receive' (RTR)
1143 * @qp: queue pair to change the state of.
1173 * srpt_ch_qp_rts - change the state of a channel to 'ready to send' (RTS)
1175 * @qp: queue pair to change the state of.
1203 * srpt_ch_qp_err - set the channel queue pair state to 'error'
1231 ioctx->state = SRPT_STATE_NEW;
1254 enum srpt_command_state state;
1259 * If the command is in a state where the target core is waiting for
1260 * the ib_srpt driver, change the state to the next state.
1263 state = ioctx->state;
1264 switch (state) {
1266 ioctx->state = SRPT_STATE_DATA_IN;
1270 ioctx->state = SRPT_STATE_DONE;
1273 WARN_ONCE(true, "%s: unexpected I/O context state %d\n",
1274 __func__, state);
1278 pr_debug("Aborting cmd with state %d -> %d and tag %lld\n", state,
1279 ioctx->state, ioctx->cmd.tag);
1281 switch (state) {
1307 WARN(1, "Unexpected command state (%d)", state);
1311 return state;
1345 pr_err("%s[%d]: wrong state = %d\n", __func__,
1346 __LINE__, ioctx->state);
1625 if (unlikely(ch->state == CH_CONNECTING))
1714 WARN_ON_ONCE(ch->state == CH_CONNECTING);
1751 enum srpt_command_state state;
1753 state = srpt_set_cmd_state(ioctx, SRPT_STATE_DONE);
1755 WARN_ON(state != SRPT_STATE_CMD_RSP_SENT &&
1756 state != SRPT_STATE_MGMT_RSP_SENT);
1764 if (state != SRPT_STATE_DONE) {
1891 * Returns true if and only if the channel state has been modified into
1907 pr_err("%s-%d: changing queue pair into error state failed: %d\n",
1926 * Change the channel state into CH_DISCONNECTING. If a channel has not yet
1927 * reached the connected state, close it. If a channel is in the connected
1928 * state, send a DREQ. If a DREQ has been received, send a DREP. Note: it is
1961 pr_debug("ch %s-%d state %d\n", ch->sess_name, ch->qp->qp_num,
1962 ch->state);
1971 pr_info("%s(%s-%d state %d): still waiting ...\n", __func__,
1972 ch->sess_name, ch->qp->qp_num, ch->state);
2067 * state and remove the channel from the channel list. This function is
2235 ch->state = CH_CONNECTING;
2439 if (sport->enabled && ch->state == CH_CONNECTING) {
2611 * Note: calling srpt_close_ch() if the transition to the LIVE state
2616 pr_err("%s-%d: channel transition to LIVE state failed\n",
2709 if (ch->state < CH_DISCONNECTING)
2811 enum srpt_command_state state;
2815 state = ioctx->state;
2816 switch (state) {
2819 ioctx->state = SRPT_STATE_CMD_RSP_SENT;
2822 ioctx->state = SRPT_STATE_MGMT_RSP_SENT;
2825 WARN(true, "ch %p; cmd %d: unexpected command state %d\n",
2826 ch, ioctx->ioctx.index, ioctx->state);
2830 if (WARN_ON_ONCE(state == SRPT_STATE_CMD_RSP_SENT))
2845 if (state != SRPT_STATE_MGMT)
2969 pr_info("%s-%d: state %s\n",
2971 get_ch_state_name(ch->state));
3196 pr_err("ib_cm_listen() failed: %d (cm_id state = %d)\n", ret,
3197 sdev->cm_id->state);
3347 WARN_ON_ONCE(ioctx->state != SRPT_STATE_DONE &&
3403 return ioctx->state;