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:46:02 +0000 (19:46 +0100)
commitc98b5ee3001b86918296870cda83c114d9a19c9b
tree9123b630498075b8b65cac3c11d37cb6d0df9d16
parent53dedc8d521acf94f6b6c9ed446545f9ca8b86f1
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