|
@@ -324,6 +324,11 @@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev)
|
|
if (!dev->qp_tbl)
|
|
if (!dev->qp_tbl)
|
|
goto alloc_err;
|
|
goto alloc_err;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ dev->stag_arr = kzalloc(sizeof(u64) * OCRDMA_MAX_STAG, GFP_KERNEL);
|
|
|
|
+ if (dev->stag_arr == NULL)
|
|
|
|
+ goto alloc_err;
|
|
|
|
+
|
|
spin_lock_init(&dev->av_tbl.lock);
|
|
spin_lock_init(&dev->av_tbl.lock);
|
|
spin_lock_init(&dev->flush_q_lock);
|
|
spin_lock_init(&dev->flush_q_lock);
|
|
return 0;
|
|
return 0;
|
|
@@ -334,6 +339,7 @@ alloc_err:
|
|
|
|
|
|
static void ocrdma_free_resources(struct ocrdma_dev *dev)
|
|
static void ocrdma_free_resources(struct ocrdma_dev *dev)
|
|
{
|
|
{
|
|
|
|
+ kfree(dev->stag_arr);
|
|
kfree(dev->qp_tbl);
|
|
kfree(dev->qp_tbl);
|
|
kfree(dev->cq_tbl);
|
|
kfree(dev->cq_tbl);
|
|
kfree(dev->sgid_tbl);
|
|
kfree(dev->sgid_tbl);
|