iw_cxgb4: when flushing, complete all wrs in a chain
authorSteve Wise <swise@opengridcomputing.com>
Tue, 19 Dec 2017 22:02:10 +0000 (14:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:45:19 +0000 (09:45 +0100)
commit4659a641b36ed3f96c575ac1ef919a4d1c103936
tree3aebe2987055994bb312bc08a6911001fc3d4aa6
parent623b8f8e90f0bb73e9566a6744b5c0577284977e
iw_cxgb4: when flushing, complete all wrs in a chain

commit d14587334580bc94d3ee11e8320e0c157f91ae8f upstream.

If a wr chain was posted and needed to be flushed, only the first
wr in the chain was completed with FLUSHED status.  The rest were
never completed.  This caused isert to hang on shutdown due to the
missing completions which left iscsi IO commands referenced, stalling
the shutdown.

Fixes: 4fe7c2962e11 ("iw_cxgb4: refactor sq/rq drain logic")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/cxgb4/qp.c