From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next 06/15] iavf: disable interrupts before disabling napi
Date: Fri, 4 Jun 2021 09:53:26 -0700 [thread overview]
Message-ID: <20210604165335.33329-6-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210604165335.33329-1-anthony.l.nguyen@intel.com>
From: Nicholas Nunley <nicholas.d.nunley@intel.com>
Interrupts should be turned off first before disabling napi, not the other
way around, since the interrupt handler can schedule napi.
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/iavf/iavf_main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index eda8ebb8e7b8..1904000943dc 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -970,8 +970,8 @@ void iavf_down(struct iavf_adapter *adapter)
netif_carrier_off(netdev);
netif_tx_disable(netdev);
adapter->link_up = false;
- iavf_napi_disable_all(adapter);
iavf_irq_disable(adapter);
+ iavf_napi_disable_all(adapter);
spin_lock_bh(&adapter->mac_vlan_list_lock);
@@ -2040,8 +2040,8 @@ static void iavf_disable_vf(struct iavf_adapter *adapter)
netif_carrier_off(adapter->netdev);
netif_tx_disable(adapter->netdev);
adapter->link_up = false;
- iavf_napi_disable_all(adapter);
iavf_irq_disable(adapter);
+ iavf_napi_disable_all(adapter);
iavf_free_traffic_irqs(adapter);
iavf_free_all_tx_resources(adapter);
iavf_free_all_rx_resources(adapter);
@@ -2171,6 +2171,8 @@ static void iavf_reset_task(struct work_struct *work)
}
continue_reset:
+ iavf_irq_disable(adapter);
+
/* We don't use netif_running() because it may be true prior to
* ndo_open() returning, so we can't assume it means all our open
* tasks have finished, since we're not holding the rtnl_lock here.
@@ -2182,7 +2184,6 @@ static void iavf_reset_task(struct work_struct *work)
adapter->link_up = false;
iavf_napi_disable_all(adapter);
}
- iavf_irq_disable(adapter);
adapter->state = __IAVF_RESETTING;
adapter->flags &= ~IAVF_FLAG_RESET_PENDING;
--
2.20.1
next prev parent reply other threads:[~2021-06-04 16:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 16:53 [Intel-wired-lan] [PATCH net-next 01/15] iavf: correctly track whether the interface is running during resets Tony Nguyen
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 02/15] iavf: obtain the crit_section lock in iavf_open() immediately Tony Nguyen
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 03/15] iavf: obtain crit_section lock in iavf_close() immediately Tony Nguyen
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 04/15] iavf: wrap driver state change in crit_section lock Tony Nguyen
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 05/15] iavf: untangle any pending iavf_open() operations from iavf_close() Tony Nguyen
2021-06-10 6:14 ` Stefan Assmann
2021-06-04 16:53 ` Tony Nguyen [this message]
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 07/15] iavf: Restore non MAC filters after link down Tony Nguyen
2021-11-02 16:36 ` Kuruvinakunnel, George
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 08/15] iavf: restore MSI state on reset Tony Nguyen
2021-11-03 19:41 ` Kuruvinakunnel, George
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 09/15] iavf: Fix carrier on state Tony Nguyen
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 10/15] iavf: Add change MTU message Tony Nguyen
2021-11-02 0:34 ` Kuruvinakunnel, George
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 11/15] iavf: Prevent changing static ITR values if adaptive moderation is on Tony Nguyen
2021-11-02 0:21 ` Kuruvinakunnel, George
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 12/15] iavf: Log info when VF is entering and leaving Allmulti mode Tony Nguyen
2021-11-02 0:47 ` Kuruvinakunnel, George
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 13/15] iavf: Set RSS LUT and key in reset handle path Tony Nguyen
2021-08-06 7:26 ` Jankowski, Konrad0
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 14/15] iavf: return errno code instead of status code Tony Nguyen
2021-11-17 10:27 ` Jankowski, Konrad0
2021-06-04 16:53 ` [Intel-wired-lan] [PATCH net-next 15/15] iavf: don't be so alarming Tony Nguyen
2021-11-03 19:45 ` Kuruvinakunnel, George
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=20210604165335.33329-6-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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