diff options
author | Long Li <longli@microsoft.com> | 2023-12-16 05:04:14 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-12-20 11:25:40 +0300 |
commit | 2c20e20b22d9fc64072e3445ae3ca244cbd523a2 (patch) | |
tree | db8fdcf452c759183bfe9f9d7c5d4e3d17de7dea /drivers/infiniband/hw/mana/device.c | |
parent | a7f0636d223ca9d074eb5b4ae71425e082c5c1e1 (diff) | |
download | linux-2c20e20b22d9fc64072e3445ae3ca244cbd523a2.tar.xz |
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 <longli@microsoft.com>
Link: https://lore.kernel.org/r/1702692255-23640-3-git-send-email-longli@linuxonhyperv.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 | 7 |
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) |