diff options
| author | Long Li <longli@microsoft.com> | 2026-02-03 23:45:23 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-06 18:55:51 +0300 |
| commit | 367bad70cc52a3457be28cb4a0e31af2a4c17fed (patch) | |
| tree | 38f3ff2dcfc4077d90e737007ca0b4bb61b22aa0 /include | |
| parent | 40daf043b92b4a4d63cc0cd8efdf7bea67490d6b (diff) | |
| download | linux-367bad70cc52a3457be28cb4a0e31af2a4c17fed.tar.xz | |
net: mana: Change the function signature of mana_get_primary_netdev_rcu
commit a8445cfec101c42e9d64cdb2dac13973b22c205c upstream.
Change mana_get_primary_netdev_rcu() to mana_get_primary_netdev(), and
return the ndev with refcount held. The caller is responsible for dropping
the refcount.
Also drop the check for IFF_SLAVE as it is not necessary if the upper
device is present.
Signed-off-by: Long Li <longli@microsoft.com>
Link: https://patch.msgid.link/1741821332-9392-1-git-send-email-longli@linuxonhyperv.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Fixes: 1df03a4b4414 ("RDMA/mana_ib: Set correct device into ib")
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/mana/mana.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h index f2a5200d8a0f..ac9a4b0bd49b 100644 --- a/include/net/mana/mana.h +++ b/include/net/mana/mana.h @@ -819,5 +819,7 @@ int mana_cfg_vport(struct mana_port_context *apc, u32 protection_dom_id, u32 doorbell_pg_id); void mana_uncfg_vport(struct mana_port_context *apc); -struct net_device *mana_get_primary_netdev_rcu(struct mana_context *ac, u32 port_index); +struct net_device *mana_get_primary_netdev(struct mana_context *ac, + u32 port_index, + netdevice_tracker *tracker); #endif /* _MANA_H */ |
