RDMA/irdma: Flush iWARP QP if modified to ERR from RTR state
authorTatyana Nikolova <tatyana.e.nikolova@intel.com>
Mon, 25 Apr 2022 18:17:01 +0000 (13:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:30:15 +0000 (12:30 +0200)
commit62e9930ff8ca700d52f09f1065faec0b6ffc9300
tree0a3cb70f4a58c33218000f12101e4834f0874c67
parent546c957f313af4022f34c403f97bd8d019ac40ac
RDMA/irdma: Flush iWARP QP if modified to ERR from RTR state

commit 7b8943b821bafab492f43aafbd006b57c6b65845 upstream.

When connection establishment fails in iWARP mode, an app can drain the
QPs and hang because flush isn't issued when the QP is modified from RTR
state to error. Issue a flush in this case using function
irdma_cm_disconn().

Update irdma_cm_disconn() to do flush when cm_id is NULL, which is the
case when the QP is in RTR state and there is an error in the connection
establishment.

Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Link: https://lore.kernel.org/r/20220425181703.1634-2-shiraz.saleem@intel.com
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/irdma/cm.c
drivers/infiniband/hw/irdma/verbs.c