IB/mlx5: Add additional checks before processing MADs
authorMaor Gottlieb <maorg@mellanox.com>
Wed, 18 Jan 2017 12:10:33 +0000 (14:10 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 14 Feb 2017 15:14:25 +0000 (10:14 -0500)
commitc43f1112c068f3b4b20a0a9d461c341d9caeb376
treec3c1ed21f547741e05fd3034613d42027f73a46c
parent45bded2c216da6010184ac5ebe88c27f73439009
IB/mlx5: Add additional checks before processing MADs

Check the has_smi bit in vport context and class version of MADs
before allowing MADs processing to take place.
MAD_IFC SMI commands can be executed only if smi bit is set.

Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters')
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Parvi Kaustubhi <parvik@mellanox.com>
Reviewed-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/mad.c
drivers/infiniband/hw/mlx5/main.c
include/linux/mlx5/driver.h