git: 4fbb63f289ed - main - if_bnxt: drop redundant PCI disable in bnxt_fw_reset_close()

From: Sumit Saxena <ssaxena_at_FreeBSD.org>
Date: Fri, 09 Oct 2026 10:12:55 UTC
The branch main has been updated by ssaxena:

URL: https://cgit.FreeBSD.org/src/commit/?id=4fbb63f289ed6a06e715c6882e8fff3201381743

commit 4fbb63f289ed6a06e715c6882e8fff3201381743
Author:     Sumit Saxena <sumit.saxena@broadcom.com>
AuthorDate: 2026-08-01 09:07:47 +0000
Commit:     Sumit Saxena <ssaxena@FreeBSD.org>
CommitDate: 2026-10-09 08:24:45 +0000

    if_bnxt: drop redundant PCI disable in bnxt_fw_reset_close()
    
    bnxt_fw_reset_close() unconditionally called pci_disable_device()
    after freeing the Rx IRQs, on every firmware reset, not just the
    BNXT_STATE_FW_FATAL_COND path which already disables the device via
    bnxt_fw_fatal_close(). BNXT_FW_RESET_STATE_ENABLE_DEV in
    bnxt_fw_reset_task() already re-enables the device unconditionally,
    so this wasn't leaving the device disabled, just adding an
    unnecessary PCI disable/re-enable cycle around every non-fatal reset.
    
    Reviewed by:    gallatin
    MFC after:      2 weeks
    Sponsored by:   Broadcom Inc.
    Differential Revision:  https://reviews.freebsd.org/D58619
---
 sys/dev/bnxt/bnxt_en/if_bnxt.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c
index 2129c0ff51b0..0c0f896f2c12 100644
--- a/sys/dev/bnxt/bnxt_en/if_bnxt.c
+++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c
@@ -1985,8 +1985,6 @@ static void bnxt_fw_reset_close(struct bnxt_softc *bp)
 			iflib_irq_free(bp->ctx, &bp->rx_cp_rings[i].irq);
 
 	}
-	if (pci_is_enabled(bp->pdev))
-		pci_disable_device(bp->pdev);
 	bnxt_ktls_del_all(bp);
 	pci_disable_busmaster(bp->dev);
 	bnxt_clear_ktls(bp);