|
@@ -872,9 +872,13 @@ static void c4iw_rdev_close(struct c4iw_rdev *rdev)
|
|
|
static void c4iw_dealloc(struct uld_ctx *ctx)
|
|
|
{
|
|
|
c4iw_rdev_close(&ctx->dev->rdev);
|
|
|
+ WARN_ON_ONCE(!idr_is_empty(&ctx->dev->cqidr));
|
|
|
idr_destroy(&ctx->dev->cqidr);
|
|
|
+ WARN_ON_ONCE(!idr_is_empty(&ctx->dev->qpidr));
|
|
|
idr_destroy(&ctx->dev->qpidr);
|
|
|
+ WARN_ON_ONCE(!idr_is_empty(&ctx->dev->mmidr));
|
|
|
idr_destroy(&ctx->dev->mmidr);
|
|
|
+ wait_event(ctx->dev->wait, idr_is_empty(&ctx->dev->hwtid_idr));
|
|
|
idr_destroy(&ctx->dev->hwtid_idr);
|
|
|
idr_destroy(&ctx->dev->stid_idr);
|
|
|
idr_destroy(&ctx->dev->atid_idr);
|
|
@@ -992,6 +996,7 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
|
|
|
mutex_init(&devp->rdev.stats.lock);
|
|
|
mutex_init(&devp->db_mutex);
|
|
|
INIT_LIST_HEAD(&devp->db_fc_list);
|
|
|
+ init_waitqueue_head(&devp->wait);
|
|
|
devp->avail_ird = devp->rdev.lldi.max_ird_adapter;
|
|
|
|
|
|
if (c4iw_debugfs_root) {
|