opnsense-src/sys/dev/cxgbe
Navdeep Parhar 5241b210a4 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
2024-07-21 20:24:03 -07:00
..
common cxgbe: handle vlan PF restrictions 2024-06-17 23:42:08 +02:00
crypto cxgbe(4): Rename rx_c_chan to rx_chan. 2024-04-30 16:07:24 -07:00
cudbg sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
cxgbei cxgbe(4): Changes to ULD list management. 2024-07-19 09:12:49 -07:00
firmware cxgbe(4): Update firmwares to 1.27.5.0 2024-01-04 12:37:27 -08:00
iw_cxgbe cxgbe(4): Changes to ULD list management. 2024-07-19 09:12:49 -07:00
tom cxgbe(4): Changes to ULD list management. 2024-07-19 09:12:49 -07:00
adapter.h cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset. 2024-07-21 20:24:03 -07:00
if_cc.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
if_ccv.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
if_cxl.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
if_cxlv.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
offload.h cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset. 2024-07-21 20:24:03 -07:00
osdep.h libkern: add ilog2 macro 2024-06-03 11:37:55 -05:00
t4_clip.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_clip.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_filter.c cxgbe(4): Consolidate all mk_set_tcb_field_ulp in one place. 2024-05-17 15:52:33 -07:00
t4_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
t4_ioctl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_iov.c cxgbe: handle vlan PF restrictions 2024-06-17 23:42:08 +02:00
t4_l2t.c cxgbe(4): Make no assumptions about the start and size of the L2T table. 2024-07-19 09:12:46 -07:00
t4_l2t.h cxgbe(4): Make no assumptions about the start and size of the L2T table. 2024-07-19 09:12:46 -07:00
t4_main.c cxgbe(4): Basic infrastructure for ULDs to participate in adapter reset. 2024-07-21 20:24:03 -07:00
t4_mp_ring.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
t4_mp_ring.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_netmap.c cxgbe: Flush transmitted packets more regularly in netmap mode 2024-07-15 11:26:59 -04:00
t4_sched.c cxgbe(4): sc->port is indexed by port_id and not tx_chan. 2024-05-17 15:42:23 -07:00
t4_sge.c cxgbe: use order_base_2 2024-06-24 02:18:42 -05:00
t4_smt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
t4_smt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
t4_tracer.c net: Remove unneeded NULL check for the allocated ifnet 2024-06-28 18:16:29 +08:00
t4_vf.c cxgbev(4): Pay attention to the VLAN configuration for the VF. 2024-06-17 10:35:14 -07:00