summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amazon/ena/ena_netdev.c
diff options
context:
space:
mode:
authorArthur Kiyanovski <akiyano@amazon.com>2018-10-11 11:26:22 +0300
committerDavid S. Miller <davem@davemloft.net>2018-10-11 10:13:51 -0700
commitbd791175a6432d24fc5d7b348304276027372545 (patch)
tree008ef753cd63e8d21011e16f7c3826cbbe92c156 /drivers/net/ethernet/amazon/ena/ena_netdev.c
parentcb36bb36e1f17d2a7b9a9751e5cfec4235b46c93 (diff)
downloadblackbird-obmc-linux-bd791175a6432d24fc5d7b348304276027372545.tar.gz
blackbird-obmc-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.
*/
OpenPOWER on IntegriCloud