net/mlx5: Disallow RoCE on multi port slave device
authorShay Drory <shayd@nvidia.com>
Wed, 30 Dec 2020 08:58:34 +0000 (10:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:32 +0000 (11:37 +0100)
commit8dafb484fe3fb8832d560724fb0264365e967e08
tree6c72686ef1535feb81ab2eae6b3c13a2552a34ed
parentefb1aa6f1175b4b8504edd4e4bb909a897625327
net/mlx5: Disallow RoCE on multi port slave device

[ Upstream commit c70f8597fcc1399ef6d5b5ce648a31d887d5dba2 ]

In dual port mode, setting roce enabled/disable for the slave device
have no effect. e.g.: the slave device roce status remain unchanged.
Therefore disable it and add an error message.
Enable or disable roce of the master device affect both master and slave
devices.

Fixes: cc9defcbb8fa ("net/mlx5: Handle "enable_roce" devlink param")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c