RDMA/cxgb4: release hw resources on device removal
authorRaju Rangoju <rajur@chelsio.com>
Mon, 23 Apr 2018 16:12:37 +0000 (21:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 May 2018 07:50:21 +0000 (09:50 +0200)
commit1378078b7a8b1635f1bcd4f5d2843ef9770c61ae
treed4c3f0930e2b22db12026ebca7105d9f6fc61035
parentb13d8f52b8e7f713196e7fc643b44a72ad3da1be
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>
drivers/infiniband/hw/cxgb4/device.c
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/cxgb4/resource.c