]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/mana_ib: Use ib_get_eth_speed for reporting port speed
authorShiraz Saleem <shirazsaleem@microsoft.com>
Tue, 12 May 2026 09:40:56 +0000 (02:40 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Sun, 24 May 2026 20:24:24 +0000 (17:24 -0300)
Replace hardcoded IB_WIDTH_4X/IB_SPEED_EDR with ib_get_eth_speed()
to report the actual link speed in mana_ib_query_port().

Fixes: 4bda1d5332ec ("RDMA/mana_ib: Implement port parameters")
Link: https://patch.msgid.link/r/20260512094056.264827-1-kotaranov@linux.microsoft.com
Signed-off-by: Shiraz Saleem <shirazsaleem@microsoft.com>
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mana/main.c

index ac5e75dd3494d70f7585aadd204c081046044d24..c2f0b96f473d11b6064b342287b69c5461c6bd22 100644 (file)
@@ -600,8 +600,7 @@ int mana_ib_query_port(struct ib_device *ibdev, u32 port,
                props->phys_state = IB_PORT_PHYS_STATE_DISABLED;
        }
 
-       props->active_width = IB_WIDTH_4X;
-       props->active_speed = IB_SPEED_EDR;
+       ib_get_eth_speed(ibdev, port, &props->active_speed, &props->active_width);
        props->pkey_tbl_len = 1;
        if (mana_ib_is_rnic(dev)) {
                props->gid_tbl_len = 16;