]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
net/mlx4_core: Avoid command timeouts during VF driver device shutdown
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 16 Feb 2017 16:03:47 +0000 (11:03 -0500)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 8 Mar 2017 13:35:55 +0000 (10:35 -0300)
commit3c05ac20fe6e54e7d06d8c50c1a89c01abb038c7
tree9c6c49be3812f7fd616d76236ed900900933cbce
parentf4f73e2e63086521b3127582b360bff9f8c21edb
net/mlx4_core: Avoid command timeouts during VF driver device shutdown

BugLink: http://bugs.launchpad.net/bugs/1650058
Some Hypervisors detach VFs from VMs by instantly causing an FLR event
to be generated for a VF.

In the mlx4 case, this will cause that VF's comm channel to be disabled
before the VM has an opportunity to invoke the VF device's "shutdown"
method.

The result is that the VF driver on the VM will experience a command
timeout during the shutdown process when the Hypervisor does not deliver
a command-completion event to the VM.

To avoid FW command timeouts on the VM when the driver's shutdown method
is invoked, we detect the absence of the VF's comm channel at the very
start of the shutdown process. If the comm-channel has already been
disabled, we cause all FW commands during the device shutdown process to
immediately return success (and thus avoid all command timeouts).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit d585df1c5ccf995fcee910705ad7a9cdd11d4152)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/ethernet/mellanox/mlx4/catas.c
drivers/net/ethernet/mellanox/mlx4/intf.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h