Skip to content

Commit 84a6a7a

Browse files
paravmellanoxdledford
authored andcommitted
IB/mlx5: Fix represent correct netdevice in dual port RoCE
In commit bcf87f1 ("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: bcf87f1 ("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>
1 parent 4f32ac2 commit 84a6a7a

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static int mlx5_netdev_event(struct notifier_block *this,
179179
if (rep_ndev == ndev)
180180
roce->netdev = (event == NETDEV_UNREGISTER) ?
181181
NULL : ndev;
182-
} else if (ndev->dev.parent == &ibdev->mdev->pdev->dev) {
182+
} else if (ndev->dev.parent == &mdev->pdev->dev) {
183183
roce->netdev = (event == NETDEV_UNREGISTER) ?
184184
NULL : ndev;
185185
}

0 commit comments

Comments
 (0)