mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net/mlx5e: Don't support phys switch id if not in switchdev mode
Support for phys switch id ndo added for representors and if
we do not have representors there is no need to support it.
Since each port return different switch id supporting this
block support for creating bond over PFs and attaching to bridge
in legacy mode.
This bug doesn't exist upstream as the code got refactored and the
netdev api is totally different.
Fixes: cb67b83292 ("net/mlx5e: Introduce SRIOV VF representors")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
487862fd9d
commit
0216f889f1
@@ -139,7 +139,7 @@ int mlx5e_attr_get(struct net_device *dev, struct switchdev_attr *attr)
|
||||
struct mlx5_eswitch_rep *rep = priv->ppriv;
|
||||
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
|
||||
|
||||
if (esw->mode == SRIOV_NONE)
|
||||
if (esw->mode != SRIOV_OFFLOADS)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
switch (attr->id) {
|
||||
|
||||
Reference in New Issue
Block a user