netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/3] igb: Add igb_disable_sriov in error handling
@ 2014-12-23  7:17 Jia-Ju Bai
  2014-12-23  7:17 ` [PATCH v3 2/3] igb: Add pci_disable_pcie_error_reporting " Jia-Ju Bai
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jia-Ju Bai @ 2014-12-23  7:17 UTC (permalink / raw)
  To: davem, sergei.shtylyov, jeffrey.t.kirsher, bruce.w.allan,
	jesse.brandeburg
  Cc: e1000-devel, netdev, Jia-Ju Bai, linux.nics

For linux-3.18.0
The driver lacks igb_disable_sriov in error handling,
which should match igb_enable_sriov in igb_probe.
This patch fixes this problem, and it has been tested in runtime.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 487cd9c..91914e4 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -179,6 +179,7 @@ static void igb_check_vf_rate_limit(struct igb_adapter *);
 #ifdef CONFIG_PCI_IOV
 static int igb_vf_configure(struct igb_adapter *adapter, int vf);
 static int igb_pci_enable_sriov(struct pci_dev *dev, int num_vfs);
+static int igb_disable_sriov(struct pci_dev *pdev);
 #endif
 
 #ifdef CONFIG_PM
@@ -2653,6 +2654,9 @@ err_register:
 	igb_release_hw_control(adapter);
 	memset(&adapter->i2c_adap, 0, sizeof(adapter->i2c_adap));
 err_eeprom:
+#ifdef CONFIG_PCI_IOV
+	igb_disable_sriov(pdev);
+#endif
 	if (!igb_check_reset_block(hw))
 		igb_reset_phy(hw);
 
-- 
1.7.9.5



------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-23 15:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23  7:17 [PATCH v3 1/3] igb: Add igb_disable_sriov in error handling Jia-Ju Bai
2014-12-23  7:17 ` [PATCH v3 2/3] igb: Add pci_disable_pcie_error_reporting " Jia-Ju Bai
2014-12-23  7:17 ` [PATCH v3 3/3] igb: Fix a memory leak in igb_probe Jia-Ju Bai
2014-12-23  7:29   ` Varka Bhadram
2014-12-23 11:23 ` [PATCH v3 1/3] igb: Add igb_disable_sriov in error handling Sergei Shtylyov
2014-12-23 13:22   ` Jia-Ju Bai
2014-12-23 14:03     ` Jeff Kirsher
2014-12-23 15:06       ` Jia-Ju Bai

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).