Commit f5070cbf authored by David Christensen's avatar David Christensen Committed by Kelsey Skunberg

tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes

BugLink: https://bugs.launchpad.net/bugs/1885932

[ Upstream commit 3a2656a2 ]

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: default avatarDavid Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 456c1017
...@@ -18183,8 +18183,8 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev, ...@@ -18183,8 +18183,8 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
rtnl_lock(); rtnl_lock();
/* We probably don't have netdev yet */ /* Could be second call or maybe we don't have netdev yet */
if (!netdev || !netif_running(netdev)) if (!netdev || tp->pcierr_recovery || !netif_running(netdev))
goto done; goto done;
/* We needn't recover from permanent error */ /* We needn't recover from permanent error */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment