]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Prevent VF from changing port configuration
authorSaeed Mahameed <saeedm@mellanox.com>
Sun, 2 Nov 2014 14:26:13 +0000 (16:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Nov 2014 17:28:13 +0000 (12:28 -0500)
commit49cf04a6388176c60b8a656d23eab910f0d83bef
treefef743c01fa3eabbaa2968ad501a0e286bf99d5d
parentc7f3160ce88637ad42bab19d9ca5ce32a1b3ebcc
net/mlx4_core: Prevent VF from changing port configuration

Added wrapper to the ACCESS_REG command for handling guest HW
registers access, preventing write operations, but do allow reads.

This will prevent SRIOV guests to change port PTYS configuration,
such as speed/advertised link modes.

Fixes: 80b3e5d1ab3e ('net/mlx4_core: Introduce ACCESS_REG CMD [...]')
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/cmd.c
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h