net/mlx4_core: Avoid setting ports to auto when only one port type is supported
authorMaor Gottlieb <maorg@mellanox.com>
Thu, 27 Oct 2016 13:27:14 +0000 (16:27 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 20:23:48 +0000 (16:23 -0400)
commit33a1f8b196dca933313c001866c4df3f3ca11f78
tree480a21a8941bb17a9a766bc4c57f4fe80be9370f
parentaa0c08feae8161b945520ada753d0dfe62b14fe7
net/mlx4_core: Avoid setting ports to auto when only one port type is supported

When only one port type is supported, it should be read only.
We reject changing requests, even to the auto sense mode.

Fixes: 27bf91d6a0d5 ("mlx4_core: Add link type autosensing")
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c