diff options
Diffstat (limited to 'drivers/net/e1000/e1000_ethtool.c')
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 202 |
1 files changed, 34 insertions, 168 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 27f996a2010f..490b2b7cd3ab 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -82,7 +82,6 @@ static const struct e1000_stats e1000_gstrings_stats[] = { | |||
82 | { "rx_long_byte_count", E1000_STAT(stats.gorcl) }, | 82 | { "rx_long_byte_count", E1000_STAT(stats.gorcl) }, |
83 | { "rx_csum_offload_good", E1000_STAT(hw_csum_good) }, | 83 | { "rx_csum_offload_good", E1000_STAT(hw_csum_good) }, |
84 | { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, | 84 | { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, |
85 | { "rx_header_split", E1000_STAT(rx_hdr_split) }, | ||
86 | { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, | 85 | { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, |
87 | { "tx_smbus", E1000_STAT(stats.mgptc) }, | 86 | { "tx_smbus", E1000_STAT(stats.mgptc) }, |
88 | { "rx_smbus", E1000_STAT(stats.mgprc) }, | 87 | { "rx_smbus", E1000_STAT(stats.mgprc) }, |
@@ -114,8 +113,6 @@ static int e1000_get_settings(struct net_device *netdev, | |||
114 | SUPPORTED_1000baseT_Full| | 113 | SUPPORTED_1000baseT_Full| |
115 | SUPPORTED_Autoneg | | 114 | SUPPORTED_Autoneg | |
116 | SUPPORTED_TP); | 115 | SUPPORTED_TP); |
117 | if (hw->phy_type == e1000_phy_ife) | ||
118 | ecmd->supported &= ~SUPPORTED_1000baseT_Full; | ||
119 | ecmd->advertising = ADVERTISED_TP; | 116 | ecmd->advertising = ADVERTISED_TP; |
120 | 117 | ||
121 | if (hw->autoneg == 1) { | 118 | if (hw->autoneg == 1) { |
@@ -178,14 +175,6 @@ static int e1000_set_settings(struct net_device *netdev, | |||
178 | struct e1000_adapter *adapter = netdev_priv(netdev); | 175 | struct e1000_adapter *adapter = netdev_priv(netdev); |
179 | struct e1000_hw *hw = &adapter->hw; | 176 | struct e1000_hw *hw = &adapter->hw; |
180 | 177 | ||
181 | /* When SoL/IDER sessions are active, autoneg/speed/duplex | ||
182 | * cannot be changed */ | ||
183 | if (e1000_check_phy_reset_block(hw)) { | ||
184 | DPRINTK(DRV, ERR, "Cannot change link characteristics " | ||
185 | "when SoL/IDER is active.\n"); | ||
186 | return -EINVAL; | ||
187 | } | ||
188 | |||
189 | while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) | 178 | while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) |
190 | msleep(1); | 179 | msleep(1); |
191 | 180 | ||
@@ -330,10 +319,7 @@ static int e1000_set_tso(struct net_device *netdev, u32 data) | |||
330 | else | 319 | else |
331 | netdev->features &= ~NETIF_F_TSO; | 320 | netdev->features &= ~NETIF_F_TSO; |
332 | 321 | ||
333 | if (data && (adapter->hw.mac_type > e1000_82547_rev_2)) | 322 | netdev->features &= ~NETIF_F_TSO6; |
334 | netdev->features |= NETIF_F_TSO6; | ||
335 | else | ||
336 | netdev->features &= ~NETIF_F_TSO6; | ||
337 | 323 | ||
338 | DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled"); | 324 | DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled"); |
339 | adapter->tso_force = true; | 325 | adapter->tso_force = true; |
@@ -441,7 +427,6 @@ static void e1000_get_regs(struct net_device *netdev, struct ethtool_regs *regs, | |||
441 | regs_buff[24] = (u32)phy_data; /* phy local receiver status */ | 427 | regs_buff[24] = (u32)phy_data; /* phy local receiver status */ |
442 | regs_buff[25] = regs_buff[24]; /* phy remote receiver status */ | 428 | regs_buff[25] = regs_buff[24]; /* phy remote receiver status */ |
443 | if (hw->mac_type >= e1000_82540 && | 429 | if (hw->mac_type >= e1000_82540 && |
444 | hw->mac_type < e1000_82571 && | ||
445 | hw->media_type == e1000_media_type_copper) { | 430 | hw->media_type == e1000_media_type_copper) { |
446 | regs_buff[26] = er32(MANC); | 431 | regs_buff[26] = er32(MANC); |
447 | } | 432 | } |
@@ -554,10 +539,8 @@ static int e1000_set_eeprom(struct net_device *netdev, | |||
554 | ret_val = e1000_write_eeprom(hw, first_word, | 539 | ret_val = e1000_write_eeprom(hw, first_word, |
555 | last_word - first_word + 1, eeprom_buff); | 540 | last_word - first_word + 1, eeprom_buff); |
556 | 541 | ||
557 | /* Update the checksum over the first part of the EEPROM if needed | 542 | /* Update the checksum over the first part of the EEPROM if needed */ |
558 | * and flush shadow RAM for 82573 conrollers */ | 543 | if ((ret_val == 0) && (first_word <= EEPROM_CHECKSUM_REG)) |
559 | if ((ret_val == 0) && ((first_word <= EEPROM_CHECKSUM_REG) || | ||
560 | (hw->mac_type == e1000_82573))) | ||
561 | e1000_update_eeprom_checksum(hw); | 544 | e1000_update_eeprom_checksum(hw); |
562 | 545 | ||
563 | kfree(eeprom_buff); | 546 | kfree(eeprom_buff); |
@@ -568,31 +551,12 @@ static void e1000_get_drvinfo(struct net_device *netdev, | |||
568 | struct ethtool_drvinfo *drvinfo) | 551 | struct ethtool_drvinfo *drvinfo) |
569 | { | 552 | { |
570 | struct e1000_adapter *adapter = netdev_priv(netdev); | 553 | struct e1000_adapter *adapter = netdev_priv(netdev); |
571 | struct e1000_hw *hw = &adapter->hw; | ||
572 | char firmware_version[32]; | 554 | char firmware_version[32]; |
573 | u16 eeprom_data; | ||
574 | 555 | ||
575 | strncpy(drvinfo->driver, e1000_driver_name, 32); | 556 | strncpy(drvinfo->driver, e1000_driver_name, 32); |
576 | strncpy(drvinfo->version, e1000_driver_version, 32); | 557 | strncpy(drvinfo->version, e1000_driver_version, 32); |
577 | 558 | ||
578 | /* EEPROM image version # is reported as firmware version # for | 559 | sprintf(firmware_version, "N/A"); |
579 | * 8257{1|2|3} controllers */ | ||
580 | e1000_read_eeprom(hw, 5, 1, &eeprom_data); | ||
581 | switch (hw->mac_type) { | ||
582 | case e1000_82571: | ||
583 | case e1000_82572: | ||
584 | case e1000_82573: | ||
585 | case e1000_80003es2lan: | ||
586 | case e1000_ich8lan: | ||
587 | sprintf(firmware_version, "%d.%d-%d", | ||
588 | (eeprom_data & 0xF000) >> 12, | ||
589 | (eeprom_data & 0x0FF0) >> 4, | ||
590 | eeprom_data & 0x000F); | ||
591 | break; | ||
592 | default: | ||
593 | sprintf(firmware_version, "N/A"); | ||
594 | } | ||
595 | |||
596 | strncpy(drvinfo->fw_version, firmware_version, 32); | 560 | strncpy(drvinfo->fw_version, firmware_version, 32); |
597 | strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); | 561 | strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); |
598 | drvinfo->regdump_len = e1000_get_regs_len(netdev); | 562 | drvinfo->regdump_len = e1000_get_regs_len(netdev); |
@@ -781,21 +745,9 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) | |||
781 | /* The status register is Read Only, so a write should fail. | 745 | /* The status register is Read Only, so a write should fail. |
782 | * Some bits that get toggled are ignored. | 746 | * Some bits that get toggled are ignored. |
783 | */ | 747 | */ |
784 | switch (hw->mac_type) { | 748 | |
785 | /* there are several bits on newer hardware that are r/w */ | 749 | /* there are several bits on newer hardware that are r/w */ |
786 | case e1000_82571: | 750 | toggle = 0xFFFFF833; |
787 | case e1000_82572: | ||
788 | case e1000_80003es2lan: | ||
789 | toggle = 0x7FFFF3FF; | ||
790 | break; | ||
791 | case e1000_82573: | ||
792 | case e1000_ich8lan: | ||
793 | toggle = 0x7FFFF033; | ||
794 | break; | ||
795 | default: | ||
796 | toggle = 0xFFFFF833; | ||
797 | break; | ||
798 | } | ||
799 | 751 | ||
800 | before = er32(STATUS); | 752 | before = er32(STATUS); |
801 | value = (er32(STATUS) & toggle); | 753 | value = (er32(STATUS) & toggle); |
@@ -810,12 +762,10 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) | |||
810 | /* restore previous status */ | 762 | /* restore previous status */ |
811 | ew32(STATUS, before); | 763 | ew32(STATUS, before); |
812 | 764 | ||
813 | if (hw->mac_type != e1000_ich8lan) { | 765 | REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF); |
814 | REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF); | 766 | REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF); |
815 | REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF); | 767 | REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF); |
816 | REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF); | 768 | REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF); |
817 | REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF); | ||
818 | } | ||
819 | 769 | ||
820 | REG_PATTERN_TEST(RDTR, 0x0000FFFF, 0xFFFFFFFF); | 770 | REG_PATTERN_TEST(RDTR, 0x0000FFFF, 0xFFFFFFFF); |
821 | REG_PATTERN_TEST(RDBAH, 0xFFFFFFFF, 0xFFFFFFFF); | 771 | REG_PATTERN_TEST(RDBAH, 0xFFFFFFFF, 0xFFFFFFFF); |
@@ -830,8 +780,7 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) | |||
830 | 780 | ||
831 | REG_SET_AND_CHECK(RCTL, 0xFFFFFFFF, 0x00000000); | 781 | REG_SET_AND_CHECK(RCTL, 0xFFFFFFFF, 0x00000000); |
832 | 782 | ||
833 | before = (hw->mac_type == e1000_ich8lan ? | 783 | before = 0x06DFB3FE; |
834 | 0x06C3B33E : 0x06DFB3FE); | ||
835 | REG_SET_AND_CHECK(RCTL, before, 0x003FFFFB); | 784 | REG_SET_AND_CHECK(RCTL, before, 0x003FFFFB); |
836 | REG_SET_AND_CHECK(TCTL, 0xFFFFFFFF, 0x00000000); | 785 | REG_SET_AND_CHECK(TCTL, 0xFFFFFFFF, 0x00000000); |
837 | 786 | ||
@@ -839,12 +788,10 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) | |||
839 | 788 | ||
840 | REG_SET_AND_CHECK(RCTL, before, 0xFFFFFFFF); | 789 | REG_SET_AND_CHECK(RCTL, before, 0xFFFFFFFF); |
841 | REG_PATTERN_TEST(RDBAL, 0xFFFFFFF0, 0xFFFFFFFF); | 790 | REG_PATTERN_TEST(RDBAL, 0xFFFFFFF0, 0xFFFFFFFF); |
842 | if (hw->mac_type != e1000_ich8lan) | 791 | REG_PATTERN_TEST(TXCW, 0xC000FFFF, 0x0000FFFF); |
843 | REG_PATTERN_TEST(TXCW, 0xC000FFFF, 0x0000FFFF); | ||
844 | REG_PATTERN_TEST(TDBAL, 0xFFFFFFF0, 0xFFFFFFFF); | 792 | REG_PATTERN_TEST(TDBAL, 0xFFFFFFF0, 0xFFFFFFFF); |
845 | REG_PATTERN_TEST(TIDV, 0x0000FFFF, 0x0000FFFF); | 793 | REG_PATTERN_TEST(TIDV, 0x0000FFFF, 0x0000FFFF); |
846 | value = (hw->mac_type == e1000_ich8lan ? | 794 | value = E1000_RAR_ENTRIES; |
847 | E1000_RAR_ENTRIES_ICH8LAN : E1000_RAR_ENTRIES); | ||
848 | for (i = 0; i < value; i++) { | 795 | for (i = 0; i < value; i++) { |
849 | REG_PATTERN_TEST(RA + (((i << 1) + 1) << 2), 0x8003FFFF, | 796 | REG_PATTERN_TEST(RA + (((i << 1) + 1) << 2), 0x8003FFFF, |
850 | 0xFFFFFFFF); | 797 | 0xFFFFFFFF); |
@@ -859,8 +806,7 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) | |||
859 | 806 | ||
860 | } | 807 | } |
861 | 808 | ||
862 | value = (hw->mac_type == e1000_ich8lan ? | 809 | value = E1000_MC_TBL_SIZE; |
863 | E1000_MC_TBL_SIZE_ICH8LAN : E1000_MC_TBL_SIZE); | ||
864 | for (i = 0; i < value; i++) | 810 | for (i = 0; i < value; i++) |
865 | REG_PATTERN_TEST(MTA + (i << 2), 0xFFFFFFFF, 0xFFFFFFFF); | 811 | REG_PATTERN_TEST(MTA + (i << 2), 0xFFFFFFFF, 0xFFFFFFFF); |
866 | 812 | ||
@@ -933,9 +879,6 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) | |||
933 | /* Test each interrupt */ | 879 | /* Test each interrupt */ |
934 | for (; i < 10; i++) { | 880 | for (; i < 10; i++) { |
935 | 881 | ||
936 | if (hw->mac_type == e1000_ich8lan && i == 8) | ||
937 | continue; | ||
938 | |||
939 | /* Interrupt to test */ | 882 | /* Interrupt to test */ |
940 | mask = 1 << i; | 883 | mask = 1 << i; |
941 | 884 | ||
@@ -1289,35 +1232,20 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter) | |||
1289 | e1000_write_phy_reg(hw, PHY_CTRL, 0x9140); | 1232 | e1000_write_phy_reg(hw, PHY_CTRL, 0x9140); |
1290 | /* autoneg off */ | 1233 | /* autoneg off */ |
1291 | e1000_write_phy_reg(hw, PHY_CTRL, 0x8140); | 1234 | e1000_write_phy_reg(hw, PHY_CTRL, 0x8140); |
1292 | } else if (hw->phy_type == e1000_phy_gg82563) | 1235 | } |
1293 | e1000_write_phy_reg(hw, | ||
1294 | GG82563_PHY_KMRN_MODE_CTRL, | ||
1295 | 0x1CC); | ||
1296 | 1236 | ||
1297 | ctrl_reg = er32(CTRL); | 1237 | ctrl_reg = er32(CTRL); |
1298 | 1238 | ||
1299 | if (hw->phy_type == e1000_phy_ife) { | 1239 | /* force 1000, set loopback */ |
1300 | /* force 100, set loopback */ | 1240 | e1000_write_phy_reg(hw, PHY_CTRL, 0x4140); |
1301 | e1000_write_phy_reg(hw, PHY_CTRL, 0x6100); | ||
1302 | 1241 | ||
1303 | /* Now set up the MAC to the same speed/duplex as the PHY. */ | 1242 | /* Now set up the MAC to the same speed/duplex as the PHY. */ |
1304 | ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */ | 1243 | ctrl_reg = er32(CTRL); |
1305 | ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */ | 1244 | ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */ |
1306 | E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */ | 1245 | ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */ |
1307 | E1000_CTRL_SPD_100 |/* Force Speed to 100 */ | 1246 | E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */ |
1308 | E1000_CTRL_FD); /* Force Duplex to FULL */ | 1247 | E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */ |
1309 | } else { | 1248 | E1000_CTRL_FD); /* Force Duplex to FULL */ |
1310 | /* force 1000, set loopback */ | ||
1311 | e1000_write_phy_reg(hw, PHY_CTRL, 0x4140); | ||
1312 | |||
1313 | /* Now set up the MAC to the same speed/duplex as the PHY. */ | ||
1314 | ctrl_reg = er32(CTRL); | ||
1315 | ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */ | ||
1316 | ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */ | ||
1317 | E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */ | ||
1318 | E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */ | ||
1319 | E1000_CTRL_FD); /* Force Duplex to FULL */ | ||
1320 | } | ||
1321 | 1249 | ||
1322 | if (hw->media_type == e1000_media_type_copper && | 1250 | if (hw->media_type == e1000_media_type_copper && |
1323 | hw->phy_type == e1000_phy_m88) | 1251 | hw->phy_type == e1000_phy_m88) |
@@ -1373,14 +1301,8 @@ static int e1000_set_phy_loopback(struct e1000_adapter *adapter) | |||
1373 | case e1000_82541_rev_2: | 1301 | case e1000_82541_rev_2: |
1374 | case e1000_82547: | 1302 | case e1000_82547: |
1375 | case e1000_82547_rev_2: | 1303 | case e1000_82547_rev_2: |
1376 | case e1000_82571: | ||
1377 | case e1000_82572: | ||
1378 | case e1000_82573: | ||
1379 | case e1000_80003es2lan: | ||
1380 | case e1000_ich8lan: | ||
1381 | return e1000_integrated_phy_loopback(adapter); | 1304 | return e1000_integrated_phy_loopback(adapter); |
1382 | break; | 1305 | break; |
1383 | |||
1384 | default: | 1306 | default: |
1385 | /* Default PHY loopback work is to read the MII | 1307 | /* Default PHY loopback work is to read the MII |
1386 | * control register and assert bit 14 (loopback mode). | 1308 | * control register and assert bit 14 (loopback mode). |
@@ -1409,14 +1331,6 @@ static int e1000_setup_loopback_test(struct e1000_adapter *adapter) | |||
1409 | case e1000_82546_rev_3: | 1331 | case e1000_82546_rev_3: |
1410 | return e1000_set_phy_loopback(adapter); | 1332 | return e1000_set_phy_loopback(adapter); |
1411 | break; | 1333 | break; |
1412 | case e1000_82571: | ||
1413 | case e1000_82572: | ||
1414 | #define E1000_SERDES_LB_ON 0x410 | ||
1415 | e1000_set_phy_loopback(adapter); | ||
1416 | ew32(SCTL, E1000_SERDES_LB_ON); | ||
1417 | msleep(10); | ||
1418 | return 0; | ||
1419 | break; | ||
1420 | default: | 1334 | default: |
1421 | rctl = er32(RCTL); | 1335 | rctl = er32(RCTL); |
1422 | rctl |= E1000_RCTL_LBM_TCVR; | 1336 | rctl |= E1000_RCTL_LBM_TCVR; |
@@ -1440,26 +1354,12 @@ static void e1000_loopback_cleanup(struct e1000_adapter *adapter) | |||
1440 | ew32(RCTL, rctl); | 1354 | ew32(RCTL, rctl); |
1441 | 1355 | ||
1442 | switch (hw->mac_type) { | 1356 | switch (hw->mac_type) { |
1443 | case e1000_82571: | ||
1444 | case e1000_82572: | ||
1445 | if (hw->media_type == e1000_media_type_fiber || | ||
1446 | hw->media_type == e1000_media_type_internal_serdes) { | ||
1447 | #define E1000_SERDES_LB_OFF 0x400 | ||
1448 | ew32(SCTL, E1000_SERDES_LB_OFF); | ||
1449 | msleep(10); | ||
1450 | break; | ||
1451 | } | ||
1452 | /* Fall Through */ | ||
1453 | case e1000_82545: | 1357 | case e1000_82545: |
1454 | case e1000_82546: | 1358 | case e1000_82546: |
1455 | case e1000_82545_rev_3: | 1359 | case e1000_82545_rev_3: |
1456 | case e1000_82546_rev_3: | 1360 | case e1000_82546_rev_3: |
1457 | default: | 1361 | default: |
1458 | hw->autoneg = true; | 1362 | hw->autoneg = true; |
1459 | if (hw->phy_type == e1000_phy_gg82563) | ||
1460 | e1000_write_phy_reg(hw, | ||
1461 | GG82563_PHY_KMRN_MODE_CTRL, | ||
1462 | 0x180); | ||
1463 | e1000_read_phy_reg(hw, PHY_CTRL, &phy_reg); | 1363 | e1000_read_phy_reg(hw, PHY_CTRL, &phy_reg); |
1464 | if (phy_reg & MII_CR_LOOPBACK) { | 1364 | if (phy_reg & MII_CR_LOOPBACK) { |
1465 | phy_reg &= ~MII_CR_LOOPBACK; | 1365 | phy_reg &= ~MII_CR_LOOPBACK; |
@@ -1560,17 +1460,6 @@ static int e1000_run_loopback_test(struct e1000_adapter *adapter) | |||
1560 | 1460 | ||
1561 | static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data) | 1461 | static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data) |
1562 | { | 1462 | { |
1563 | struct e1000_hw *hw = &adapter->hw; | ||
1564 | |||
1565 | /* PHY loopback cannot be performed if SoL/IDER | ||
1566 | * sessions are active */ | ||
1567 | if (e1000_check_phy_reset_block(hw)) { | ||
1568 | DPRINTK(DRV, ERR, "Cannot do PHY loopback test " | ||
1569 | "when SoL/IDER is active.\n"); | ||
1570 | *data = 0; | ||
1571 | goto out; | ||
1572 | } | ||
1573 | |||
1574 | *data = e1000_setup_desc_rings(adapter); | 1463 | *data = e1000_setup_desc_rings(adapter); |
1575 | if (*data) | 1464 | if (*data) |
1576 | goto out; | 1465 | goto out; |
@@ -1592,13 +1481,13 @@ static int e1000_link_test(struct e1000_adapter *adapter, u64 *data) | |||
1592 | *data = 0; | 1481 | *data = 0; |
1593 | if (hw->media_type == e1000_media_type_internal_serdes) { | 1482 | if (hw->media_type == e1000_media_type_internal_serdes) { |
1594 | int i = 0; | 1483 | int i = 0; |
1595 | hw->serdes_link_down = true; | 1484 | hw->serdes_has_link = false; |
1596 | 1485 | ||
1597 | /* On some blade server designs, link establishment | 1486 | /* On some blade server designs, link establishment |
1598 | * could take as long as 2-3 minutes */ | 1487 | * could take as long as 2-3 minutes */ |
1599 | do { | 1488 | do { |
1600 | e1000_check_for_link(hw); | 1489 | e1000_check_for_link(hw); |
1601 | if (!hw->serdes_link_down) | 1490 | if (hw->serdes_has_link) |
1602 | return *data; | 1491 | return *data; |
1603 | msleep(20); | 1492 | msleep(20); |
1604 | } while (i++ < 3750); | 1493 | } while (i++ < 3750); |
@@ -1716,15 +1605,11 @@ static int e1000_wol_exclusion(struct e1000_adapter *adapter, | |||
1716 | case E1000_DEV_ID_82545EM_COPPER: | 1605 | case E1000_DEV_ID_82545EM_COPPER: |
1717 | case E1000_DEV_ID_82546GB_QUAD_COPPER: | 1606 | case E1000_DEV_ID_82546GB_QUAD_COPPER: |
1718 | case E1000_DEV_ID_82546GB_PCIE: | 1607 | case E1000_DEV_ID_82546GB_PCIE: |
1719 | case E1000_DEV_ID_82571EB_SERDES_QUAD: | ||
1720 | /* these don't support WoL at all */ | 1608 | /* these don't support WoL at all */ |
1721 | wol->supported = 0; | 1609 | wol->supported = 0; |
1722 | break; | 1610 | break; |
1723 | case E1000_DEV_ID_82546EB_FIBER: | 1611 | case E1000_DEV_ID_82546EB_FIBER: |
1724 | case E1000_DEV_ID_82546GB_FIBER: | 1612 | case E1000_DEV_ID_82546GB_FIBER: |
1725 | case E1000_DEV_ID_82571EB_FIBER: | ||
1726 | case E1000_DEV_ID_82571EB_SERDES: | ||
1727 | case E1000_DEV_ID_82571EB_COPPER: | ||
1728 | /* Wake events not supported on port B */ | 1613 | /* Wake events not supported on port B */ |
1729 | if (er32(STATUS) & E1000_STATUS_FUNC_1) { | 1614 | if (er32(STATUS) & E1000_STATUS_FUNC_1) { |
1730 | wol->supported = 0; | 1615 | wol->supported = 0; |
@@ -1733,10 +1618,6 @@ static int e1000_wol_exclusion(struct e1000_adapter *adapter, | |||
1733 | /* return success for non excluded adapter ports */ | 1618 | /* return success for non excluded adapter ports */ |
1734 | retval = 0; | 1619 | retval = 0; |
1735 | break; | 1620 | break; |
1736 | case E1000_DEV_ID_82571EB_QUAD_COPPER: | ||
1737 | case E1000_DEV_ID_82571EB_QUAD_FIBER: | ||
1738 | case E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE: | ||
1739 | case E1000_DEV_ID_82571PT_QUAD_COPPER: | ||
1740 | case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: | 1621 | case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: |
1741 | /* quad port adapters only support WoL on port A */ | 1622 | /* quad port adapters only support WoL on port A */ |
1742 | if (!adapter->quad_port_a) { | 1623 | if (!adapter->quad_port_a) { |
@@ -1872,30 +1753,15 @@ static int e1000_phys_id(struct net_device *netdev, u32 data) | |||
1872 | if (!data) | 1753 | if (!data) |
1873 | data = INT_MAX; | 1754 | data = INT_MAX; |
1874 | 1755 | ||
1875 | if (hw->mac_type < e1000_82571) { | 1756 | if (!adapter->blink_timer.function) { |
1876 | if (!adapter->blink_timer.function) { | 1757 | init_timer(&adapter->blink_timer); |
1877 | init_timer(&adapter->blink_timer); | 1758 | adapter->blink_timer.function = e1000_led_blink_callback; |
1878 | adapter->blink_timer.function = e1000_led_blink_callback; | 1759 | adapter->blink_timer.data = (unsigned long)adapter; |
1879 | adapter->blink_timer.data = (unsigned long)adapter; | ||
1880 | } | ||
1881 | e1000_setup_led(hw); | ||
1882 | mod_timer(&adapter->blink_timer, jiffies); | ||
1883 | msleep_interruptible(data * 1000); | ||
1884 | del_timer_sync(&adapter->blink_timer); | ||
1885 | } else if (hw->phy_type == e1000_phy_ife) { | ||
1886 | if (!adapter->blink_timer.function) { | ||
1887 | init_timer(&adapter->blink_timer); | ||
1888 | adapter->blink_timer.function = e1000_led_blink_callback; | ||
1889 | adapter->blink_timer.data = (unsigned long)adapter; | ||
1890 | } | ||
1891 | mod_timer(&adapter->blink_timer, jiffies); | ||
1892 | msleep_interruptible(data * 1000); | ||
1893 | del_timer_sync(&adapter->blink_timer); | ||
1894 | e1000_write_phy_reg(&(adapter->hw), IFE_PHY_SPECIAL_CONTROL_LED, 0); | ||
1895 | } else { | ||
1896 | e1000_blink_led_start(hw); | ||
1897 | msleep_interruptible(data * 1000); | ||
1898 | } | 1760 | } |
1761 | e1000_setup_led(hw); | ||
1762 | mod_timer(&adapter->blink_timer, jiffies); | ||
1763 | msleep_interruptible(data * 1000); | ||
1764 | del_timer_sync(&adapter->blink_timer); | ||
1899 | 1765 | ||
1900 | e1000_led_off(hw); | 1766 | e1000_led_off(hw); |
1901 | clear_bit(E1000_LED_ON, &adapter->led_status); | 1767 | clear_bit(E1000_LED_ON, &adapter->led_status); |