• Arthur Kiyanovski's avatar
    net: ena: fix continuous keep-alive resets · dfdde134
    Arthur Kiyanovski authored
    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: 1738cd3e ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
    Signed-off-by: default avatarNoam Dagan <ndagan@amazon.com>
    Signed-off-by: default avatarArthur Kiyanovski <akiyano@amazon.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    dfdde134
ena_netdev.c 121 KB