net/mlx4_core: Don't allow to VF change global pause settings
authorEugenia Emantayev <eugenia@mellanox.com>
Wed, 20 Apr 2016 13:01:17 +0000 (16:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Apr 2016 19:02:40 +0000 (15:02 -0400)
commit2a500090a4ea2ccd713f3c782a2fb27681bd6e67
treee2c01f57d97dc5f8b37d497441cfa447663e62ae
parent4bfd2e6e53435a214888fd35e230157a38ffc6a0
net/mlx4_core: Don't allow to VF change global pause settings

Currently changing global pause settings is done via SET_PORT
command with input modifier GENERAL. This command is allowed
for each VF since MTU setting is done via the same command.

Change the above to the following scheme: before passing the
request to the FW, the PF will check whether it was issued
by a slave. If yes, don't change global pause and warn,
otherwise change to the requested value and store for
further reference.

Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mlx4.h
drivers/net/ethernet/mellanox/mlx4/port.c