Commit ad40064e authored by David Ertman's avatar David Ertman Committed by Jeff Kirsher

e1000e: Fix ethtool offline tests for 82579 parts

Changes to the rar_entry_count value require a change to the indexing
used to access the SHRA[H|L] registers when testing them with
'ethtool -t <iface> offline'
Signed-off-by: default avatarDave Ertman <davidx.m.ertman@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 5bb73176
...@@ -917,15 +917,21 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) ...@@ -917,15 +917,21 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
} }
if (mac->type == e1000_pch2lan) { if (mac->type == e1000_pch2lan) {
/* SHRAH[0,1,2] different than previous */ /* SHRAH[0,1,2] different than previous */
if (i == 7) if (i == 1)
mask &= 0xFFF4FFFF; mask &= 0xFFF4FFFF;
/* SHRAH[3] different than SHRAH[0,1,2] */ /* SHRAH[3] different than SHRAH[0,1,2] */
if (i == 10) if (i == 4)
mask |= (1 << 30); mask |= (1 << 30);
/* RAR[1-6] owned by management engine - skipping */
if (i > 0)
i += 6;
} }
REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1), mask, REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1), mask,
0xFFFFFFFF); 0xFFFFFFFF);
/* reset index to actual value */
if ((mac->type == e1000_pch2lan) && (i > 6))
i -= 6;
} }
for (i = 0; i < mac->mta_reg_count; i++) for (i = 0; i < mac->mta_reg_count; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment