aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_ethtool.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2010-03-22 10:08:06 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-22 21:30:05 -0400
commitd2ba2ed8fe3aa796a671a6922119d7171bb49515 (patch)
tree8265da058e55fb264bdd94b1e41ed6ac9d8cbf03 /drivers/net/igb/igb_ethtool.c
parent52a1dd4d15cc28da5d3e9bfb1526c314d65fdff8 (diff)
igb: add support for Intel I350 Gigabit Network Connection
This patch adds support for the the I350 Gigabit network connection which is the follow-on part to the 82580. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: James Hearn <james.r.hearn@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r--drivers/net/igb/igb_ethtool.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index a4cead12fd98..1d4ee418226d 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -901,6 +901,49 @@ struct igb_reg_test {
901#define TABLE64_TEST_LO 5 901#define TABLE64_TEST_LO 5
902#define TABLE64_TEST_HI 6 902#define TABLE64_TEST_HI 6
903 903
904/* i350 reg test */
905static struct igb_reg_test reg_test_i350[] = {
906 { E1000_FCAL, 0x100, 1, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF },
907 { E1000_FCAH, 0x100, 1, PATTERN_TEST, 0x0000FFFF, 0xFFFFFFFF },
908 { E1000_FCT, 0x100, 1, PATTERN_TEST, 0x0000FFFF, 0xFFFFFFFF },
909 { E1000_VET, 0x100, 1, PATTERN_TEST, 0xFFFF0000, 0xFFFF0000 },
910 { E1000_RDBAL(0), 0x100, 4, PATTERN_TEST, 0xFFFFFF80, 0xFFFFFFFF },
911 { E1000_RDBAH(0), 0x100, 4, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF },
912 { E1000_RDLEN(0), 0x100, 4, PATTERN_TEST, 0x000FFFF0, 0x000FFFFF },
913 { E1000_RDBAL(4), 0x40, 4, PATTERN_TEST, 0xFFFFFF80, 0xFFFFFFFF },
914 { E1000_RDBAH(4), 0x40, 4, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF },
915 { E1000_RDLEN(4), 0x40, 4, PATTERN_TEST, 0x000FFFF0, 0x000FFFFF },
916 /* RDH is read-only for i350, only test RDT. */
917 { E1000_RDT(0), 0x100, 4, PATTERN_TEST, 0x0000FFFF, 0x0000FFFF },
918 { E1000_RDT(4), 0x40, 4, PATTERN_TEST, 0x0000FFFF, 0x0000FFFF },
919 { E1000_FCRTH, 0x100, 1, PATTERN_TEST, 0x0000FFF0, 0x0000FFF0 },
920 { E1000_FCTTV, 0x100, 1, PATTERN_TEST, 0x0000FFFF, 0x0000FFFF },
921 { E1000_TIPG, 0x100, 1, PATTERN_TEST, 0x3FFFFFFF, 0x3FFFFFFF },
922 { E1000_TDBAL(0), 0x100, 4, PATTERN_TEST, 0xFFFFFF80, 0xFFFFFFFF },
923 { E1000_TDBAH(0), 0x100, 4, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF },
924 { E1000_TDLEN(0), 0x100, 4, PATTERN_TEST, 0x000FFFF0, 0x000FFFFF },
925 { E1000_TDBAL(4), 0x40, 4, PATTERN_TEST, 0xFFFFFF80, 0xFFFFFFFF },
926 { E1000_TDBAH(4), 0x40, 4, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF },
927 { E1000_TDLEN(4), 0x40, 4, PATTERN_TEST, 0x000FFFF0, 0x000FFFFF },
928 { E1000_TDT(0), 0x100, 4, PATTERN_TEST, 0x0000FFFF, 0x0000FFFF },
929 { E1000_TDT(4), 0x40, 4, PATTERN_TEST, 0x0000FFFF, 0x0000FFFF },
930 { E1000_RCTL, 0x100, 1, SET_READ_TEST, 0xFFFFFFFF, 0x00000000 },
931 { E1000_RCTL, 0x100, 1, SET_READ_TEST, 0x04CFB0FE, 0x003FFFFB },
932 { E1000_RCTL, 0x100, 1, SET_READ_TEST, 0x04CFB0FE, 0xFFFFFFFF },
933 { E1000_TCTL, 0x100, 1, SET_READ_TEST, 0xFFFFFFFF, 0x00000000 },
934 { E1000_RA, 0, 16, TABLE64_TEST_LO,
935 0xFFFFFFFF, 0xFFFFFFFF },
936 { E1000_RA, 0, 16, TABLE64_TEST_HI,
937 0xC3FFFFFF, 0xFFFFFFFF },
938 { E1000_RA2, 0, 16, TABLE64_TEST_LO,
939 0xFFFFFFFF, 0xFFFFFFFF },
940 { E1000_RA2, 0, 16, TABLE64_TEST_HI,
941 0xC3FFFFFF, 0xFFFFFFFF },
942 { E1000_MTA, 0, 128, TABLE32_TEST,
943 0xFFFFFFFF, 0xFFFFFFFF },
944 { 0, 0, 0, 0 }
945};
946
904/* 82580 reg test */ 947/* 82580 reg test */
905static struct igb_reg_test reg_test_82580[] = { 948static struct igb_reg_test reg_test_82580[] = {
906 { E1000_FCAL, 0x100, 1, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF }, 949 { E1000_FCAL, 0x100, 1, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF },
@@ -1076,6 +1119,10 @@ static int igb_reg_test(struct igb_adapter *adapter, u64 *data)
1076 u32 i, toggle; 1119 u32 i, toggle;
1077 1120
1078 switch (adapter->hw.mac.type) { 1121 switch (adapter->hw.mac.type) {
1122 case e1000_i350:
1123 test = reg_test_i350;
1124 toggle = 0x7FEFF3FF;
1125 break;
1079 case e1000_82580: 1126 case e1000_82580:
1080 test = reg_test_82580; 1127 test = reg_test_82580;
1081 toggle = 0x7FEFF3FF; 1128 toggle = 0x7FEFF3FF;
@@ -1237,6 +1284,9 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
1237 case e1000_82580: 1284 case e1000_82580:
1238 ics_mask = 0x77DCFED5; 1285 ics_mask = 0x77DCFED5;
1239 break; 1286 break;
1287 case e1000_i350:
1288 ics_mask = 0x77DCFED5;
1289 break;
1240 default: 1290 default:
1241 ics_mask = 0x7FFFFFFF; 1291 ics_mask = 0x7FFFFFFF;
1242 break; 1292 break;