From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Alex Williamson <alex.williamson@redhat.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 02/18] ixgbe: Teardown SR-IOV before unregister_netdev()
Date: Tue, 15 Sep 2015 17:36:27 -0700 [thread overview]
Message-ID: <1442363803-47237-3-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1442363803-47237-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alex Williamson <alex.williamson@redhat.com>
When the .remove() callback for a PF is called, SR-IOV support for the
device is disabled, which requires unbinding and removing the VFs.
The VFs may be in-use either by the host kernel or userspace, such as
assigned to a VM through vfio-pci. In this latter case, the VFs may
be removed either by shutting down the VM or hot-unplugging the
devices from the VM. Unfortunately in the case of a Windows 2012 R2
guest, hot-unplug is broken due to the ordering of the PF driver
teardown. Disabling SR-IOV prior to unregister_netdev() avoids this
issue.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index b9267e2..c04480e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -9028,12 +9028,12 @@ static void ixgbe_remove(struct pci_dev *pdev)
/* remove the added san mac */
ixgbe_del_sanmac_netdev(netdev);
- if (netdev->reg_state == NETREG_REGISTERED)
- unregister_netdev(netdev);
-
#ifdef CONFIG_PCI_IOV
ixgbe_disable_sriov(adapter);
#endif
+ if (netdev->reg_state == NETREG_REGISTERED)
+ unregister_netdev(netdev);
+
ixgbe_clear_interrupt_scheme(adapter);
ixgbe_release_hw_control(adapter);
--
2.4.3
next prev parent reply other threads:[~2015-09-16 0:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 0:36 [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-09-15 Jeff Kirsher
2015-09-16 0:36 ` [net-next 01/18] ixgbe: fix issue with SFP events with new X550 devices Jeff Kirsher
2015-09-16 0:36 ` Jeff Kirsher [this message]
2015-09-16 0:36 ` [net-next 03/18] ixgbe: Limit lowest interrupt rate for adaptive interrupt moderation to 12K Jeff Kirsher
2015-09-16 0:36 ` [net-next 04/18] fm10k: disable service task during suspend Jeff Kirsher
2015-09-16 0:36 ` [net-next 05/18] fm10k: only prevent removal of default VID rules Jeff Kirsher
2015-09-16 0:36 ` [net-next 06/18] fm10k: update fm10k_slot_warn to use pcie_get_minimum link Jeff Kirsher
2015-09-16 0:36 ` [net-next 07/18] fm10k: update netdev perm_addr during reinit, instead of at up Jeff Kirsher
2015-09-16 0:36 ` [net-next 08/18] fm10k: Don't assume page fragments are page size Jeff Kirsher
2015-09-16 0:36 ` [net-next 09/18] fm10k: Report MAC address on driver load Jeff Kirsher
2015-09-16 0:36 ` [net-next 10/18] fm10k: allow creation of VLAN interfaces even while down Jeff Kirsher
2015-09-16 0:36 ` [net-next 11/18] fm10k: don't store sw_vid at reset Jeff Kirsher
2015-09-16 0:36 ` [net-next 12/18] fm10k: remove is_slot_appropriate Jeff Kirsher
2015-09-16 0:36 ` [net-next 13/18] fm10k: TRIVIAL fix up ordering of __always_unused and style Jeff Kirsher
2015-09-16 0:36 ` [net-next 14/18] fm10k: send traffic on default VID to VLAN device if we have one Jeff Kirsher
2015-09-16 0:36 ` [net-next 15/18] fm10k: TRIVIAL fix typo in fm10k_netdev.c Jeff Kirsher
2015-09-16 0:36 ` [net-next 16/18] fm10k: re-enable VF after a full reset on detection of a Malicious event Jeff Kirsher
2015-09-16 0:36 ` [net-next 17/18] fm10k: Only trigger data path reset if fabric is up Jeff Kirsher
2015-09-16 0:36 ` [net-next 18/18] fm10k: fix iov_msg_mac_vlan_pf VID checks Jeff Kirsher
2015-09-17 23:50 ` [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-09-15 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=1442363803-47237-3-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=alex.williamson@redhat.com \
--cc=davem@davemloft.net \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--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).