From: <sameehj@amazon•com>
To: <davem@davemloft•net>, <netdev@vger•kernel.org>
Cc: Sameeh Jubran <sameehj@amazon•com>, <dwmw@amazon•com>,
<zorik@amazon•com>, <matua@amazon•com>, <saeedb@amazon•com>,
<msw@amazon•com>, <aliguori@amazon•com>, <nafea@amazon•com>,
<gtzalik@amazon•com>, <netanel@amazon•com>, <alisaidi@amazon•com>,
<benh@amazon•com>, <akiyano@amazon•com>, <ndagan@amazon•com>,
Shay Agroskin <shayagr@amazon•com>
Subject: [PATCH V3 net-next 10/12] net: ena: use SHUTDOWN as reset reason when closing interface
Date: Sun, 3 May 2020 09:52:19 +0000 [thread overview]
Message-ID: <20200503095221.6408-11-sameehj@amazon.com> (raw)
In-Reply-To: <20200503095221.6408-1-sameehj@amazon.com>
From: Sameeh Jubran <sameehj@amazon•com>
The 'ENA_REGS_RESET_SHUTDOWN' enum indicates a normal driver
shutdown / removal procedure.
Also, a comment is added to one of the reset reason assignments for
code clarity.
Signed-off-by: Shay Agroskin <shayagr@amazon•com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon•com>
Signed-off-by: Sameeh Jubran <sameehj@amazon•com>
---
drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 517681319a57..2818965427e9 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -3439,6 +3439,7 @@ static void ena_destroy_device(struct ena_adapter *adapter, bool graceful)
ena_com_mmio_reg_read_request_destroy(ena_dev);
+ /* return reset reason to default value */
adapter->reset_reason = ENA_REGS_RESET_NORMAL;
clear_bit(ENA_FLAG_TRIGGER_RESET, &adapter->flags);
@@ -4362,6 +4363,7 @@ static void __ena_shutoff(struct pci_dev *pdev, bool shutdown)
cancel_work_sync(&adapter->reset_task);
rtnl_lock(); /* lock released inside the below if-else block */
+ adapter->reset_reason = ENA_REGS_RESET_SHUTDOWN;
ena_destroy_device(adapter, true);
if (shutdown) {
netif_device_detach(netdev);
--
2.24.1.AMZN
next prev parent reply other threads:[~2020-05-03 9:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-03 9:52 [PATCH V3 net-next 00/12] Enhance current features in ena driver sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 01/12] net: ena: avoid unnecessary admin command when RSS function set fails sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 02/12] net: ena: fix error returning in ena_com_get_hash_function() sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 03/12] net: ena: allow setting the hash function without changing the key sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 04/12] net: ena: change default RSS hash function to Toeplitz sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 05/12] net: ena: changes to RSS hash key allocation sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 06/12] net: ena: remove code that does nothing sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 07/12] net: ena: add unmask interrupts statistics to ethtool sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 08/12] net: ena: add support for reporting of packet drops sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 09/12] net: ena: drop superfluous prototype sameehj
2020-05-03 9:52 ` sameehj [this message]
2020-05-03 9:52 ` [PATCH V3 net-next 11/12] net: ena: cosmetic: remove unnecessary spaces and tabs in ena_com.h macros sameehj
2020-05-03 9:52 ` [PATCH V3 net-next 12/12] net: ena: cosmetic: extract code to ena_indirection_table_set() sameehj
2020-05-03 23:01 ` [PATCH V3 net-next 00/12] Enhance current features in ena driver David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200503095221.6408-11-sameehj@amazon.com \
--to=sameehj@amazon$(echo .)com \
--cc=akiyano@amazon$(echo .)com \
--cc=aliguori@amazon$(echo .)com \
--cc=alisaidi@amazon$(echo .)com \
--cc=benh@amazon$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dwmw@amazon$(echo .)com \
--cc=gtzalik@amazon$(echo .)com \
--cc=matua@amazon$(echo .)com \
--cc=msw@amazon$(echo .)com \
--cc=nafea@amazon$(echo .)com \
--cc=ndagan@amazon$(echo .)com \
--cc=netanel@amazon$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=saeedb@amazon$(echo .)com \
--cc=shayagr@amazon$(echo .)com \
--cc=zorik@amazon$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox