aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2010-11-06 01:43:21 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-12-25 00:33:09 -0500
commit8fa7e0f739b70db14e788efba4960bfc1873d550 (patch)
treebfad9d316363a3cbb7e06230309ded410325d205 /drivers/net/igb
parentb1cdfead0e532d7614b5d5b97044df94cc8945ae (diff)
igb: Fix overwrite of the VF's flags
The vf flags were being overwritten causing the flag that indicates that the PF has set the VF MAC address to get cleared. This would allow the VF to override the MAC address assigned by the Host VMM using the ip link set command. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r--drivers/net/igb/igb_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 62348fc60e53..be426a4a7240 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1654,7 +1654,7 @@ void igb_reset(struct igb_adapter *adapter)
1654 if (adapter->vfs_allocated_count) { 1654 if (adapter->vfs_allocated_count) {
1655 int i; 1655 int i;
1656 for (i = 0 ; i < adapter->vfs_allocated_count; i++) 1656 for (i = 0 ; i < adapter->vfs_allocated_count; i++)
1657 adapter->vf_data[i].flags = 0; 1657 adapter->vf_data[i].flags &= IGB_VF_FLAG_PF_SET_MAC;
1658 1658
1659 /* ping all the active vfs to let them know we are going down */ 1659 /* ping all the active vfs to let them know we are going down */
1660 igb_ping_all_vfs(adapter); 1660 igb_ping_all_vfs(adapter);
@@ -4971,8 +4971,8 @@ static int igb_set_vf_vlan(struct igb_adapter *adapter, u32 *msgbuf, u32 vf)
4971 4971
4972static inline void igb_vf_reset(struct igb_adapter *adapter, u32 vf) 4972static inline void igb_vf_reset(struct igb_adapter *adapter, u32 vf)
4973{ 4973{
4974 /* clear flags */ 4974 /* clear flags - except flag that indicates PF has set the MAC */
4975 adapter->vf_data[vf].flags &= ~(IGB_VF_FLAG_PF_SET_MAC); 4975 adapter->vf_data[vf].flags &= IGB_VF_FLAG_PF_SET_MAC;
4976 adapter->vf_data[vf].last_nack = jiffies; 4976 adapter->vf_data[vf].last_nack = jiffies;
4977 4977
4978 /* reset offloads to defaults */ 4978 /* reset offloads to defaults */
@@ -5026,7 +5026,7 @@ static void igb_vf_reset_msg(struct igb_adapter *adapter, u32 vf)
5026 reg = rd32(E1000_VFRE); 5026 reg = rd32(E1000_VFRE);
5027 wr32(E1000_VFRE, reg | (1 << vf)); 5027 wr32(E1000_VFRE, reg | (1 << vf));
5028 5028
5029 adapter->vf_data[vf].flags = IGB_VF_FLAG_CTS; 5029 adapter->vf_data[vf].flags |= IGB_VF_FLAG_CTS;
5030 5030
5031 /* reply to reset with ack and vf mac address */ 5031 /* reply to reset with ack and vf mac address */
5032 msgbuf[0] = E1000_VF_RESET | E1000_VT_MSGTYPE_ACK; 5032 msgbuf[0] = E1000_VF_RESET | E1000_VT_MSGTYPE_ACK;