diff options
author | Mark Brown <broonie@kernel.org> | 2024-03-13 18:22:15 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-03-13 18:22:15 +0000 |
commit | e25293d9d92cce24aa4ca21b90064661fe4d3fcf (patch) | |
tree | 50f45e19a3e397db28b6681d9bf3975f3c6dee8e /drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | |
parent | 23fb6bc2696119391ec3a92ccaffe50e567c515e (diff) | |
parent | e8f897f4afef0031fe618a8e94127a0934896aba (diff) | |
download | linux-stable-e25293d9d92cce24aa4ca21b90064661fe4d3fcf.tar.gz linux-stable-e25293d9d92cce24aa4ca21b90064661fe4d3fcf.tar.bz2 linux-stable-e25293d9d92cce24aa4ca21b90064661fe4d3fcf.zip |
ASoC: Merge up release
In order to apply additional fixes that depend on the fixes merged for
v6.8 merge up the final release.
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index c49aa358e424..6ba8d4aca0a0 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -93,6 +93,7 @@ static void ionic_unmap_bars(struct ionic *ionic) bars[i].len = 0; } } + ionic->num_bars = 0; } void __iomem *ionic_bus_map_dbpage(struct ionic *ionic, int page_num) @@ -215,15 +216,17 @@ 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); + if (ionic->num_bars) { + 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); + } - if (atomic_read(&ionic->pdev->enable_cnt) > 0) + if (pci_is_enabled(ionic->pdev)) pci_disable_device(ionic->pdev); } |