Skip to content

Commit dfdde13

Browse files
akiyanodavem330
authored andcommitted
net: ena: fix continuous keep-alive resets
last_keep_alive_jiffies is updated in probe and when a keep-alive event is received. In case the driver times-out on a keep-alive event, it has high chances of continuously timing-out on keep-alive events. This is because when the driver recovers from the keep-alive-timeout reset the value of last_keep_alive_jiffies is very old, and if a keep-alive event is not received before the next timer expires, the value of last_keep_alive_jiffies will cause another keep-alive-timeout reset and so forth in a loop. Solution: Update last_keep_alive_jiffies whenever the device is restored after reset. Fixes: 1738cd3 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Noam Dagan <[email protected]> Signed-off-by: Arthur Kiyanovski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 30623e1 commit dfdde13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/amazon/ena/ena_netdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3486,6 +3486,7 @@ static int ena_restore_device(struct ena_adapter *adapter)
34863486
netif_carrier_on(adapter->netdev);
34873487

34883488
mod_timer(&adapter->timer_service, round_jiffies(jiffies + HZ));
3489+
adapter->last_keep_alive_jiffies = jiffies;
34893490
dev_err(&pdev->dev,
34903491
"Device reset completed successfully, Driver info: %s\n",
34913492
version);

0 commit comments

Comments
 (0)