summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
diff options
context:
space:
mode:
authorRaju Rangoju <rajur@chelsio.com>2018-04-23 21:42:37 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-09 09:51:52 +0200
commit38a65e7535031abbf796e2c645431bf7998d4084 (patch)
tree768274f1c573476ed362e750b3db6066558d2383 /drivers/infiniband/hw/cxgb4/iw_cxgb4.h
parentbd9ca962eeb05767efed7c2dd62d201a54a9d727 (diff)
downloadlinux-stable-38a65e7535031abbf796e2c645431bf7998d4084.tar.gz
linux-stable-38a65e7535031abbf796e2c645431bf7998d4084.tar.bz2
linux-stable-38a65e7535031abbf796e2c645431bf7998d4084.zip
RDMA/cxgb4: release hw resources on device removal
commit 26bff1bd74a4f7417509a83295614e9dab995b2a upstream. The c4iw_rdev_close() logic was not releasing all the hw resources (PBL and RQT memory) during the device removal event (driver unload / system reboot). This can cause panic in gen_pool_destroy(). The module remove function will wait for all the hw resources to be released during the device removal event. Fixes c12a67fe(iw_cxgb4: free EQ queue memory on last deref) Signed-off-by: Raju Rangoju <rajur@chelsio.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Cc: stable@vger.kernel.org Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/iw_cxgb4.h')
-rw-r--r--drivers/infiniband/hw/cxgb4/iw_cxgb4.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
index 20c481115a99..9bb2e0a50c7f 100644
--- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
+++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
@@ -185,6 +185,10 @@ struct c4iw_rdev {
struct wr_log_entry *wr_log;
int wr_log_size;
struct workqueue_struct *free_workq;
+ struct completion rqt_compl;
+ struct completion pbl_compl;
+ struct kref rqt_kref;
+ struct kref pbl_kref;
};
static inline int c4iw_fatal_error(struct c4iw_rdev *rdev)