]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bnxt_en: Don't assume XDP is never enabled in bnxt_init_dflt_ring_mode()
authorMichael Chan <michael.chan@broadcom.com>
Tue, 31 Mar 2026 06:51:37 +0000 (23:51 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Apr 2026 03:12:56 +0000 (20:12 -0700)
commite4bf81dcad0a6fff2bbe5331d2c7fb30d45a788c
tree730dbcab93ddf15e141c1e9a2616e2dcea7670ee
parentceee35e5674aa84cf9e504c2a9dae4587511556c
bnxt_en: Don't assume XDP is never enabled in bnxt_init_dflt_ring_mode()

The original code made the assumption that when we set up the initial
default ring mode, we must be just loading the driver and XDP cannot
be enabled yet.  This is not true when the FW goes through a resource
or capability change.  Resource reservations will be cancelled and
reinitialized with XDP already enabled.  devlink reload with XDP enabled
will also have the same issue.  This scenario will cause the ring
arithmetic to be all wrong in the bnxt_init_dflt_ring_mode() path
causing failure:

bnxt_en 0000:a1:00.0 ens2f0np0: bnxt_setup_int_mode err: ffffffea
bnxt_en 0000:a1:00.0 ens2f0np0: bnxt_request_irq err: ffffffea
bnxt_en 0000:a1:00.0 ens2f0np0: nic open fail (rc: ffffffea)

Fix it by properly accounting for XDP in the bnxt_init_dflt_ring_mode()
path by using the refactored helper functions in the previous patch.

Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Fixes: ec5d31e3c15d ("bnxt_en: Handle firmware reset status during IF_UP.")
Fixes: 228ea8c187d8 ("bnxt_en: implement devlink dev reload driver_reinit")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20260331065138.948205-3-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c