]> err.no Git - linux-2.6/commitdiff
e1000e: Fix ethtool register test code
authorAuke Kok <auke-jan.h.kok@intel.com>
Thu, 4 Oct 2007 22:00:08 +0000 (15:00 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:54:43 +0000 (16:54 -0700)
A merge/cleanup code accidentally dropped 8254x code in and removed
8257x code here. Undo this mistake and use the pci-e relevant register
test similar as to what is in e1000.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/e1000e/ethtool.c

index 3423f33769b7c52571bf57fb75a00427e3d3cd41..2e8218fb05795c906d1c731812f61751af8a50c6 100644 (file)
@@ -784,10 +784,16 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
        REG_SET_AND_CHECK(E1000_RCTL, before, 0x003FFFFB);
        REG_SET_AND_CHECK(E1000_TCTL, 0xFFFFFFFF, 0x00000000);
 
-       REG_SET_AND_CHECK(E1000_RCTL, 0xFFFFFFFF, 0x01FFFFFF);
-       REG_PATTERN_TEST(E1000_RDBAL, 0xFFFFF000, 0xFFFFFFFF);
-       REG_PATTERN_TEST(E1000_TXCW, 0x0000FFFF, 0x0000FFFF);
-       REG_PATTERN_TEST(E1000_TDBAL, 0xFFFFF000, 0xFFFFFFFF);
+       REG_SET_AND_CHECK(E1000_RCTL, before, 0xFFFFFFFF);
+       REG_PATTERN_TEST(E1000_RDBAL, 0xFFFFFFF0, 0xFFFFFFFF);
+       if ((mac->type != e1000_ich8lan) &&
+           (mac->type != e1000_ich9lan))
+               REG_PATTERN_TEST(E1000_TXCW, 0xC000FFFF, 0x0000FFFF);
+       REG_PATTERN_TEST(E1000_TDBAL, 0xFFFFFFF0, 0xFFFFFFFF);
+       REG_PATTERN_TEST(E1000_TIDV, 0x0000FFFF, 0x0000FFFF);
+       for (i = 0; i < mac->rar_entry_count; i++)
+               REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1),
+                                      0x8003FFFF, 0xFFFFFFFF);
 
        for (i = 0; i < mac->mta_reg_count; i++)
                REG_PATTERN_TEST_ARRAY(E1000_MTA, i, 0xFFFFFFFF, 0xFFFFFFFF);