igb: fix i350 anti spoofing config
Fix a problem in i350 where anti spoofing configuration was written into a wrong register. Signed-off-by: Lior Levy <lior.levy@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
Родитель
a1f6c6b147
Коммит
22c12752d1
|
@ -1818,27 +1818,32 @@ out:
|
||||||
**/
|
**/
|
||||||
void igb_vmdq_set_anti_spoofing_pf(struct e1000_hw *hw, bool enable, int pf)
|
void igb_vmdq_set_anti_spoofing_pf(struct e1000_hw *hw, bool enable, int pf)
|
||||||
{
|
{
|
||||||
u32 dtxswc;
|
u32 reg_val, reg_offset;
|
||||||
|
|
||||||
switch (hw->mac.type) {
|
switch (hw->mac.type) {
|
||||||
case e1000_82576:
|
case e1000_82576:
|
||||||
|
reg_offset = E1000_DTXSWC;
|
||||||
|
break;
|
||||||
case e1000_i350:
|
case e1000_i350:
|
||||||
dtxswc = rd32(E1000_DTXSWC);
|
reg_offset = E1000_TXSWC;
|
||||||
if (enable) {
|
|
||||||
dtxswc |= (E1000_DTXSWC_MAC_SPOOF_MASK |
|
|
||||||
E1000_DTXSWC_VLAN_SPOOF_MASK);
|
|
||||||
/* The PF can spoof - it has to in order to
|
|
||||||
* support emulation mode NICs */
|
|
||||||
dtxswc ^= (1 << pf | 1 << (pf + MAX_NUM_VFS));
|
|
||||||
} else {
|
|
||||||
dtxswc &= ~(E1000_DTXSWC_MAC_SPOOF_MASK |
|
|
||||||
E1000_DTXSWC_VLAN_SPOOF_MASK);
|
|
||||||
}
|
|
||||||
wr32(E1000_DTXSWC, dtxswc);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reg_val = rd32(reg_offset);
|
||||||
|
if (enable) {
|
||||||
|
reg_val |= (E1000_DTXSWC_MAC_SPOOF_MASK |
|
||||||
|
E1000_DTXSWC_VLAN_SPOOF_MASK);
|
||||||
|
/* The PF can spoof - it has to in order to
|
||||||
|
* support emulation mode NICs
|
||||||
|
*/
|
||||||
|
reg_val ^= (1 << pf | 1 << (pf + MAX_NUM_VFS));
|
||||||
|
} else {
|
||||||
|
reg_val &= ~(E1000_DTXSWC_MAC_SPOOF_MASK |
|
||||||
|
E1000_DTXSWC_VLAN_SPOOF_MASK);
|
||||||
|
}
|
||||||
|
wr32(reg_offset, reg_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Загрузка…
Ссылка в новой задаче