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);

MFC after: 1 month
Sponsored by: Chelsio Communications

Details

Provenance
npAuthored on Jul 8 2024, 5:42 PM
Parents
rGe0b080f850cc: tcp: mark TCP stacks which can serve as a default stack
Branches
Unknown
Tags
Unknown