net: ena: bug fix in lost tx packets detection mechanism
authorNetanel Belgazal <netanel@amazon.com>
Sun, 11 Jun 2017 12:42:50 +0000 (15:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Jun 2017 20:36:47 +0000 (16:36 -0400)
commit800c55cb76be6617232ef50a2be29830f3aa8e5c
treef2a28423c46dd35b18beef1aa5feacd88c00a854
parenta2cc5198dac102775b21787752a2e0afe44ad311
net: ena: bug fix in lost tx packets detection mechanism

check_for_missing_tx_completions() is called from a timer
task and looking for lost tx packets.
The old implementation accumulate all the lost tx packets
and did not check if those packets were retrieved on a later stage.
This cause to a situation where the driver reset
the device for no reason.

Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_ethtool.c
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_netdev.h