1
0
Fork 0
alistair23-linux/drivers/net/ethernet/broadcom/bnxt
Michael Chan e8c8d2319b bnxt_en: Improve stats context resource accounting with RDMA driver loaded.
commit 869c4d5eb1 upstream.

The function bnxt_get_ulp_stat_ctxs() does not count the stats contexts
used by the RDMA driver correctly when the RDMA driver is freeing the
MSIX vectors.  It assumes that if the RDMA driver is registered, the
additional stats contexts will be needed.  This is not true when the
RDMA driver is about to unregister and frees the MSIX vectors.

This slight error leads to over accouting of the stats contexts needed
after the RDMA driver has unloaded.  This will cause some firmware
warning and error messages in dmesg during subsequent config. changes
or ifdown/ifup.

Fix it by properly accouting for extra stats contexts only if the
RDMA driver is registered and MSIX vectors have been successfully
requested.

Fixes: c027c6b4e9 ("bnxt_en: get rid of num_stat_ctxs variable")
Reviewed-by: Yongping Zhang <yongping.zhang@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:18 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
bnxt.c bnxt_en: Release PCI regions when DMA mask setup fails during probe. 2020-12-02 08:49:51 +01:00
bnxt.h bnxt_en: Re-write PCI BARs after PCI fatal error. 2020-11-01 12:01:04 +01:00
bnxt_coredump.h bnxt_en: Add support for ethtool get dump. 2018-08-05 17:08:26 -07:00
bnxt_dcb.c bnxt_en: fix memory leaks in bnxt_dcbnl_ieee_getets() 2020-04-01 11:01:41 +02:00
bnxt_dcb.h bnxt_en: Do not use the CNP CoS queue for networking traffic. 2018-08-05 17:08:26 -07:00
bnxt_debugfs.c bnxt: no need to check return value of debugfs_create functions 2019-08-10 15:25:47 -07:00
bnxt_debugfs.h bnxt_en: add debugfs support for DIM 2018-04-27 14:47:30 -04:00
bnxt_devlink.c bnxt_en: Move devlink_register before registering netdev 2020-02-11 04:35:03 -08:00
bnxt_devlink.h bnxt_en: Reduce BNXT_MSIX_VEC_MAX value to supported CQs per PF. 2020-05-14 07:58:23 +02:00
bnxt_dim.c linux/dim: Move implementation to .c files 2019-06-25 13:46:39 -07:00
bnxt_ethtool.c bnxt_en: read EEPROM A2h address using page 0 2020-11-24 13:28:55 +01:00
bnxt_ethtool.h bnxt_en: Return error if FW returns more data than dump length 2020-01-04 19:18:52 +01:00
bnxt_fw_hdr.h
bnxt_hsi.h bnxt_en: Update firmware interface spec. to 1.10.0.100. 2019-09-16 16:44:27 +02:00
bnxt_nvm_defs.h bnxt_en: Fix memory fault in bnxt_ethtool_init() 2018-04-19 16:35:09 -04:00
bnxt_sriov.c bnxt_en: fix NULL dereference in case SR-IOV configuration fails 2020-07-16 08:16:41 +02:00
bnxt_sriov.h bnxt_en: Retain user settings on a VF after RESET_NOTIFY event. 2019-08-30 14:02:19 -07:00
bnxt_tc.c bnxt_en: Convert error code in firmware message response to standard code. 2019-08-30 14:02:18 -07:00
bnxt_tc.h bnxt_en: Fix to include flow direction in L2 key 2019-08-18 13:05:01 -07:00
bnxt_ulp.c bnxt_en: Improve stats context resource accounting with RDMA driver loaded. 2021-01-19 18:26:18 +01:00
bnxt_ulp.h bnxt_en: get rid of num_stat_ctxs variable 2018-12-17 23:08:53 -08:00
bnxt_vfr.c bnxt_en: Do not treat DSN (Digital Serial Number) read failure as fatal. 2020-01-23 08:22:52 +01:00
bnxt_vfr.h devlink: Add extack for eswitch operations 2018-10-03 16:17:58 -07:00
bnxt_xdp.c bnxt_en: add page_pool support 2019-07-08 15:15:25 -07:00
bnxt_xdp.h bnxt_en: optimized XDP_REDIRECT support 2019-07-08 15:15:24 -07:00