]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-switch, When eswitch is unsupported, return -EOPNOTSUPP
authorParav Pandit <parav@mellanox.com>
Wed, 24 Jun 2020 10:56:25 +0000 (05:56 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 10 Jul 2020 02:51:12 +0000 (19:51 -0700)
commit87071d48b043de23e6b9dd03682a6aa6528169f4
tree2e16ccdc7f10db89bc4a9bbfb258f2e4be182493
parent53c66d3222ff932b9ee77a5fb2558c55976eb16c
net/mlx5: E-switch, When eswitch is unsupported, return -EOPNOTSUPP

When eswitch is unsupported, currently -EPERM error code is returned
instead of -EOPNOTSUPP.

Due to this VF device's devlink virtual port is not enumerated because
port_function_get() callback returned -EPERM instead of -EOPNOTSUPP.

Hence, return the error code -EOPNOTSUPP when eswitch is unsupported.

Fixes: 36c579efbc93 ("net/mlx5: E-switch, Introduce and use eswitch support check helper")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c