summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amazon/ena/ena_netdev.c
diff options
context:
space:
mode:
authorArthur Kiyanovski2018-10-11 10:26:22 +0200
committerDavid S. Miller2018-10-11 19:13:51 +0200
commitbd791175a6432d24fc5d7b348304276027372545 (patch)
tree008ef753cd63e8d21011e16f7c3826cbbe92c156 /drivers/net/ethernet/amazon/ena/ena_netdev.c
parentnet: ena: use CSUM_CHECKED device indication to report skb's checksum status (diff)
downloadkernel-qcow2-linux-bd791175a6432d24fc5d7b348304276027372545.tar.gz
kernel-qcow2-linux-bd791175a6432d24fc5d7b348304276027372545.tar.xz
kernel-qcow2-linux-bd791175a6432d24fc5d7b348304276027372545.zip
net: ena: explicit casting and initialization, and clearer error handling
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amazon/ena/ena_netdev.c')
-rw-r--r--drivers/net/ethernet/amazon/ena/ena_netdev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index eea05847d185..9927a5b76d7d 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -2599,15 +2599,14 @@ static void ena_destroy_device(struct ena_adapter *adapter, bool graceful)
dev_up = test_bit(ENA_FLAG_DEV_UP, &adapter->flags);
adapter->dev_up_before_reset = dev_up;
-
if (!graceful)
ena_com_set_admin_running_state(ena_dev, false);
if (test_bit(ENA_FLAG_DEV_UP, &adapter->flags))
ena_down(adapter);
- /* Before releasing the ENA resources, a device reset is required.
- * (to prevent the device from accessing them).
+ /* Stop the device from sending AENQ events (in case reset flag is set
+ * and device is up, ena_close already reset the device
* In case the reset flag is set and the device is up, ena_down()
* already perform the reset, so it can be skipped.
*/