From 9e3d2d4681e45c389b167d6b05f1cbf172c55348 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 22 Dec 2017 23:14:31 +0000 Subject: [PATCH] ib_srpt: Document rationale of srpt_set_ch_state() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7282 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index a67aeb25d..06dad8788 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -188,6 +188,10 @@ static void srpt_unmap_sg_to_ib_sge(struct srpt_rdma_ch *ch, struct srpt_send_ioctx *ioctx); static void srpt_destroy_ch_ib(struct srpt_rdma_ch *ch); +/* + * The only allowed channel state changes are those that change the channel + * state into a state with a higher numerical value. Hence the new > prev test. + */ static bool srpt_set_ch_state(struct srpt_rdma_ch *ch, enum rdma_ch_state new) { unsigned long flags;