]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Avoid disabling pci device in bnxt_remove_one() for already disabled device.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 21 Oct 2019 05:34:29 +0000 (01:34 -0400)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 22 Oct 2019 20:15:39 +0000 (13:15 -0700)
commit96c781fd990cd4383a39ee6d7f83536533fccb3d
tree40c45b50e3e9a20f8ffd780f64f64deefc6cef1a
parentd0616fe6b85c4932338134eaa3cfde15e70a3494
bnxt_en: Avoid disabling pci device in bnxt_remove_one() for already disabled device.

With the recently added error recovery logic, the device may already
be disabled if the firmware recovery is unsuccessful.  In
bnxt_remove_one(), check that the device is still enabled first
before calling pci_disable_device().

Fixes: 81e6a17edf01 ("bnxt_en: Add BNXT_STATE_IN_FW_RESET state.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c