diff options
author | Shannon Nelson <shannon.nelson@amd.com> | 2023-12-11 10:58:01 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-13 12:35:55 +0000 |
commit | 219e183272b4a566650a37264aff90a8c613d9b5 (patch) | |
tree | 5da083b09b4dc768a0a675273f52396c8b78eba0 /drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | |
parent | 13943d6c82730a2a4e40e05d6deaca26a8de0a4d (diff) |
ionic: no fw read when PCI reset failed
If there was a failed attempt to reset the PCI connection,
don't later try to read from PCI as the space is unmapped
and will cause a paging request crash. When clearing the PCI
setup we can clear the dev_info register pointer, and check
it before using it in the fw_running test.
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index da951dc7becb..311d9f4ef0e2 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -215,6 +215,11 @@ out: static void ionic_clear_pci(struct ionic *ionic) { + ionic->idev.dev_info_regs = NULL; + ionic->idev.dev_cmd_regs = NULL; + ionic->idev.intr_status = NULL; + ionic->idev.intr_ctrl = NULL; + ionic_unmap_bars(ionic); pci_release_regions(ionic->pdev); |