aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2010-07-01 09:38:40 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-02 01:45:56 -0400
commitc0f2276f3601a96b29d4347c5938e9494e8e4e5d (patch)
treef2e79edf070750d4b4e02bcd8f567ef196775c65 /drivers/net/igb
parent5fa8517f038d51d571981fb495206cc30ed91b06 (diff)
igb: Fix Tx hangs seen when loading igb with max_vfs > 7.
Check the value of max_vfs at the time of assignment of vfs_allocated_count. The previous check in igb_probe_vfs was too late as by that time the rx/tx rings were initialized with the wrong offset. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r--drivers/net/igb/igb_main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index e79689eeb1fe..d811462ab9b6 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2091,9 +2091,6 @@ static void __devinit igb_probe_vfs(struct igb_adapter * adapter)
2091#ifdef CONFIG_PCI_IOV 2091#ifdef CONFIG_PCI_IOV
2092 struct pci_dev *pdev = adapter->pdev; 2092 struct pci_dev *pdev = adapter->pdev;
2093 2093
2094 if (adapter->vfs_allocated_count > 7)
2095 adapter->vfs_allocated_count = 7;
2096
2097 if (adapter->vfs_allocated_count) { 2094 if (adapter->vfs_allocated_count) {
2098 adapter->vf_data = kcalloc(adapter->vfs_allocated_count, 2095 adapter->vf_data = kcalloc(adapter->vfs_allocated_count,
2099 sizeof(struct vf_data_storage), 2096 sizeof(struct vf_data_storage),
@@ -2258,7 +2255,7 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
2258 2255
2259#ifdef CONFIG_PCI_IOV 2256#ifdef CONFIG_PCI_IOV
2260 if (hw->mac.type == e1000_82576) 2257 if (hw->mac.type == e1000_82576)
2261 adapter->vfs_allocated_count = max_vfs; 2258 adapter->vfs_allocated_count = (max_vfs > 7) ? 7 : max_vfs;
2262 2259
2263#endif /* CONFIG_PCI_IOV */ 2260#endif /* CONFIG_PCI_IOV */
2264 adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus()); 2261 adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus());