]> 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)
commit7efc0cf22393ceb6e6489012055af1863c604063
tree137f7b1dbea97f5f4c5a480513c3208b2544b89d
parent76e615b75497c756b7ae469a386d5d9aa6998bca
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: a9ff322f7b57 ("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