From b95b1f4d6c415f8be3cdd5c77c4b026c56019245 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 24 Mar 2014 12:04:44 +0000 Subject: [PATCH] ib_srpt: Add a kernel warning Invoking srpt_zerolength_write() before the queue pair has reached the error state is a bug, so complain loudly if that happens. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5369 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 7190042ce..6f57703f0 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1936,6 +1936,8 @@ static void srpt_process_send_completion(struct ib_cq *cq, srpt_handle_rdma_comp(ch, ch->ioctx_ring[index], opcode, srpt_xmt_rsp_context); } else if (opcode == SRPT_RDMA_ZEROLENGTH_WRITE) { + WARN_ONCE(true, "%s: QP not in error state\n", + ch->sess_name); WARN_ON_ONCE(!srpt_set_ch_state(ch, CH_DISCONNECTED)); } else { WARN(true, "unexpected opcode %d\n", opcode);