i40iw: Zero-out consumer key on allocate stag for FMR
authorShiraz Saleem <shiraz.saleem@intel.com>
Fri, 12 Jan 2018 00:10:51 +0000 (18:10 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 09:02:05 +0000 (11:02 +0200)
commitf3ce194cae63c2d1749dbfe4c92e1ce7b56e0648
treee0c092e209f7a976aeb4cce64d02ecb679162363
parentb3b2ca24d9f7c5c34a073553a983c099a2862119
i40iw: Zero-out consumer key on allocate stag for FMR

[ Upstream commit 6376e926af1a8661dd1b2e6d0896e07f84a35844 ]

If the application invalidates the MR before the FMR WR, HW parses the
consumer key portion of the stag and returns an invalid stag key
Asynchronous Event (AE) that tears down the QP.

Fix this by zeroing-out the consumer key portion of the allocated stag
returned to application for FMR.

Fixes: ee855d3b93f3 ("RDMA/i40iw: Add base memory management extensions")
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/i40iw/i40iw_verbs.c