aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000/e1000_ethtool.c')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c52
1 files changed, 25 insertions, 27 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 2baccf864328..ab2f153d5735 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -428,12 +428,12 @@ e1000_get_regs(struct net_device *netdev,
428 regs_buff[23] = regs_buff[18]; /* mdix mode */ 428 regs_buff[23] = regs_buff[18]; /* mdix mode */
429 e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 0x0); 429 e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 0x0);
430 } else { 430 } else {
431 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); 431 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
432 regs_buff[13] = (uint32_t)phy_data; /* cable length */ 432 regs_buff[13] = (uint32_t)phy_data; /* cable length */
433 regs_buff[14] = 0; /* Dummy (to align w/ IGP phy reg dump) */ 433 regs_buff[14] = 0; /* Dummy (to align w/ IGP phy reg dump) */
434 regs_buff[15] = 0; /* Dummy (to align w/ IGP phy reg dump) */ 434 regs_buff[15] = 0; /* Dummy (to align w/ IGP phy reg dump) */
435 regs_buff[16] = 0; /* Dummy (to align w/ IGP phy reg dump) */ 435 regs_buff[16] = 0; /* Dummy (to align w/ IGP phy reg dump) */
436 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); 436 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
437 regs_buff[17] = (uint32_t)phy_data; /* extended 10bt distance */ 437 regs_buff[17] = (uint32_t)phy_data; /* extended 10bt distance */
438 regs_buff[18] = regs_buff[13]; /* cable polarity */ 438 regs_buff[18] = regs_buff[13]; /* cable polarity */
439 regs_buff[19] = 0; /* Dummy (to align w/ IGP phy reg dump) */ 439 regs_buff[19] = 0; /* Dummy (to align w/ IGP phy reg dump) */
@@ -709,7 +709,6 @@ e1000_set_ringparam(struct net_device *netdev,
709 } 709 }
710 710
711 clear_bit(__E1000_RESETTING, &adapter->flags); 711 clear_bit(__E1000_RESETTING, &adapter->flags);
712
713 return 0; 712 return 0;
714err_setup_tx: 713err_setup_tx:
715 e1000_free_all_rx_resources(adapter); 714 e1000_free_all_rx_resources(adapter);
@@ -894,16 +893,17 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
894 893
895 *data = 0; 894 *data = 0;
896 895
896 /* NOTE: we don't test MSI interrupts here, yet */
897 /* Hook up test interrupt handler just for this test */ 897 /* Hook up test interrupt handler just for this test */
898 if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, 898 if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED,
899 netdev->name, netdev)) { 899 netdev->name, netdev))
900 shared_int = FALSE; 900 shared_int = FALSE;
901 } else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED, 901 else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED,
902 netdev->name, netdev)){ 902 netdev->name, netdev)) {
903 *data = 1; 903 *data = 1;
904 return -1; 904 return -1;
905 } 905 }
906 DPRINTK(PROBE,INFO, "testing %s interrupt\n", 906 DPRINTK(HW, INFO, "testing %s interrupt\n",
907 (shared_int ? "shared" : "unshared")); 907 (shared_int ? "shared" : "unshared"));
908 908
909 /* Disable all the interrupts */ 909 /* Disable all the interrupts */
@@ -1269,11 +1269,10 @@ e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
1269 e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x9140); 1269 e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x9140);
1270 /* autoneg off */ 1270 /* autoneg off */
1271 e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x8140); 1271 e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x8140);
1272 } else if (adapter->hw.phy_type == e1000_phy_gg82563) { 1272 } else if (adapter->hw.phy_type == e1000_phy_gg82563)
1273 e1000_write_phy_reg(&adapter->hw, 1273 e1000_write_phy_reg(&adapter->hw,
1274 GG82563_PHY_KMRN_MODE_CTRL, 1274 GG82563_PHY_KMRN_MODE_CTRL,
1275 0x1CC); 1275 0x1CC);
1276 }
1277 1276
1278 ctrl_reg = E1000_READ_REG(&adapter->hw, CTRL); 1277 ctrl_reg = E1000_READ_REG(&adapter->hw, CTRL);
1279 1278
@@ -1301,9 +1300,9 @@ e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
1301 } 1300 }
1302 1301
1303 if (adapter->hw.media_type == e1000_media_type_copper && 1302 if (adapter->hw.media_type == e1000_media_type_copper &&
1304 adapter->hw.phy_type == e1000_phy_m88) { 1303 adapter->hw.phy_type == e1000_phy_m88)
1305 ctrl_reg |= E1000_CTRL_ILOS; /* Invert Loss of Signal */ 1304 ctrl_reg |= E1000_CTRL_ILOS; /* Invert Loss of Signal */
1306 } else { 1305 else {
1307 /* Set the ILOS bit on the fiber Nic is half 1306 /* Set the ILOS bit on the fiber Nic is half
1308 * duplex link is detected. */ 1307 * duplex link is detected. */
1309 stat_reg = E1000_READ_REG(&adapter->hw, STATUS); 1308 stat_reg = E1000_READ_REG(&adapter->hw, STATUS);
@@ -1439,11 +1438,10 @@ e1000_loopback_cleanup(struct e1000_adapter *adapter)
1439 case e1000_82546_rev_3: 1438 case e1000_82546_rev_3:
1440 default: 1439 default:
1441 hw->autoneg = TRUE; 1440 hw->autoneg = TRUE;
1442 if (hw->phy_type == e1000_phy_gg82563) { 1441 if (hw->phy_type == e1000_phy_gg82563)
1443 e1000_write_phy_reg(hw, 1442 e1000_write_phy_reg(hw,
1444 GG82563_PHY_KMRN_MODE_CTRL, 1443 GG82563_PHY_KMRN_MODE_CTRL,
1445 0x180); 1444 0x180);
1446 }
1447 e1000_read_phy_reg(hw, PHY_CTRL, &phy_reg); 1445 e1000_read_phy_reg(hw, PHY_CTRL, &phy_reg);
1448 if (phy_reg & MII_CR_LOOPBACK) { 1446 if (phy_reg & MII_CR_LOOPBACK) {
1449 phy_reg &= ~MII_CR_LOOPBACK; 1447 phy_reg &= ~MII_CR_LOOPBACK;
@@ -1915,8 +1913,8 @@ static struct ethtool_ops e1000_ethtool_ops = {
1915 .get_regs = e1000_get_regs, 1913 .get_regs = e1000_get_regs,
1916 .get_wol = e1000_get_wol, 1914 .get_wol = e1000_get_wol,
1917 .set_wol = e1000_set_wol, 1915 .set_wol = e1000_set_wol,
1918 .get_msglevel = e1000_get_msglevel, 1916 .get_msglevel = e1000_get_msglevel,
1919 .set_msglevel = e1000_set_msglevel, 1917 .set_msglevel = e1000_set_msglevel,
1920 .nway_reset = e1000_nway_reset, 1918 .nway_reset = e1000_nway_reset,
1921 .get_link = ethtool_op_get_link, 1919 .get_link = ethtool_op_get_link,
1922 .get_eeprom_len = e1000_get_eeprom_len, 1920 .get_eeprom_len = e1000_get_eeprom_len,
@@ -1924,17 +1922,17 @@ static struct ethtool_ops e1000_ethtool_ops = {
1924 .set_eeprom = e1000_set_eeprom, 1922 .set_eeprom = e1000_set_eeprom,
1925 .get_ringparam = e1000_get_ringparam, 1923 .get_ringparam = e1000_get_ringparam,
1926 .set_ringparam = e1000_set_ringparam, 1924 .set_ringparam = e1000_set_ringparam,
1927 .get_pauseparam = e1000_get_pauseparam, 1925 .get_pauseparam = e1000_get_pauseparam,
1928 .set_pauseparam = e1000_set_pauseparam, 1926 .set_pauseparam = e1000_set_pauseparam,
1929 .get_rx_csum = e1000_get_rx_csum, 1927 .get_rx_csum = e1000_get_rx_csum,
1930 .set_rx_csum = e1000_set_rx_csum, 1928 .set_rx_csum = e1000_set_rx_csum,
1931 .get_tx_csum = e1000_get_tx_csum, 1929 .get_tx_csum = e1000_get_tx_csum,
1932 .set_tx_csum = e1000_set_tx_csum, 1930 .set_tx_csum = e1000_set_tx_csum,
1933 .get_sg = ethtool_op_get_sg, 1931 .get_sg = ethtool_op_get_sg,
1934 .set_sg = ethtool_op_set_sg, 1932 .set_sg = ethtool_op_set_sg,
1935#ifdef NETIF_F_TSO 1933#ifdef NETIF_F_TSO
1936 .get_tso = ethtool_op_get_tso, 1934 .get_tso = ethtool_op_get_tso,
1937 .set_tso = e1000_set_tso, 1935 .set_tso = e1000_set_tso,
1938#endif 1936#endif
1939 .self_test_count = e1000_diag_test_count, 1937 .self_test_count = e1000_diag_test_count,
1940 .self_test = e1000_diag_test, 1938 .self_test = e1000_diag_test,
@@ -1942,7 +1940,7 @@ static struct ethtool_ops e1000_ethtool_ops = {
1942 .phys_id = e1000_phys_id, 1940 .phys_id = e1000_phys_id,
1943 .get_stats_count = e1000_get_stats_count, 1941 .get_stats_count = e1000_get_stats_count,
1944 .get_ethtool_stats = e1000_get_ethtool_stats, 1942 .get_ethtool_stats = e1000_get_ethtool_stats,
1945 .get_perm_addr = ethtool_op_get_perm_addr, 1943 .get_perm_addr = ethtool_op_get_perm_addr,
1946}; 1944};
1947 1945
1948void e1000_set_ethtool_ops(struct net_device *netdev) 1946void e1000_set_ethtool_ops(struct net_device *netdev)