- Fixed incorrect SCST state used on error path
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 31 Oct 2008 11:16:47 +0000 (11:16 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 31 Oct 2008 11:16:47 +0000 (11:16 +0000)
 - Small cleanups
 - ToDo entry added

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@557 d57e44dd-8a1f-0410-8b47-8ef2f437770f

srpt/ToDo [new file with mode: 0644]
srpt/src/ib_srpt.c

diff --git a/srpt/ToDo b/srpt/ToDo
new file mode 100644 (file)
index 0000000..681b7c0
--- /dev/null
+++ b/srpt/ToDo
@@ -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.
index 998fef4..d1fa168 100644 (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,