]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: don't disable an already disabled PCI device
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Sun, 18 Jul 2021 19:36:25 +0000 (15:36 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Jul 2021 15:25:43 +0000 (08:25 -0700)
commitba6022d679389d2ea1835d5ac78ea06d28800176
tree75d732652c5cdbda72df2ed83a5db37aebbcd0f4
parent70287d8126595fe65b0070c6fee8bd725ecbd682
bnxt_en: don't disable an already disabled PCI device

If device is already disabled in reset path and PCI io error is
detected before the device could be enabled, driver could
call pci_disable_device() for already disabled device. Fix this
problem by calling pci_disable_device() only if the device is already
enabled.

Fixes: d71693f4506f ("bnxt_en: Enable AER support.")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c