IB/hfi1: Unreserve a reserved request when it is completed
authorKaike Wan <kaike.wan@intel.com>
Wed, 28 Nov 2018 18:22:09 +0000 (10:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:47:06 +0000 (19:47 +0100)
commit91e46947d02f07e54f47b66bdde3d3f439a6276c
treea778cb2c69a33842dd4d83375471c44a3872dc6d
parentf7debeebcdeb1bc699fe8c2dcd313d30aec33644
IB/hfi1: Unreserve a reserved request when it is completed

[ Upstream commit ca95f802ef5139722acc8d30aeaab6fe5bbe939e ]

Currently, When a reserved operation is completed, its entry in the send
queue will not be unreserved, which leads to the miscalculation of
qp->s_avail and thus the triggering of a WARN_ON call trace. This patch
fixes the problem by unreserving the reserved operation when it is
completed.

Fixes: 856cc4c237ad ("IB/hfi1: Add the capability for reserved operations")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hfi1/rc.c