diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-02-19 23:40:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-20 03:22:54 -0500 |
commit | 4ae196dfd61d06b061c069edcdd7c73121e60a21 (patch) | |
tree | 68111629e73751b6200cc9bdd8b769246fe0d540 /drivers/net/igb/e1000_82575.c | |
parent | e173952257d7a3d3c64de3039d9fc02d1fbf49c3 (diff) |
igb: Add support for enabling VFs to PF driver.
This patch adds the support to handle requests from the VF to perform
operations such as completing resets, setting/reading mac address, adding
vlans, adding multicast addresses, setting rlpml, and general
communications between the PF and all VFs.
Signed-off-by: Alexander Duyck <alexander.h.duyck@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/e1000_82575.c')
-rw-r--r-- | drivers/net/igb/e1000_82575.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c index 7f43e253c566..ea63a215c909 100644 --- a/drivers/net/igb/e1000_82575.c +++ b/drivers/net/igb/e1000_82575.c | |||
@@ -213,6 +213,10 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) | |||
213 | return -E1000_ERR_PHY; | 213 | return -E1000_ERR_PHY; |
214 | } | 214 | } |
215 | 215 | ||
216 | /* if 82576 then initialize mailbox parameters */ | ||
217 | if (mac->type == e1000_82576) | ||
218 | igb_init_mbx_params_pf(hw); | ||
219 | |||
216 | return 0; | 220 | return 0; |
217 | } | 221 | } |
218 | 222 | ||
@@ -1413,6 +1417,44 @@ void igb_rx_fifo_flush_82575(struct e1000_hw *hw) | |||
1413 | rd32(E1000_MPC); | 1417 | rd32(E1000_MPC); |
1414 | } | 1418 | } |
1415 | 1419 | ||
1420 | /** | ||
1421 | * igb_vmdq_set_loopback_pf - enable or disable vmdq loopback | ||
1422 | * @hw: pointer to the hardware struct | ||
1423 | * @enable: state to enter, either enabled or disabled | ||
1424 | * | ||
1425 | * enables/disables L2 switch loopback functionality. | ||
1426 | **/ | ||
1427 | void igb_vmdq_set_loopback_pf(struct e1000_hw *hw, bool enable) | ||
1428 | { | ||
1429 | u32 dtxswc = rd32(E1000_DTXSWC); | ||
1430 | |||
1431 | if (enable) | ||
1432 | dtxswc |= E1000_DTXSWC_VMDQ_LOOPBACK_EN; | ||
1433 | else | ||
1434 | dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN; | ||
1435 | |||
1436 | wr32(E1000_DTXSWC, dtxswc); | ||
1437 | } | ||
1438 | |||
1439 | /** | ||
1440 | * igb_vmdq_set_replication_pf - enable or disable vmdq replication | ||
1441 | * @hw: pointer to the hardware struct | ||
1442 | * @enable: state to enter, either enabled or disabled | ||
1443 | * | ||
1444 | * enables/disables replication of packets across multiple pools. | ||
1445 | **/ | ||
1446 | void igb_vmdq_set_replication_pf(struct e1000_hw *hw, bool enable) | ||
1447 | { | ||
1448 | u32 vt_ctl = rd32(E1000_VT_CTL); | ||
1449 | |||
1450 | if (enable) | ||
1451 | vt_ctl |= E1000_VT_CTL_VM_REPL_EN; | ||
1452 | else | ||
1453 | vt_ctl &= ~E1000_VT_CTL_VM_REPL_EN; | ||
1454 | |||
1455 | wr32(E1000_VT_CTL, vt_ctl); | ||
1456 | } | ||
1457 | |||
1416 | static struct e1000_mac_operations e1000_mac_ops_82575 = { | 1458 | static struct e1000_mac_operations e1000_mac_ops_82575 = { |
1417 | .reset_hw = igb_reset_hw_82575, | 1459 | .reset_hw = igb_reset_hw_82575, |
1418 | .init_hw = igb_init_hw_82575, | 1460 | .init_hw = igb_init_hw_82575, |