From: Aaron Brown <aaron.f.brown@intel.com>
To: davem@davemloft.net
Cc: Mitch Williams <mitch.a.williams@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Aaron Brown <aaron.f.brown@intel.com>
Subject: [net-next 10/15] i40e: don't handle VF reset on unload
Date: Thu, 13 Feb 2014 03:48:48 -0800 [thread overview]
Message-ID: <1392292133-32120-11-git-send-email-aaron.f.brown@intel.com> (raw)
In-Reply-To: <1392292133-32120-1-git-send-email-aaron.f.brown@intel.com>
From: Mitch Williams <mitch.a.williams@intel.com>
Set the DOWN flag before attempting to disable VFs when unloading the
driver. Also, don't attempt to reset the VFs when the driver is
unloading, because the switch configuration will fail. This fixes a
panic on unload when VFs are enabled.
Change-ID: I25a6567e89c9687145f510ff4f630932412c5c5d
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 10 +++++-----
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 ++-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 897452d..628e917 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8181,16 +8181,16 @@ static void i40e_remove(struct pci_dev *pdev)
i40e_ptp_stop(pf);
- if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
- i40e_free_vfs(pf);
- pf->flags &= ~I40E_FLAG_SRIOV_ENABLED;
- }
-
/* no more scheduling of any task */
set_bit(__I40E_DOWN, &pf->state);
del_timer_sync(&pf->service_timer);
cancel_work_sync(&pf->service_task);
+ if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
+ i40e_free_vfs(pf);
+ pf->flags &= ~I40E_FLAG_SRIOV_ENABLED;
+ }
+
i40e_fdir_teardown(pf);
/* If there is a switch structure or any orphans, remove them.
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 9074f63..7d133fa 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1868,7 +1868,8 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf)
/* clear the bit in GLGEN_VFLRSTAT */
wr32(hw, I40E_GLGEN_VFLRSTAT(reg_idx), (1 << bit_idx));
- i40e_reset_vf(vf, true);
+ if (!test_bit(__I40E_DOWN, &pf->state))
+ i40e_reset_vf(vf, true);
}
}
--
1.8.5.GIT
next prev parent reply other threads:[~2014-02-13 11:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-13 11:48 [net-next 00/15] Intel Wired LAN Driver Updates Aaron Brown
2014-02-13 11:48 ` [net-next 01/15] i40e: spelling error Aaron Brown
2014-02-13 11:48 ` [net-next 02/15] i40e: bump driver version Aaron Brown
2014-02-13 11:48 ` [net-next 03/15] i40evf: trivial fixes Aaron Brown
2014-02-13 11:48 ` [net-next 04/15] i40evf: clean up memsets Aaron Brown
2014-02-13 11:48 ` [net-next 05/15] i40e: Setting i40e_down bit for tx_timeout Aaron Brown
2014-02-13 11:48 ` [net-next 06/15] i40e: remove dead code Aaron Brown
2014-02-13 11:48 ` [net-next 07/15] i40e: set VF state to active when reset is complete Aaron Brown
2014-02-13 11:48 ` [net-next 08/15] i40e: reset VFs after PF reset Aaron Brown
2014-02-13 11:48 ` [net-next 09/15] i40e: enable extant VFs Aaron Brown
2014-02-13 11:48 ` Aaron Brown [this message]
2014-02-13 11:48 ` [net-next 11/15] i40evf: clean up adapter struct Aaron Brown
2014-02-13 11:48 ` [net-next 12/15] i40evf: fix bogus comment Aaron Brown
2014-02-13 11:48 ` [net-next 13/15] i40evf: don't store unnecessary array of strings Aaron Brown
2014-02-13 11:48 ` [net-next 14/15] i40evf: change type of flags variable Aaron Brown
2014-02-13 11:48 ` [net-next 15/15] i40evf: refactor reset handling Aaron Brown
2014-02-13 22:27 ` [net-next 00/15] Intel Wired LAN Driver Updates 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=1392292133-32120-11-git-send-email-aaron.f.brown@intel.com \
--to=aaron.f.brown@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=mitch.a.williams@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).