diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-05-05 08:35:00 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-05-05 08:35:00 +0200 |
commit | 1fb48f8e54e5ed4d3d8599ba7e83f1f60530c81c (patch) | |
tree | 6b8c1ccdd461e211f72c674d183f5129f5fe4a5b /drivers/net/ethernet/mellanox/mlx4/port.c | |
parent | 778843f934e362ed4ed734520f60a44a78a074b4 (diff) | |
parent | 04974df8049fc4240d22759a91e035082ccd18b4 (diff) | |
download | linux-1fb48f8e54e5ed4d3d8599ba7e83f1f60530c81c.tar.bz2 |
Merge tag 'v4.6-rc6' into x86/asm, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/port.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/port.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c index 211c65087997..087b23b320cb 100644 --- a/drivers/net/ethernet/mellanox/mlx4/port.c +++ b/drivers/net/ethernet/mellanox/mlx4/port.c @@ -1317,6 +1317,19 @@ static int mlx4_common_set_port(struct mlx4_dev *dev, int slave, u32 in_mod, } gen_context->mtu = cpu_to_be16(master->max_mtu[port]); + /* Slave cannot change Global Pause configuration */ + if (slave != mlx4_master_func_num(dev) && + ((gen_context->pptx != master->pptx) || + (gen_context->pprx != master->pprx))) { + gen_context->pptx = master->pptx; + gen_context->pprx = master->pprx; + mlx4_warn(dev, + "denying Global Pause change for slave:%d\n", + slave); + } else { + master->pptx = gen_context->pptx; + master->pprx = gen_context->pprx; + } break; case MLX4_SET_PORT_GID_TABLE: /* change to MULTIPLE entries: number of guest's gids |