]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
bnxt_en: Improve device shutdown method.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Thu, 20 Feb 2020 22:26:34 +0000 (17:26 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:45:02 +0000 (16:45 +0100)
[ Upstream commit 5567ae4a8d569d996d0d88d0eceb76205e4c7ce5 ]

Especially when bnxt_shutdown() is called during kexec, we need to
disable MSIX and disable Bus Master to completely quiesce the device.
Make these 2 calls unconditionally in the shutdown method.

Fixes: c20dc142dd7b ("bnxt_en: Disable bus master during PCI shutdown and driver unload.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 9d62200b6c3356e43144abf31a1e8a3c82f33b62..1a90118370ea171759ef5efe5db64d8b216e8e38 100644 (file)
@@ -11972,10 +11972,10 @@ static void bnxt_shutdown(struct pci_dev *pdev)
                dev_close(dev);
 
        bnxt_ulp_shutdown(bp);
+       bnxt_clear_int_mode(bp);
+       pci_disable_device(pdev);
 
        if (system_state == SYSTEM_POWER_OFF) {
-               bnxt_clear_int_mode(bp);
-               pci_disable_device(pdev);
                pci_wake_from_d3(pdev, bp->wol);
                pci_set_power_state(pdev, PCI_D3hot);
        }