freebsd-dev/sys/dev/cxgbe
Navdeep Parhar 83b5cda106 cxgbe(4): Add support for NIC suspend/resume and live reset.
Add suspend/resume callbacks to the driver and a live reset built around
them.  This commit covers the basic NIC and future commits will expand
this functionality to other stateful parts of the chip.  Suspend and
resume operate on the chip (the t?nex nexus device) and affect all its
ports.  It is not possible to suspend/resume or reset individual ports.
All these operations can be performed on a running NIC.  A reset will
look like a link bounce to the networking stack.

Here are some ways to exercise this functionality:

 /* Manual suspend and resume. */
 # devctl suspend t6nex0
 # devctl resume t6nex0

 /* Manual reset. */
 # devctl reset t6nex0

 /* Manual reset with driver sysctl. */
 # sysctl dev.t6nex.0.reset=1

 /* Automatic adapter reset on any fatal error. */
 # hw.cxgbe.reset_on_fatal_err=1

Suspend disables the adapter (DMA, interrupts, and the port PHYs) and
marks the hardware as unavailable to the driver.  All ifnets associated
with the adapter are still visible to the kernel but operations that
require hardware interaction will fail with ENXIO.  All ifnets report
link-down while the adapter is suspended.

Resume will reattach to the card, reconfigure it as before, and recreate
the queues servicing the existing ifnets.  The ifnets are able to send
and receive traffic as soon as the link comes back up.

Reset is roughly the same as a suspend and a resume with at least one of
these events in between: D0->D3Hot->D0, FLR, PCIe link retrain.

MFC after:	1 month
Relnotes:	yes
Sponsored by:	Chelsio Communications
2021-04-27 22:48:51 -07:00
..
common cxgbe(4): Allow a T6 adapter to switch between TOE and NIC TLS mode. 2021-03-25 12:39:41 -07:00
crypto ccr: Disable requests on port 1 when needed to workaround a firmware bug. 2021-03-12 10:59:35 -08:00
cudbg cxgbe(4): unimplemented cudbg routines should return the correct 2020-10-14 08:04:39 +00:00
cxgbei cxgbe: Add a struct sge_ofld_txq type. 2021-03-26 15:19:58 -07:00
firmware cxgbe(4): Allow a T6 adapter to switch between TOE and NIC TLS mode. 2021-03-25 12:39:41 -07:00
iw_cxgbe cxgbe: Add a struct sge_ofld_txq type. 2021-03-26 15:19:58 -07:00
tom cxgbe(4): Separate the sw- and hw-specific parts of resource allocations 2021-04-26 14:09:59 -07:00
adapter.h cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
if_cc.c
if_ccv.c
if_cxl.c
if_cxlv.c
offload.h cxgbe/t4_tom: Implement tod_pmtu_update. 2021-04-22 14:48:57 -07:00
osdep.h cxgbe(4): make the logging helpers a little more robust. 2021-04-22 15:28:43 -07:00
t4_clip.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_clip.h Move CLIP table handling out of TOM and into the base driver. 2018-11-29 01:15:53 +00:00
t4_filter.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_if.m
t4_ioctl.h cxgbe(4): Add a driver ioctl to set the filter mask. 2021-02-19 14:23:58 -08:00
t4_iov.c cxgbe(4): Allow the PF driver to set a VF's MAC address. 2020-11-09 00:08:35 +00:00
t4_l2t.c NIC KTLS for Chelsio T6 adapters. 2019-11-21 19:30:31 +00:00
t4_l2t.h NIC KTLS for Chelsio T6 adapters. 2019-11-21 19:30:31 +00:00
t4_main.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_mp_ring.c cxgbe(4): changes in the Tx path to help increase tx coalescing. 2020-07-03 04:44:23 +00:00
t4_mp_ring.h cxgbe(4): changes in the Tx path to help increase tx coalescing. 2020-07-03 04:44:23 +00:00
t4_netmap.c cxgbe(4): Separate the sw- and hw-specific parts of resource allocations 2021-04-26 14:09:59 -07:00
t4_sched.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_sge.c cxgbe(4): Separate the sw- and hw-specific parts of resource allocations 2021-04-26 14:09:59 -07:00
t4_smt.c cxgbe(4): Move all control queues to the adapter. 2018-08-11 21:10:08 +00:00
t4_smt.h cxgbe(4): Retire an old check. 2018-06-01 01:05:34 +00:00
t4_tracer.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_vf.c cxgbe(4): Break up t4_read_chip_settings. 2021-02-18 01:22:42 -08:00