kernel_samsung_a53x/drivers/net/ethernet/intel/ice
Jesse Brandeburg fb38c2683a ice: reset first in crash dump kernels
commit 0288c3e709e5fabd51e84715c5c798a02f43061a upstream.

When the system boots into the crash dump kernel after a panic, the ice
networking device may still have pending transactions that can cause errors
or machine checks when the device is re-enabled. This can prevent the crash
dump kernel from loading the driver or collecting the crash data.

To avoid this issue, perform a function level reset (FLR) on the ice device
via PCIe config space before enabling it on the crash kernel. This will
clear any outstanding transactions and stop all queues and interrupts.
Restore the config space after the FLR, otherwise it was found in testing
that the driver wouldn't load successfully.

The following sequence causes the original issue:
- Load the ice driver with modprobe ice
- Enable SR-IOV with 2 VFs: echo 2 > /sys/class/net/eth0/device/sriov_num_vfs
- Trigger a crash with echo c > /proc/sysrq-trigger
- Load the ice driver again (or let it load automatically) with modprobe ice
- The system crashes again during pcim_enable_device()

Fixes: 837f08fdecbe ("ice: Add basic driver framework for Intel(R) E800 Series")
Reported-by: Vishal Agrawal <vagrawal@redhat.com>
Reviewed-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Link: https://lore.kernel.org/r/20231011233334.336092-3-jacob.e.keller@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 11:26:08 +01:00
..
ice.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_adminq_cmd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_arfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_arfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_base.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_base.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_controlq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_controlq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_dcb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_dcb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_dcb_lib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_dcb_lib.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_dcb_nl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_dcb_nl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_devids.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_devlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_devlink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_ethtool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_ethtool_fdir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_fdir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_fdir.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_flex_pipe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_flex_pipe.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_flex_type.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_flow.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_flow.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_fltr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_fltr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_fw_update.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_fw_update.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_hw_autogen.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_lan_tx_rx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_lib.c ice: fix over-shifted variable 2024-11-08 11:26:08 +01:00
ice_lib.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_main.c ice: reset first in crash dump kernels 2024-11-08 11:26:08 +01:00
ice_nvm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_nvm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_osdep.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_protocol_type.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_sched.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_sched.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_sriov.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_sriov.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_status.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_switch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_switch.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_txrx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_txrx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_txrx_lib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_txrx_lib.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_type.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_virtchnl_pf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_virtchnl_pf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_xsk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ice_xsk.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00