]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Don't disable SRIOV if there are active VFs
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 30 Sep 2014 09:03:47 +0000 (12:03 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 20:27:49 +0000 (16:27 -0400)
commit00e4e2c7d62004d9f0af78422de03cd9220211e7
tree9f08f3e7096521d7173c964a56ceafd272c9eb33
parente1ed5c9f0de70ec2ac8e05b9b77199385495dfc2
net/mlx4_core: Don't disable SRIOV if there are active VFs

When unloading the host driver while there are VFs active on VMs,
the PF driver disabled sriov anyway, causing kernel crashes.

We now leave SRIOV enabled, to avoid that.

When the driver is reloaded, __mlx4_init_one is invoked on the PF.
It now checks to see if SRIOV is already enabled on the PF -- and
if so does not enable sriov again.

Signed-off-by: Tal Alon <talal@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c