]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Re-write PCI BARs after PCI fatal error.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 26 Oct 2020 04:18:19 +0000 (00:18 -0400)
committerJakub Kicinski <kuba@kernel.org>
Tue, 27 Oct 2020 01:26:35 +0000 (18:26 -0700)
commitaca4ceb566bce023838860ad9d795703f8bbd203
tree137f7b1dbea97f5f4c5a480513c3208b2544b89d
parent9154f9139d5cd6f7f7d2c452343fb145465f8a60
bnxt_en: Re-write PCI BARs after PCI fatal error.

When a PCIe fatal error occurs, the internal latched BAR addresses
in the chip get reset even though the BAR register values in config
space are retained.

pci_restore_state() will not rewrite the BAR addresses if the
BAR address values are valid, causing the chip's internal BAR addresses
to stay invalid.  So we need to zero the BAR registers during PCIe fatal
error to force pci_restore_state() to restore the BAR addresses.  These
write cycles to the BAR registers will cause the proper BAR addresses to
latch internally.

Fixes: d71693f4506f ("bnxt_en: Enable AER support.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h