diff options
author | Shannon Nelson <shannon.nelson@amd.com> | 2023-12-11 19:57:59 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-13 13:35:55 +0100 |
commit | ca5fdf9a7c5b65968c718f2be159cda4c13556a1 (patch) | |
tree | 8a942a67a08c6b3b8718ae4edec19931348fe269 /drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | |
parent | ionic: keep filters across FLR (diff) | |
download | linux-ca5fdf9a7c5b65968c718f2be159cda4c13556a1.tar.xz linux-ca5fdf9a7c5b65968c718f2be159cda4c13556a1.zip |
ionic: bypass firmware cmds when stuck in reset
If the driver or firmware is stuck in reset state, don't bother
trying to use adminq commands. This speeds up shutdown and
prevents unnecessary timeouts and error messages.
This includes a bit of rework on ionic_adminq_post_wait()
and ionic_adminq_post_wait_nomsg() to both use
__ionic_adminq_post_wait() which can do the checks needed in
both cases.
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 | 4 |
1 files changed, 4 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 43e7967ad1c5..f69178b9636f 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -392,6 +392,10 @@ static void ionic_remove(struct pci_dev *pdev) del_timer_sync(&ionic->watchdog_timer); if (ionic->lif) { + /* prevent adminq cmds if already known as down */ + if (test_and_clear_bit(IONIC_LIF_F_FW_RESET, ionic->lif->state)) + set_bit(IONIC_LIF_F_FW_STOPPING, ionic->lif->state); + ionic_lif_unregister(ionic->lif); ionic_devlink_unregister(ionic); ionic_lif_deinit(ionic->lif); |