mirror_ubuntu-kernels/drivers/net/ethernet/broadcom/bnx2x
Thinh Tran bf23ffc8a9 bnx2x: new flag for track HW resource allocation
While injecting PCIe errors to the upstream PCIe switch of
a BCM57810 NIC, system hangs/crashes were observed.

After several calls to bnx2x_tx_timout() complete,
bnx2x_nic_unload() is called to free up HW resources
and bnx2x_napi_disable() is called to release NAPI objects.
Later, when the EEH driver calls bnx2x_io_slot_reset() to
complete the recovery process, bnx2x attempts to disable
NAPI again by calling bnx2x_napi_disable() and freeing
resources which have already been freed, resulting in a
hang or crash.

Introduce a new flag to track the HW resource and NAPI
allocation state, refactor duplicated code into a single
function, check page pool allocation status before freeing,
and reduces debug output when a TX timeout event occurs.

Reviewed-by: Manish Chopra <manishc@marvell.com>
Tested-by: Abdul Haleem <abdhalee@in.ibm.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Venkata Sai Duggi <venkata.sai.duggi@ibm.com>
Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20230818161443.708785-2-thinhtr@linux.vnet.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-22 17:07:40 -07:00
..
bnx2x_cmn.c bnx2x: new flag for track HW resource allocation 2023-08-22 17:07:40 -07:00
bnx2x_cmn.h
bnx2x_dcb.c
bnx2x_dcb.h
bnx2x_dump.h
bnx2x_ethtool.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
bnx2x_fw_defs.h bnx2x: Utilize firmware 7.13.21.0 2021-12-20 11:29:20 +00:00
bnx2x_fw_file_hdr.h
bnx2x_hsi.h bnx2x: Utilize firmware 7.13.21.0 2021-12-20 11:29:20 +00:00
bnx2x_init_ops.h net: bnx2x: fix variable dereferenced before check 2021-11-15 13:28:49 +00:00
bnx2x_init.h
bnx2x_link.c bnx2x: Fix comment typo 2022-08-12 11:28:19 +01:00
bnx2x_link.h
bnx2x_main.c bnx2x: new flag for track HW resource allocation 2023-08-22 17:07:40 -07:00
bnx2x_mfw_req.h
bnx2x_reg.h bnx2x: Fix spelling mistake "regiser" -> "register" 2022-04-11 10:52:09 +01:00
bnx2x_self_test.c
bnx2x_sp.c net: broadcom: bnx2x: Fix wrong function name in comments 2021-05-17 14:12:38 -07:00
bnx2x_sp.h
bnx2x_sriov.c bnx2x: fix pci device refcount leak in bnx2x_vf_is_pcie_pending() 2022-11-22 13:32:26 +01:00
bnx2x_sriov.h net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
bnx2x_stats.c bnx2x: Use struct_group() for memcpy() region 2021-11-19 11:18:08 +00:00
bnx2x_stats.h bnx2x: Use struct_group() for memcpy() region 2021-11-19 11:18:08 +00:00
bnx2x_vfpf.c bnx2x: new flag for track HW resource allocation 2023-08-22 17:07:40 -07:00
bnx2x_vfpf.h
bnx2x.h bnx2x: new flag for track HW resource allocation 2023-08-22 17:07:40 -07:00
Makefile