[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1419319024-30455-1-git-send-email-baijiaju1990@163.com>
Date: Tue, 23 Dec 2014 15:17:02 +0800
From: Jia-Ju Bai <baijiaju1990@....com>
To: davem@...emloft.net, sergei.shtylyov@...entembedded.com,
jeffrey.t.kirsher@...el.com, bruce.w.allan@...el.com,
jesse.brandeburg@...el.com
Cc: linux.nics@...el.com, e1000-devel@...ts.sourceforge.net,
netdev@...r.kernel.org, Jia-Ju Bai <baijiaju1990@....com>
Subject: [PATCH v3 1/3] igb: Add igb_disable_sriov in error handling
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@....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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists