]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/core: Fix reported speed and width
authorKamal Heib <kamalheib1@gmail.com>
Wed, 2 Sep 2020 12:43:04 +0000 (15:43 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 2 Sep 2020 19:58:54 +0000 (16:58 -0300)
commitc7101340a22209b288472dbab7d1ab0e3f3d66fd
tree99a5ce29411ce1dc0b268c87c9fdc548dae35c9b
parentfe8c6fbcb8e443c313d4694aba3afd60e4118179
RDMA/core: Fix reported speed and width

When the returned speed from __ethtool_get_link_ksettings() is
SPEED_UNKNOWN this will lead to reporting a wrong speed and width for
providers that uses ib_get_eth_speed(), fix that by defaulting the
netdev_speed to SPEED_1000 in case the returned value from
__ethtool_get_link_ksettings() is SPEED_UNKNOWN.

Fixes: 397b5109ff08 ("IB/core: Add generic function to extract IB speed from netdev")
Link: https://lore.kernel.org/r/20200902124304.170912-1-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/verbs.c