]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDMA/mana_ib: Set correct device into ib
authorKonstantin Taranov <kotaranov@microsoft.com>
Thu, 11 Jul 2024 13:37:57 +0000 (06:37 -0700)
committerLeon Romanovsky <leon@kernel.org>
Sun, 14 Jul 2024 07:49:53 +0000 (10:49 +0300)
commit1df03a4b44146c4f720d793915747272c7773a3e
treeffcfbab88d9ac8259a1db66b13fdb0afc047dee9
parent95b087f87b780daafad1dbb2c84e81b729d5d33f
RDMA/mana_ib: Set correct device into ib

Add mana_get_primary_netdev_rcu helper to get a primary
netdevice for a given port. When mana is used with
netvsc, the VF netdev is controlled by an upper netvsc
device. In a baremetal case, the VF netdev is the
primary device.

Use the mana_get_primary_netdev_rcu() helper in the mana_ib
to get the correct device for querying network states.

Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1720705077-322-1-git-send-email-kotaranov@linux.microsoft.com
Reviewed-by: Long Li <longli@microsoft.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mana/device.c
drivers/net/ethernet/microsoft/mana/mana_en.c
include/net/mana/mana.h