diff options
author | Mustafa Ismail <mustafa.ismail@intel.com> | 2016-11-30 23:59:26 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-06 00:09:40 +0300 |
commit | d59659340c61e777208524f77c268fe6edc6fe37 (patch) | |
tree | 993c3c1da535fb679f35b72d6bd4efa183ea475d /drivers/infiniband/hw/i40iw/i40iw.h | |
parent | f26c7c83395b72f30d111f4e3adb3437c0a30b77 (diff) | |
download | linux-d59659340c61e777208524f77c268fe6edc6fe37.tar.xz |
i40iw: Add missing cleanup on device close
On i40iw device close, disconnect all connected QPs by moving
them to error state; and block further QPs, PDs and CQs from
being created. Additionally, make sure all resources have been
freed before deallocating the ibdev as part of the device close.
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw.h')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw.h b/drivers/infiniband/hw/i40iw/i40iw.h index dac9a6bcc631..c795c6160261 100644 --- a/drivers/infiniband/hw/i40iw/i40iw.h +++ b/drivers/infiniband/hw/i40iw/i40iw.h @@ -303,10 +303,13 @@ struct i40iw_device { u32 mr_stagmask; u32 mpa_version; bool dcb; + bool closing; u32 used_pds; u32 used_cqs; u32 used_mrs; u32 used_qps; + wait_queue_head_t close_wq; + atomic64_t use_count; }; struct i40iw_ib_device { @@ -521,6 +524,8 @@ int i40iw_modify_qp(struct ib_qp *, struct ib_qp_attr *, int, struct ib_udata *) void i40iw_rem_pdusecount(struct i40iw_pd *iwpd, struct i40iw_device *iwdev); void i40iw_add_pdusecount(struct i40iw_pd *iwpd); +void i40iw_rem_devusecount(struct i40iw_device *iwdev); +void i40iw_add_devusecount(struct i40iw_device *iwdev); void i40iw_hw_modify_qp(struct i40iw_device *iwdev, struct i40iw_qp *iwqp, struct i40iw_modify_qp_info *info, bool wait); |