From 0925119ad8330a6f80eb620617f33253506a5e1d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 25 Jul 2010 09:34:20 +0000 Subject: [PATCH] Made sure that invocation of srpt_pending_cmd_timeout() after srpt_handle_rdma_comp() finished and before srpt_xmit_response() started works properly. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1875 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 86e975d0f..b51c51bf8 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1188,7 +1188,13 @@ static void srpt_abort_scst_cmd(struct srpt_ioctx *ioctx, WARN_ON(!scst_cmd_aborted(scmnd)); break; case SRPT_STATE_DATA_IN: - WARN_ON("ERROR: unexpected command state"); + /* + * Invocation of srpt_pending_cmd_timeout() after + * srpt_handle_rdma_comp() set the state to SRPT_STATE_DATA_IN + * and before srpt_xmit_response() set the state to + * SRPT_STATE_CMD_RSP_SENT. Ignore the timeout and let + * srpt_handle_xmit_response() proceed. + */ break; case SRPT_STATE_NEED_DATA: /* SCST_DATA_WRITE - RDMA read error or RDMA read timeout. */