]> git.ipfire.org Git - thirdparty/linux.git/commit
bnxt_en: Fix DIM shutdown
authorMichael Chan <michael.chan@broadcom.com>
Sat, 4 Jan 2025 04:38:48 +0000 (20:38 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 7 Jan 2025 00:40:26 +0000 (16:40 -0800)
commit40452969a50652e3cbf89dac83d54eebf2206d27
tree1aaddc6f645a00f9b31070b1f4113106b6a9d480
parentc8dafb0e4398dacc362832098a04b97da3b0395b
bnxt_en: Fix DIM shutdown

DIM work will call the firmware to adjust the coalescing parameters on
the RX rings.  We should cancel DIM work before we call the firmware
to free the RX rings.  Otherwise, FW will reject the call from DIM
work if the RX ring has been freed.  This will generate an error
message like this:

bnxt_en 0000:21:00.1 ens2f1np1: hwrm req_type 0x53 seq id 0x6fca error 0x2

and cause unnecessary concern for the user.  It is also possible to
modify the coalescing parameters of the wrong ring if the ring has
been re-allocated.

To prevent this, cancel DIM work right before freeing the RX rings.
We also have to add a check in NAPI poll to not schedule DIM if the
RX rings are shutting down.  Check that the VNIC is active before we
schedule DIM.  The VNIC is always disabled before we free the RX rings.

Fixes: 0bc0b97fca73 ("bnxt_en: cleanup DIM work on device shutdown")
Reviewed-by: Hongguang Gao <hongguang.gao@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250104043849.3482067-3-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c