diff options
author | Carolyn Wyborny <carolyn.wyborny@intel.com> | 2011-01-20 01:40:45 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-02-11 11:42:47 -0500 |
commit | 6b78bb1d46cfae6502826ec31a6e9f7222ab3cb4 (patch) | |
tree | 81bf2c11535f8706e05a1322b5af96246918b00c /drivers/net/igb | |
parent | 5962bc21ceaaba81e04fa1bb5671c65251805d3e (diff) |
igb: Enable PF side of SR-IOV support for i350 devices
This patch adds full support for SR-IOV by enabling the PF side.
VF side has already been committed.
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/e1000_82575.c | 10 | ||||
-rw-r--r-- | drivers/net/igb/e1000_mbx.c | 38 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 9 |
3 files changed, 33 insertions, 24 deletions
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c index c1552b6f4a68..65c1833244f7 100644 --- a/drivers/net/igb/e1000_82575.c +++ b/drivers/net/igb/e1000_82575.c | |||
@@ -238,9 +238,15 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) | |||
238 | size = 14; | 238 | size = 14; |
239 | nvm->word_size = 1 << size; | 239 | nvm->word_size = 1 << size; |
240 | 240 | ||
241 | /* if 82576 then initialize mailbox parameters */ | 241 | /* if part supports SR-IOV then initialize mailbox parameters */ |
242 | if (mac->type == e1000_82576) | 242 | switch (mac->type) { |
243 | case e1000_82576: | ||
244 | case e1000_i350: | ||
243 | igb_init_mbx_params_pf(hw); | 245 | igb_init_mbx_params_pf(hw); |
246 | break; | ||
247 | default: | ||
248 | break; | ||
249 | } | ||
244 | 250 | ||
245 | /* setup PHY parameters */ | 251 | /* setup PHY parameters */ |
246 | if (phy->media_type != e1000_media_type_copper) { | 252 | if (phy->media_type != e1000_media_type_copper) { |
diff --git a/drivers/net/igb/e1000_mbx.c b/drivers/net/igb/e1000_mbx.c index c474cdb70047..78d48c7fa859 100644 --- a/drivers/net/igb/e1000_mbx.c +++ b/drivers/net/igb/e1000_mbx.c | |||
@@ -422,26 +422,24 @@ s32 igb_init_mbx_params_pf(struct e1000_hw *hw) | |||
422 | { | 422 | { |
423 | struct e1000_mbx_info *mbx = &hw->mbx; | 423 | struct e1000_mbx_info *mbx = &hw->mbx; |
424 | 424 | ||
425 | if (hw->mac.type == e1000_82576) { | 425 | mbx->timeout = 0; |
426 | mbx->timeout = 0; | 426 | mbx->usec_delay = 0; |
427 | mbx->usec_delay = 0; | 427 | |
428 | 428 | mbx->size = E1000_VFMAILBOX_SIZE; | |
429 | mbx->size = E1000_VFMAILBOX_SIZE; | 429 | |
430 | 430 | mbx->ops.read = igb_read_mbx_pf; | |
431 | mbx->ops.read = igb_read_mbx_pf; | 431 | mbx->ops.write = igb_write_mbx_pf; |
432 | mbx->ops.write = igb_write_mbx_pf; | 432 | mbx->ops.read_posted = igb_read_posted_mbx; |
433 | mbx->ops.read_posted = igb_read_posted_mbx; | 433 | mbx->ops.write_posted = igb_write_posted_mbx; |
434 | mbx->ops.write_posted = igb_write_posted_mbx; | 434 | mbx->ops.check_for_msg = igb_check_for_msg_pf; |
435 | mbx->ops.check_for_msg = igb_check_for_msg_pf; | 435 | mbx->ops.check_for_ack = igb_check_for_ack_pf; |
436 | mbx->ops.check_for_ack = igb_check_for_ack_pf; | 436 | mbx->ops.check_for_rst = igb_check_for_rst_pf; |
437 | mbx->ops.check_for_rst = igb_check_for_rst_pf; | 437 | |
438 | 438 | mbx->stats.msgs_tx = 0; | |
439 | mbx->stats.msgs_tx = 0; | 439 | mbx->stats.msgs_rx = 0; |
440 | mbx->stats.msgs_rx = 0; | 440 | mbx->stats.reqs = 0; |
441 | mbx->stats.reqs = 0; | 441 | mbx->stats.acks = 0; |
442 | mbx->stats.acks = 0; | 442 | mbx->stats.rsts = 0; |
443 | mbx->stats.rsts = 0; | ||
444 | } | ||
445 | 443 | ||
446 | return 0; | 444 | return 0; |
447 | } | 445 | } |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 200cc3209672..cb6bf7b815ae 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2287,9 +2287,14 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter) | |||
2287 | 2287 | ||
2288 | spin_lock_init(&adapter->stats64_lock); | 2288 | spin_lock_init(&adapter->stats64_lock); |
2289 | #ifdef CONFIG_PCI_IOV | 2289 | #ifdef CONFIG_PCI_IOV |
2290 | if (hw->mac.type == e1000_82576) | 2290 | switch (hw->mac.type) { |
2291 | case e1000_82576: | ||
2292 | case e1000_i350: | ||
2291 | adapter->vfs_allocated_count = (max_vfs > 7) ? 7 : max_vfs; | 2293 | adapter->vfs_allocated_count = (max_vfs > 7) ? 7 : max_vfs; |
2292 | 2294 | break; | |
2295 | default: | ||
2296 | break; | ||
2297 | } | ||
2293 | #endif /* CONFIG_PCI_IOV */ | 2298 | #endif /* CONFIG_PCI_IOV */ |
2294 | adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus()); | 2299 | adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus()); |
2295 | 2300 | ||