- Fixed incorrect SCST state used on error path

- Small cleanups
 - ToDo entry added


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@557 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2008-10-31 11:16:47 +00:00
parent 90c831b838
commit 3379376993
2 changed files with 5 additions and 3 deletions

3
srpt/ToDo Normal file
View File

@@ -0,0 +1,3 @@
1. SRPT driver directly uses internal states of SCST core target state
machine, which is bad, bad, bad and generally not acceptable. Only dev
handler are allowed to use them. That should be fixed.

View File

@@ -669,19 +669,18 @@ static void srpt_handle_err_comp(struct srpt_rdma_ch *ch, struct ib_wc *wc)
scmnd->sg_cnt = 0;
}
if (scmnd->state == SCST_CMD_STATE_RDY_TO_XFER)
if (scmnd->state == SCST_CMD_STATE_DATA_WAIT)
scst_rx_data(scmnd,
SCST_RX_STATUS_ERROR,
SCST_CONTEXT_THREAD);
else if (scmnd->state ==
SCST_CMD_STATE_XMIT_WAIT)
SCST_CMD_STATE_XMIT_WAIT)
scst_tgt_cmd_done(scmnd,
SCST_CONTEXT_DIRECT_ATOMIC);
}
} else
srpt_reset_ioctx(ch, ioctx);
}
}
static void srpt_handle_send_comp(struct srpt_rdma_ch *ch,