diff options
author | Konstantin Taranov <kotaranov@microsoft.com> | 2024-04-10 01:42:26 -0700 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2024-04-16 14:28:26 +0300 |
commit | 98b889c43935c43ad15783dbfb1e59b4ee7f4a56 (patch) | |
tree | 6357a362eafcedf63b34bcef31d97262ce20f894 /drivers/infiniband/hw/mana/device.c | |
parent | 23f59f4e837bba9db8d25ae85b8455d53b23665b (diff) |
RDMA/mana_ib: Add EQ creation for rnic adapter
Create an error EQ for the RNIC adapter.
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1712738551-22075-2-git-send-email-kotaranov@linux.microsoft.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/mana/device.c')
-rw-r--r-- | drivers/infiniband/hw/mana/device.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c index 07e97de31886..08fdd917d075 100644 --- a/drivers/infiniband/hw/mana/device.c +++ b/drivers/infiniband/hw/mana/device.c @@ -92,15 +92,23 @@ static int mana_ib_probe(struct auxiliary_device *adev, goto deregister_device; } + ret = mana_ib_create_eqs(dev); + if (ret) { + ibdev_err(&dev->ib_dev, "Failed to create EQs, ret %d", ret); + goto deregister_device; + } + ret = ib_register_device(&dev->ib_dev, "mana_%d", mdev->gdma_context->dev); if (ret) - goto deregister_device; + goto destroy_eqs; dev_set_drvdata(&adev->dev, dev); return 0; +destroy_eqs: + mana_ib_destroy_eqs(dev); deregister_device: mana_gd_deregister_device(dev->gdma_dev); free_ib_device: @@ -113,9 +121,8 @@ static void mana_ib_remove(struct auxiliary_device *adev) struct mana_ib_dev *dev = dev_get_drvdata(&adev->dev); ib_unregister_device(&dev->ib_dev); - + mana_ib_destroy_eqs(dev); mana_gd_deregister_device(dev->gdma_dev); - ib_dealloc_device(&dev->ib_dev); } |