]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Fix represent correct netdevice in dual port RoCE
authorParav Pandit <parav@mellanox.com>
Mon, 23 Apr 2018 14:01:55 +0000 (17:01 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 27 Apr 2018 15:03:15 +0000 (11:03 -0400)
commit496c218ae51be7448df0a77adc34d4dd6d982fb0
treeb8e3f16bbf2c616aa06885225050846afcdaeb09
parentd98e6d31e529970809a2e0d1f3cd995b15d0eb14
IB/mlx5: Fix represent correct netdevice in dual port RoCE

In commit 1768fe3fde12 ("IB/mlx5: Listen to netdev register/unresiter events in switchdev mode")
incorrectly mapped primary device's netdevice to 2nd port netdevice.
It always represented primary port's netdevice for 2nd port netdevice
when ib representors were not used.

This results into failing to process CM request arriving on 2nd port due
to incorrect mapping of netdevice.

This fix corrects it by considering the right mdev.

Cc: <stable@vger.kernel.org> # 4.16
Fixes: 1768fe3fde12 ("IB/mlx5: Listen to netdev register/unresiter events in switchdev mode")
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c