diff options
author | David Christensen <drc@linux.vnet.ibm.com> | 2020-06-17 21:51:17 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2020-07-01 06:17:05 +0300 |
commit | 000904251905e2b5a85bba3effdae1de2ac93535 (patch) | |
tree | 1dfe890266c8afa76c012ce0033d2cf209707ed1 /drivers | |
parent | bcf95ac62cb51d5e24be2ccaeab5fbf64da7f582 (diff) | |
download | linux-000904251905e2b5a85bba3effdae1de2ac93535.tar.xz |
tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes
[ Upstream commit 3a2656a211caf35e56afc9425e6e518fa52f7fbc ]
The driver function tg3_io_error_detected() calls napi_disable twice,
without an intervening napi_enable, when the number of EEH errors exceeds
eeh_max_freezes, resulting in an indefinite sleep while holding rtnl_lock.
Add check for pcierr_recovery which skips code already executed for the
"Frozen" state.
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index a12962702611..be845df05039 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -18229,8 +18229,8 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev, rtnl_lock(); - /* We probably don't have netdev yet */ - if (!netdev || !netif_running(netdev)) + /* Could be second call or maybe we don't have netdev yet */ + if (!netdev || tp->pcierr_recovery || !netif_running(netdev)) goto done; /* We needn't recover from permanent error */ |