HomeFreeBSD

cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset.

Description

cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset.

The suspend/resume/reset implementation in the base driver (LLD)
currently works when only stateless features are in use. This commit
adds basic infrastructure for stateful upper layer drivers (ULDs) to
participate in suspend/resume/reset.

  • Add a uld_restart to indicate that the adapter has been restarted after a stop and the ULD should resume operations.
  • Move the existing functionality in t4_suspend/t4_resume to stop_lld and restart_lld. Use these and the new uld restart routines everywhere the adapter has to be stopped abruptly and restarted, namely:
    1. PCIE bus suspend/resume/reset methods invoked by the kernel.
    2. Manual internal-reset using driver sysctl.
    3. Automatic internal-reset on a fatal error.
  • Implement an alternate internal-reset for use in VMs and for testing.

Typical reset sequence is:
stop_adapter(sc);
stop_lld(sc);
stop_all_uld(sc);
set_adapter_hwstatus(sc, false);

/* hw reset takes place here. */

restart_adapter(sc);
restart_lld(sc);

set_adapter_hwstatus(sc, true);

restart_all_uld(sc);

Sponsored by: Chelsio Communications

(cherry picked from commit 5241b210a4e1029f3005faf82cd74965645c401b)

Details

Provenance
npAuthored on Jul 8 2024, 5:42 PM
Parents
rG4f1b1077fbb9: cxgbe(4): Changes to ULD list management.
Branches
Unknown
Tags
Unknown