aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mana/device.c
diff options
context:
space:
mode:
authorLong Li <[email protected]>2023-12-16 02:04:14 +0000
committerLeon Romanovsky <[email protected]>2023-12-20 08:25:40 +0000
commit2c20e20b22d9fc64072e3445ae3ca244cbd523a2 (patch)
treedb8fdcf452c759183bfe9f9d7c5d4e3d17de7dea /drivers/infiniband/hw/mana/device.c
parentRDMA/mana_ib: register RDMA device with GDMA (diff)
downloadkernel-2c20e20b22d9fc64072e3445ae3ca244cbd523a2.tar.gz
kernel-2c20e20b22d9fc64072e3445ae3ca244cbd523a2.zip
RDMA/mana_ib: query device capabilities
With RDMA device registered, use it to query on hardware capabilities and cache this information for future query requests to the driver. Signed-off-by: Long Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'drivers/infiniband/hw/mana/device.c')
-rw-r--r--drivers/infiniband/hw/mana/device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c
index fe025e13a45c..6fa902ee80a6 100644
--- a/drivers/infiniband/hw/mana/device.c
+++ b/drivers/infiniband/hw/mana/device.c
@@ -85,6 +85,13 @@ static int mana_ib_probe(struct auxiliary_device *adev,
}
dev->gdma_dev = &mdev->gdma_context->mana_ib;
+ ret = mana_ib_gd_query_adapter_caps(dev);
+ if (ret) {
+ ibdev_err(&dev->ib_dev, "Failed to query device caps, ret %d",
+ ret);
+ goto deregister_device;
+ }
+
ret = ib_register_device(&dev->ib_dev, "mana_%d",
mdev->gdma_context->dev);
if (ret)