1
0
Fork 0
alistair23-linux/drivers/net/ethernet/broadcom
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
..
bnx2x bnx2x: Fix logic to get total no. of PFs per engine 2020-01-12 12:21:32 +01:00
bnxt bnxt_en: Improve stats context resource accounting with RDMA driver loaded. 2021-01-19 18:26:18 +01:00
genet net: bcmgenet: Fix a resource leak in an error handling path in the probe functin 2020-12-30 11:51:27 +01:00
Kconfig net: ethernet: broadcom: have drivers select DIMLIB as needed 2019-10-15 10:58:08 -07:00
Makefile
b44.c net: b44: fix error return code in b44_init_one() 2020-11-24 13:28:57 +01:00
b44.h
bcm63xx_enet.c bcm63xx_enet: use devm_platform_ioremap_resource() to simplify code 2019-08-01 13:10:34 -04:00
bcm63xx_enet.h
bcmsysport.c net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE 2021-01-12 20:16:11 +01:00
bcmsysport.h Generic DIM 2019-06-27 12:42:51 -07:00
bgmac-bcma-mdio.c
bgmac-bcma.c net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
bgmac-platform.c net: Remove dev_err() usage after platform_get_irq() 2019-07-30 14:37:35 -07:00
bgmac.c net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
bgmac.h
bnx2.c net: broadcom: Use dev_get_drvdata 2019-07-23 13:02:41 -07:00
bnx2.h
bnx2_fw.h
cnic.c cnic: Explicitly initialize all reference counts to 0. 2019-08-05 13:21:55 -07:00
cnic.h
cnic_defs.h
cnic_if.h
sb1250-mac.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
tg3.c tg3: Fix soft lockup when tg3_reset_task() fails. 2020-09-09 19:12:28 +02:00
tg3.h broadcom: tg3: fix use of SPEED_UNKNOWN ethtool constant 2019-04-08 16:30:43 -07:00