diff options
author | Pavan Chebbi <pavan.chebbi@broadcom.com> | 2020-08-26 07:08:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-26 16:19:03 +0200 |
commit | c1c2d77408022a398a1a7c51cf20488c922629de (patch) | |
tree | 38535f2d28226bd8e2e094da78d7b89012361a76 /drivers/net/ethernet/broadcom | |
parent | net: dp83869: Fix RGMII internal delay configuration (diff) | |
download | linux-c1c2d77408022a398a1a7c51cf20488c922629de.tar.xz linux-c1c2d77408022a398a1a7c51cf20488c922629de.zip |
bnxt_en: Don't query FW when netif_running() is false.
In rare conditions like two stage OS installation, the
ethtool's get_channels function may be called when the
device is in D3 state, leading to uncorrectable PCI error.
Check netif_running() first before making any query to FW
which involves writing to BAR.
Fixes: db4723b3cd2d ("bnxt_en: Check max_tx_scheduler_inputs value from firmware.")
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 64da654f1038..3890c1aaeed6 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -806,7 +806,7 @@ static void bnxt_get_channels(struct net_device *dev, int max_tx_sch_inputs; /* Get the most up-to-date max_tx_sch_inputs. */ - if (BNXT_NEW_RM(bp)) + if (netif_running(dev) && BNXT_NEW_RM(bp)) bnxt_hwrm_func_resc_qcaps(bp, false); max_tx_sch_inputs = hw_resc->max_tx_sch_inputs; |