Skip to content

Commit 3a2656a

Browse files
drchristensendavem330
authored andcommitted
tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes
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 <[email protected]> Reviewed-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4c98045 commit 3a2656a

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+2
-2
lines changed

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18168,8 +18168,8 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
1816818168

1816918169
rtnl_lock();
1817018170

18171-
/* We probably don't have netdev yet */
18172-
if (!netdev || !netif_running(netdev))
18171+
/* Could be second call or maybe we don't have netdev yet */
18172+
if (!netdev || tp->pcierr_recovery || !netif_running(netdev))
1817318173
goto done;
1817418174

1817518175
/* We needn't recover from permanent error */

0 commit comments

Comments
 (0)