linux_dsm_epyc7002/drivers/net/ethernet/mellanox/mlx4
Yishai Hadas 55ad359225 net/mlx4_core: Enable device recovery flow with SRIOV
In SRIOV, both the PF and the VF may attempt device recovery whenever they
assume that the device is not functioning.  When the PF driver resets the
device, the VF should detect this and attempt to reinitialize itself.

The VF must be able to reset itself under all circumstances, even
if the PF is not responsive.

The VF shall reset itself in the following cases:

1. Commands are not processed within reasonable time over the communication channel.
This is done considering device state and the correct return code based on
the command as was done in the native mode, done in the next patch.

2. The VF driver receives an internal error event reported by the PF on the
communication channel. This occurs when the PF driver resets the device or
when VF is out of sync with the PF.

Add 'VF reset' capability, which allows the VF to reinitialize itself even when the
PF is not responsive.

As PF and VF may run their reset flow simulantanisly, there are several cases
that are handled:
- Prevent freeing VF resources upon FLR, when PF is in its unloading stage.
- Prevent PF getting VF commands before it has finished initializing its resources.
- Upon VF startup, check that comm-channel is online before sending
  commands to the PF and getting timed-out.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-25 14:43:14 -08:00
..
alloc.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
catas.c net/mlx4_core: Enable device recovery flow with SRIOV 2015-01-25 14:43:14 -08:00
cmd.c net/mlx4_core: Enable device recovery flow with SRIOV 2015-01-25 14:43:14 -08:00
cq.c net/mlx4_core: Use tasklet for user-space CQ completion events 2014-12-11 14:47:34 -05:00
en_clock.c mlx4: include clocksource.h again 2015-01-02 16:47:36 -05:00
en_cq.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
en_dcb_nl.c net/mlx4_en: Fix UP limit in ieee_ets->prio_tc 2014-03-02 20:04:00 -05:00
en_ethtool.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
en_main.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
en_netdev.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
en_port.c net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE 2014-11-11 13:20:02 -05:00
en_port.h net/mlx4_en: Use PTYS register to query ethtool settings 2014-10-28 17:18:00 -04:00
en_resources.c net/mlx4_en: Add netdev support for TCP/IP offloads of vxlan tunneling 2013-12-31 14:31:43 -05:00
en_rx.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
en_selftest.c ethtool, net/mlx4_en: Add 100M, 20G, 56G speeds ethtool reporting support 2014-10-28 17:18:00 -04:00
en_tx.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
eq.c net/mlx4_core: Enable device recovery flow with SRIOV 2015-01-25 14:43:14 -08:00
fw.c net/mlx4: Cache line CQE/EQE stride fixes 2014-12-16 15:23:53 -05:00
fw.h net/mlx4_core: Avoid double dumping of the PF device capabilities 2014-12-15 11:34:54 -05:00
icm.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
icm.h mlx4_core: Fix GFP flags parameters to be gfp_t 2014-06-04 10:19:13 -07:00
intf.c net/mlx4_core: Enable device recovery flow with SRIOV 2015-01-25 14:43:14 -08:00
Kconfig net/mlx4: Set proper build dependancy with vxlan 2014-04-01 16:25:51 -04:00
main.c net/mlx4_core: Enable device recovery flow with SRIOV 2015-01-25 14:43:14 -08:00
Makefile net/mlx4_en: Add HW timestamping (TS) support 2013-04-24 16:30:14 -04:00
mcg.c net/mlx4_core: Activate reset flow upon fatal command cases 2015-01-25 14:43:14 -08:00
mlx4_en.h net/mlx4: Change QP allocation scheme 2014-12-11 14:47:35 -05:00
mlx4.h net/mlx4_core: Enable device recovery flow with SRIOV 2015-01-25 14:43:14 -08:00
mr.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
pd.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
port.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
profile.c net/mlx4_core: Flexible (asymmetric) allocation of EQs and MSI-X vectors for PF/VFs 2014-11-13 15:16:21 -05:00
qp.c net/mlx4: Add support for A0 steering 2014-12-11 14:47:36 -05:00
reset.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
resource_tracker.c net/mlx4_core: Maintain a persistent memory for mlx4 device 2015-01-25 14:43:13 -08:00
sense.c Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
srq.c IB/mlx4: Implement IB_QP_CREATE_USE_GFP_NOIO 2014-06-02 14:58:11 -07:00