HomeFreeBSD

MFC r331449:

Description

MFC r331449:
Handle software reset of firmware in error flow in mlx5core.

Some mlx5 adapter firmware allows the driver to reset the firmware in
the event of an error. When a software reset is issued on any physical
function all PFs enter reset state. This is a recoverable condition.
The existing recovery flow was designed to allow the recovery of a
VF after a PF driver reload. This patch expands the scope of that
flow to recover PFs or VFs after a SW reset has been issued.
When a software reset is issued the following occurs:

  1. The NIC interface mode is set to SW_RESET (7) while the reset is in progress.
  2. Once the reset completes the NIC interface mode is set to NIC disabled (1).

After the reset has been issued (added in a subsequent patch) the
health poll for other functions will detect that the NIC interface
state has been set to disabled. This will cause it to enter the
existing recovery flow. If the PCI is still working (meaning it
doesn't return 0xff on all reads) it means recovery can proceed
immediately instead of waiting 60 seconds.

The error detetion has also been refactored to avoid incorrect or
misleading log messages.

Submitted by: slavash@
Sponsored by: Mellanox Technologies

Details

Provenance
hselaskyAuthored on
Parents
rS331812: MFC r331447:
Branches
Unknown
Tags
Unknown