diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-05-23 17:21:33 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-23 17:21:33 -0400 |
commit | bdad69b23c86e41262b85d8affc9a3b34ee2ee74 (patch) | |
tree | 1998fc609e8c614247db8b617e194a746e2bcc03 /drivers | |
parent | 9528454f9c02fb9c359c4c42c69eed4d47407e39 (diff) | |
parent | 440c052d6f717495806fe2c65f3f5677c92397c7 (diff) |
Merge branch 'e1000-7.0.38-k4' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into upstream
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 44 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_hw.c | 112 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_hw.h | 4 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 77 |
5 files changed, 104 insertions, 135 deletions
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile index 92823ac89d42..5dea2b7dea4d 100644 --- a/drivers/net/e1000/Makefile +++ b/drivers/net/e1000/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | ################################################################################ | 1 | ################################################################################ |
2 | # | 2 | # |
3 | # | 3 | # |
4 | # Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved. | 4 | # Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. |
5 | # | 5 | # |
6 | # This program is free software; you can redistribute it and/or modify it | 6 | # This program is free software; you can redistribute it and/or modify it |
7 | # under the terms of the GNU General Public License as published by the Free | 7 | # under the terms of the GNU General Public License as published by the Free |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index e48dc578fde2..cfdf0b24ffc1 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -865,15 +865,15 @@ static int | |||
865 | e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) | 865 | e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) |
866 | { | 866 | { |
867 | struct net_device *netdev = adapter->netdev; | 867 | struct net_device *netdev = adapter->netdev; |
868 | uint32_t mask, i=0, shared_int = TRUE; | 868 | uint32_t mask, i=0, shared_int = TRUE; |
869 | uint32_t irq = adapter->pdev->irq; | 869 | uint32_t irq = adapter->pdev->irq; |
870 | 870 | ||
871 | *data = 0; | 871 | *data = 0; |
872 | 872 | ||
873 | /* Hook up test interrupt handler just for this test */ | 873 | /* Hook up test interrupt handler just for this test */ |
874 | if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) { | 874 | if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) { |
875 | shared_int = FALSE; | 875 | shared_int = FALSE; |
876 | } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, | 876 | } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, |
877 | netdev->name, netdev)){ | 877 | netdev->name, netdev)){ |
878 | *data = 1; | 878 | *data = 1; |
879 | return -1; | 879 | return -1; |
@@ -889,22 +889,22 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) | |||
889 | /* Interrupt to test */ | 889 | /* Interrupt to test */ |
890 | mask = 1 << i; | 890 | mask = 1 << i; |
891 | 891 | ||
892 | if (!shared_int) { | 892 | if (!shared_int) { |
893 | /* Disable the interrupt to be reported in | 893 | /* Disable the interrupt to be reported in |
894 | * the cause register and then force the same | 894 | * the cause register and then force the same |
895 | * interrupt and see if one gets posted. If | 895 | * interrupt and see if one gets posted. If |
896 | * an interrupt was posted to the bus, the | 896 | * an interrupt was posted to the bus, the |
897 | * test failed. | 897 | * test failed. |
898 | */ | 898 | */ |
899 | adapter->test_icr = 0; | 899 | adapter->test_icr = 0; |
900 | E1000_WRITE_REG(&adapter->hw, IMC, mask); | 900 | E1000_WRITE_REG(&adapter->hw, IMC, mask); |
901 | E1000_WRITE_REG(&adapter->hw, ICS, mask); | 901 | E1000_WRITE_REG(&adapter->hw, ICS, mask); |
902 | msec_delay(10); | 902 | msec_delay(10); |
903 | 903 | ||
904 | if (adapter->test_icr & mask) { | 904 | if (adapter->test_icr & mask) { |
905 | *data = 3; | 905 | *data = 3; |
906 | break; | 906 | break; |
907 | } | 907 | } |
908 | } | 908 | } |
909 | 909 | ||
910 | /* Enable the interrupt to be reported in | 910 | /* Enable the interrupt to be reported in |
@@ -923,7 +923,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) | |||
923 | break; | 923 | break; |
924 | } | 924 | } |
925 | 925 | ||
926 | if (!shared_int) { | 926 | if (!shared_int) { |
927 | /* Disable the other interrupts to be reported in | 927 | /* Disable the other interrupts to be reported in |
928 | * the cause register and then force the other | 928 | * the cause register and then force the other |
929 | * interrupts and see if any get posted. If | 929 | * interrupts and see if any get posted. If |
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 4c796e54b840..3959039b16ec 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -765,7 +765,7 @@ e1000_init_hw(struct e1000_hw *hw) | |||
765 | } | 765 | } |
766 | 766 | ||
767 | if (hw->mac_type == e1000_82573) { | 767 | if (hw->mac_type == e1000_82573) { |
768 | e1000_enable_tx_pkt_filtering(hw); | 768 | e1000_enable_tx_pkt_filtering(hw); |
769 | } | 769 | } |
770 | 770 | ||
771 | switch (hw->mac_type) { | 771 | switch (hw->mac_type) { |
@@ -861,7 +861,7 @@ e1000_adjust_serdes_amplitude(struct e1000_hw *hw) | |||
861 | 861 | ||
862 | if(eeprom_data != EEPROM_RESERVED_WORD) { | 862 | if(eeprom_data != EEPROM_RESERVED_WORD) { |
863 | /* Adjust SERDES output amplitude only. */ | 863 | /* Adjust SERDES output amplitude only. */ |
864 | eeprom_data &= EEPROM_SERDES_AMPLITUDE_MASK; | 864 | eeprom_data &= EEPROM_SERDES_AMPLITUDE_MASK; |
865 | ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_EXT_CTRL, eeprom_data); | 865 | ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_EXT_CTRL, eeprom_data); |
866 | if(ret_val) | 866 | if(ret_val) |
867 | return ret_val; | 867 | return ret_val; |
@@ -1228,7 +1228,7 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw) | |||
1228 | 1228 | ||
1229 | if (hw->phy_reset_disable) | 1229 | if (hw->phy_reset_disable) |
1230 | return E1000_SUCCESS; | 1230 | return E1000_SUCCESS; |
1231 | 1231 | ||
1232 | ret_val = e1000_phy_reset(hw); | 1232 | ret_val = e1000_phy_reset(hw); |
1233 | if (ret_val) { | 1233 | if (ret_val) { |
1234 | DEBUGOUT("Error Resetting the PHY\n"); | 1234 | DEBUGOUT("Error Resetting the PHY\n"); |
@@ -1370,7 +1370,7 @@ e1000_copper_link_ggp_setup(struct e1000_hw *hw) | |||
1370 | DEBUGFUNC("e1000_copper_link_ggp_setup"); | 1370 | DEBUGFUNC("e1000_copper_link_ggp_setup"); |
1371 | 1371 | ||
1372 | if(!hw->phy_reset_disable) { | 1372 | if(!hw->phy_reset_disable) { |
1373 | 1373 | ||
1374 | /* Enable CRS on TX for half-duplex operation. */ | 1374 | /* Enable CRS on TX for half-duplex operation. */ |
1375 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, | 1375 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, |
1376 | &phy_data); | 1376 | &phy_data); |
@@ -1519,7 +1519,7 @@ e1000_copper_link_mgp_setup(struct e1000_hw *hw) | |||
1519 | 1519 | ||
1520 | if(hw->phy_reset_disable) | 1520 | if(hw->phy_reset_disable) |
1521 | return E1000_SUCCESS; | 1521 | return E1000_SUCCESS; |
1522 | 1522 | ||
1523 | /* Enable CRS on TX. This must be set for half-duplex operation. */ | 1523 | /* Enable CRS on TX. This must be set for half-duplex operation. */ |
1524 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); | 1524 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); |
1525 | if(ret_val) | 1525 | if(ret_val) |
@@ -1665,7 +1665,7 @@ e1000_copper_link_autoneg(struct e1000_hw *hw) | |||
1665 | * collision distance in the Transmit Control Register. | 1665 | * collision distance in the Transmit Control Register. |
1666 | * 2) Set up flow control on the MAC to that established with | 1666 | * 2) Set up flow control on the MAC to that established with |
1667 | * the link partner. | 1667 | * the link partner. |
1668 | * 3) Config DSP to improve Gigabit link quality for some PHY revisions. | 1668 | * 3) Config DSP to improve Gigabit link quality for some PHY revisions. |
1669 | * | 1669 | * |
1670 | * hw - Struct containing variables accessed by shared code | 1670 | * hw - Struct containing variables accessed by shared code |
1671 | ******************************************************************************/ | 1671 | ******************************************************************************/ |
@@ -1674,7 +1674,7 @@ e1000_copper_link_postconfig(struct e1000_hw *hw) | |||
1674 | { | 1674 | { |
1675 | int32_t ret_val; | 1675 | int32_t ret_val; |
1676 | DEBUGFUNC("e1000_copper_link_postconfig"); | 1676 | DEBUGFUNC("e1000_copper_link_postconfig"); |
1677 | 1677 | ||
1678 | if(hw->mac_type >= e1000_82544) { | 1678 | if(hw->mac_type >= e1000_82544) { |
1679 | e1000_config_collision_dist(hw); | 1679 | e1000_config_collision_dist(hw); |
1680 | } else { | 1680 | } else { |
@@ -1698,7 +1698,7 @@ e1000_copper_link_postconfig(struct e1000_hw *hw) | |||
1698 | return ret_val; | 1698 | return ret_val; |
1699 | } | 1699 | } |
1700 | } | 1700 | } |
1701 | 1701 | ||
1702 | return E1000_SUCCESS; | 1702 | return E1000_SUCCESS; |
1703 | } | 1703 | } |
1704 | 1704 | ||
@@ -1754,11 +1754,11 @@ e1000_setup_copper_link(struct e1000_hw *hw) | |||
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | if(hw->autoneg) { | 1756 | if(hw->autoneg) { |
1757 | /* Setup autoneg and flow control advertisement | 1757 | /* Setup autoneg and flow control advertisement |
1758 | * and perform autonegotiation */ | 1758 | * and perform autonegotiation */ |
1759 | ret_val = e1000_copper_link_autoneg(hw); | 1759 | ret_val = e1000_copper_link_autoneg(hw); |
1760 | if(ret_val) | 1760 | if(ret_val) |
1761 | return ret_val; | 1761 | return ret_val; |
1762 | } else { | 1762 | } else { |
1763 | /* PHY will be set to 10H, 10F, 100H,or 100F | 1763 | /* PHY will be set to 10H, 10F, 100H,or 100F |
1764 | * depending on value from forced_speed_duplex. */ | 1764 | * depending on value from forced_speed_duplex. */ |
@@ -1786,7 +1786,7 @@ e1000_setup_copper_link(struct e1000_hw *hw) | |||
1786 | ret_val = e1000_copper_link_postconfig(hw); | 1786 | ret_val = e1000_copper_link_postconfig(hw); |
1787 | if(ret_val) | 1787 | if(ret_val) |
1788 | return ret_val; | 1788 | return ret_val; |
1789 | 1789 | ||
1790 | DEBUGOUT("Valid link established!!!\n"); | 1790 | DEBUGOUT("Valid link established!!!\n"); |
1791 | return E1000_SUCCESS; | 1791 | return E1000_SUCCESS; |
1792 | } | 1792 | } |
@@ -1984,7 +1984,7 @@ e1000_phy_setup_autoneg(struct e1000_hw *hw) | |||
1984 | 1984 | ||
1985 | DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); | 1985 | DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); |
1986 | 1986 | ||
1987 | ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); | 1987 | ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); |
1988 | if(ret_val) | 1988 | if(ret_val) |
1989 | return ret_val; | 1989 | return ret_val; |
1990 | 1990 | ||
@@ -2273,7 +2273,7 @@ e1000_config_mac_to_phy(struct e1000_hw *hw) | |||
2273 | 2273 | ||
2274 | DEBUGFUNC("e1000_config_mac_to_phy"); | 2274 | DEBUGFUNC("e1000_config_mac_to_phy"); |
2275 | 2275 | ||
2276 | /* 82544 or newer MAC, Auto Speed Detection takes care of | 2276 | /* 82544 or newer MAC, Auto Speed Detection takes care of |
2277 | * MAC speed/duplex configuration.*/ | 2277 | * MAC speed/duplex configuration.*/ |
2278 | if (hw->mac_type >= e1000_82544) | 2278 | if (hw->mac_type >= e1000_82544) |
2279 | return E1000_SUCCESS; | 2279 | return E1000_SUCCESS; |
@@ -2292,9 +2292,9 @@ e1000_config_mac_to_phy(struct e1000_hw *hw) | |||
2292 | if(ret_val) | 2292 | if(ret_val) |
2293 | return ret_val; | 2293 | return ret_val; |
2294 | 2294 | ||
2295 | if(phy_data & M88E1000_PSSR_DPLX) | 2295 | if(phy_data & M88E1000_PSSR_DPLX) |
2296 | ctrl |= E1000_CTRL_FD; | 2296 | ctrl |= E1000_CTRL_FD; |
2297 | else | 2297 | else |
2298 | ctrl &= ~E1000_CTRL_FD; | 2298 | ctrl &= ~E1000_CTRL_FD; |
2299 | 2299 | ||
2300 | e1000_config_collision_dist(hw); | 2300 | e1000_config_collision_dist(hw); |
@@ -2493,10 +2493,10 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) | |||
2493 | */ | 2493 | */ |
2494 | if(hw->original_fc == e1000_fc_full) { | 2494 | if(hw->original_fc == e1000_fc_full) { |
2495 | hw->fc = e1000_fc_full; | 2495 | hw->fc = e1000_fc_full; |
2496 | DEBUGOUT("Flow Control = FULL.\r\n"); | 2496 | DEBUGOUT("Flow Control = FULL.\n"); |
2497 | } else { | 2497 | } else { |
2498 | hw->fc = e1000_fc_rx_pause; | 2498 | hw->fc = e1000_fc_rx_pause; |
2499 | DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); | 2499 | DEBUGOUT("Flow Control = RX PAUSE frames only.\n"); |
2500 | } | 2500 | } |
2501 | } | 2501 | } |
2502 | /* For receiving PAUSE frames ONLY. | 2502 | /* For receiving PAUSE frames ONLY. |
@@ -2512,7 +2512,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) | |||
2512 | (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && | 2512 | (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && |
2513 | (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { | 2513 | (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { |
2514 | hw->fc = e1000_fc_tx_pause; | 2514 | hw->fc = e1000_fc_tx_pause; |
2515 | DEBUGOUT("Flow Control = TX PAUSE frames only.\r\n"); | 2515 | DEBUGOUT("Flow Control = TX PAUSE frames only.\n"); |
2516 | } | 2516 | } |
2517 | /* For transmitting PAUSE frames ONLY. | 2517 | /* For transmitting PAUSE frames ONLY. |
2518 | * | 2518 | * |
@@ -2527,7 +2527,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) | |||
2527 | !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && | 2527 | !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && |
2528 | (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { | 2528 | (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { |
2529 | hw->fc = e1000_fc_rx_pause; | 2529 | hw->fc = e1000_fc_rx_pause; |
2530 | DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); | 2530 | DEBUGOUT("Flow Control = RX PAUSE frames only.\n"); |
2531 | } | 2531 | } |
2532 | /* Per the IEEE spec, at this point flow control should be | 2532 | /* Per the IEEE spec, at this point flow control should be |
2533 | * disabled. However, we want to consider that we could | 2533 | * disabled. However, we want to consider that we could |
@@ -2553,10 +2553,10 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) | |||
2553 | hw->original_fc == e1000_fc_tx_pause) || | 2553 | hw->original_fc == e1000_fc_tx_pause) || |
2554 | hw->fc_strict_ieee) { | 2554 | hw->fc_strict_ieee) { |
2555 | hw->fc = e1000_fc_none; | 2555 | hw->fc = e1000_fc_none; |
2556 | DEBUGOUT("Flow Control = NONE.\r\n"); | 2556 | DEBUGOUT("Flow Control = NONE.\n"); |
2557 | } else { | 2557 | } else { |
2558 | hw->fc = e1000_fc_rx_pause; | 2558 | hw->fc = e1000_fc_rx_pause; |
2559 | DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); | 2559 | DEBUGOUT("Flow Control = RX PAUSE frames only.\n"); |
2560 | } | 2560 | } |
2561 | 2561 | ||
2562 | /* Now we need to do one last check... If we auto- | 2562 | /* Now we need to do one last check... If we auto- |
@@ -2581,7 +2581,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) | |||
2581 | return ret_val; | 2581 | return ret_val; |
2582 | } | 2582 | } |
2583 | } else { | 2583 | } else { |
2584 | DEBUGOUT("Copper PHY and Auto Neg has not completed.\r\n"); | 2584 | DEBUGOUT("Copper PHY and Auto Neg has not completed.\n"); |
2585 | } | 2585 | } |
2586 | } | 2586 | } |
2587 | return E1000_SUCCESS; | 2587 | return E1000_SUCCESS; |
@@ -2764,7 +2764,7 @@ e1000_check_for_link(struct e1000_hw *hw) | |||
2764 | hw->autoneg_failed = 1; | 2764 | hw->autoneg_failed = 1; |
2765 | return 0; | 2765 | return 0; |
2766 | } | 2766 | } |
2767 | DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\r\n"); | 2767 | DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\n"); |
2768 | 2768 | ||
2769 | /* Disable auto-negotiation in the TXCW register */ | 2769 | /* Disable auto-negotiation in the TXCW register */ |
2770 | E1000_WRITE_REG(hw, TXCW, (hw->txcw & ~E1000_TXCW_ANE)); | 2770 | E1000_WRITE_REG(hw, TXCW, (hw->txcw & ~E1000_TXCW_ANE)); |
@@ -2789,7 +2789,7 @@ e1000_check_for_link(struct e1000_hw *hw) | |||
2789 | else if(((hw->media_type == e1000_media_type_fiber) || | 2789 | else if(((hw->media_type == e1000_media_type_fiber) || |
2790 | (hw->media_type == e1000_media_type_internal_serdes)) && | 2790 | (hw->media_type == e1000_media_type_internal_serdes)) && |
2791 | (ctrl & E1000_CTRL_SLU) && (rxcw & E1000_RXCW_C)) { | 2791 | (ctrl & E1000_CTRL_SLU) && (rxcw & E1000_RXCW_C)) { |
2792 | DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\r\n"); | 2792 | DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\n"); |
2793 | E1000_WRITE_REG(hw, TXCW, hw->txcw); | 2793 | E1000_WRITE_REG(hw, TXCW, hw->txcw); |
2794 | E1000_WRITE_REG(hw, CTRL, (ctrl & ~E1000_CTRL_SLU)); | 2794 | E1000_WRITE_REG(hw, CTRL, (ctrl & ~E1000_CTRL_SLU)); |
2795 | 2795 | ||
@@ -2852,13 +2852,13 @@ e1000_get_speed_and_duplex(struct e1000_hw *hw, | |||
2852 | 2852 | ||
2853 | if(status & E1000_STATUS_FD) { | 2853 | if(status & E1000_STATUS_FD) { |
2854 | *duplex = FULL_DUPLEX; | 2854 | *duplex = FULL_DUPLEX; |
2855 | DEBUGOUT("Full Duplex\r\n"); | 2855 | DEBUGOUT("Full Duplex\n"); |
2856 | } else { | 2856 | } else { |
2857 | *duplex = HALF_DUPLEX; | 2857 | *duplex = HALF_DUPLEX; |
2858 | DEBUGOUT(" Half Duplex\r\n"); | 2858 | DEBUGOUT(" Half Duplex\n"); |
2859 | } | 2859 | } |
2860 | } else { | 2860 | } else { |
2861 | DEBUGOUT("1000 Mbs, Full Duplex\r\n"); | 2861 | DEBUGOUT("1000 Mbs, Full Duplex\n"); |
2862 | *speed = SPEED_1000; | 2862 | *speed = SPEED_1000; |
2863 | *duplex = FULL_DUPLEX; | 2863 | *duplex = FULL_DUPLEX; |
2864 | } | 2864 | } |
@@ -2884,7 +2884,7 @@ e1000_get_speed_and_duplex(struct e1000_hw *hw, | |||
2884 | } | 2884 | } |
2885 | } | 2885 | } |
2886 | 2886 | ||
2887 | if ((hw->mac_type == e1000_80003es2lan) && | 2887 | if ((hw->mac_type == e1000_80003es2lan) && |
2888 | (hw->media_type == e1000_media_type_copper)) { | 2888 | (hw->media_type == e1000_media_type_copper)) { |
2889 | if (*speed == SPEED_1000) | 2889 | if (*speed == SPEED_1000) |
2890 | ret_val = e1000_configure_kmrn_for_1000(hw); | 2890 | ret_val = e1000_configure_kmrn_for_1000(hw); |
@@ -3160,7 +3160,7 @@ e1000_read_phy_reg(struct e1000_hw *hw, | |||
3160 | if (e1000_swfw_sync_acquire(hw, swfw)) | 3160 | if (e1000_swfw_sync_acquire(hw, swfw)) |
3161 | return -E1000_ERR_SWFW_SYNC; | 3161 | return -E1000_ERR_SWFW_SYNC; |
3162 | 3162 | ||
3163 | if((hw->phy_type == e1000_phy_igp || | 3163 | if((hw->phy_type == e1000_phy_igp || |
3164 | hw->phy_type == e1000_phy_igp_2) && | 3164 | hw->phy_type == e1000_phy_igp_2) && |
3165 | (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { | 3165 | (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { |
3166 | ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, | 3166 | ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, |
@@ -3299,7 +3299,7 @@ e1000_write_phy_reg(struct e1000_hw *hw, | |||
3299 | if (e1000_swfw_sync_acquire(hw, swfw)) | 3299 | if (e1000_swfw_sync_acquire(hw, swfw)) |
3300 | return -E1000_ERR_SWFW_SYNC; | 3300 | return -E1000_ERR_SWFW_SYNC; |
3301 | 3301 | ||
3302 | if((hw->phy_type == e1000_phy_igp || | 3302 | if((hw->phy_type == e1000_phy_igp || |
3303 | hw->phy_type == e1000_phy_igp_2) && | 3303 | hw->phy_type == e1000_phy_igp_2) && |
3304 | (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { | 3304 | (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { |
3305 | ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, | 3305 | ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, |
@@ -3497,22 +3497,22 @@ e1000_phy_hw_reset(struct e1000_hw *hw) | |||
3497 | } | 3497 | } |
3498 | /* Read the device control register and assert the E1000_CTRL_PHY_RST | 3498 | /* Read the device control register and assert the E1000_CTRL_PHY_RST |
3499 | * bit. Then, take it out of reset. | 3499 | * bit. Then, take it out of reset. |
3500 | * For pre-e1000_82571 hardware, we delay for 10ms between the assert | 3500 | * For pre-e1000_82571 hardware, we delay for 10ms between the assert |
3501 | * and deassert. For e1000_82571 hardware and later, we instead delay | 3501 | * and deassert. For e1000_82571 hardware and later, we instead delay |
3502 | * for 50us between and 10ms after the deassertion. | 3502 | * for 50us between and 10ms after the deassertion. |
3503 | */ | 3503 | */ |
3504 | ctrl = E1000_READ_REG(hw, CTRL); | 3504 | ctrl = E1000_READ_REG(hw, CTRL); |
3505 | E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PHY_RST); | 3505 | E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PHY_RST); |
3506 | E1000_WRITE_FLUSH(hw); | 3506 | E1000_WRITE_FLUSH(hw); |
3507 | 3507 | ||
3508 | if (hw->mac_type < e1000_82571) | 3508 | if (hw->mac_type < e1000_82571) |
3509 | msec_delay(10); | 3509 | msec_delay(10); |
3510 | else | 3510 | else |
3511 | udelay(100); | 3511 | udelay(100); |
3512 | 3512 | ||
3513 | E1000_WRITE_REG(hw, CTRL, ctrl); | 3513 | E1000_WRITE_REG(hw, CTRL, ctrl); |
3514 | E1000_WRITE_FLUSH(hw); | 3514 | E1000_WRITE_FLUSH(hw); |
3515 | 3515 | ||
3516 | if (hw->mac_type >= e1000_82571) | 3516 | if (hw->mac_type >= e1000_82571) |
3517 | msec_delay(10); | 3517 | msec_delay(10); |
3518 | e1000_swfw_sync_release(hw, swfw); | 3518 | e1000_swfw_sync_release(hw, swfw); |
@@ -3816,7 +3816,7 @@ e1000_phy_m88_get_info(struct e1000_hw *hw, | |||
3816 | /* Check polarity status */ | 3816 | /* Check polarity status */ |
3817 | ret_val = e1000_check_polarity(hw, &polarity); | 3817 | ret_val = e1000_check_polarity(hw, &polarity); |
3818 | if(ret_val) | 3818 | if(ret_val) |
3819 | return ret_val; | 3819 | return ret_val; |
3820 | phy_info->cable_polarity = polarity; | 3820 | phy_info->cable_polarity = polarity; |
3821 | 3821 | ||
3822 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); | 3822 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); |
@@ -4541,14 +4541,14 @@ e1000_read_eeprom_eerd(struct e1000_hw *hw, | |||
4541 | 4541 | ||
4542 | E1000_WRITE_REG(hw, EERD, eerd); | 4542 | E1000_WRITE_REG(hw, EERD, eerd); |
4543 | error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_READ); | 4543 | error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_READ); |
4544 | 4544 | ||
4545 | if(error) { | 4545 | if(error) { |
4546 | break; | 4546 | break; |
4547 | } | 4547 | } |
4548 | data[i] = (E1000_READ_REG(hw, EERD) >> E1000_EEPROM_RW_REG_DATA); | 4548 | data[i] = (E1000_READ_REG(hw, EERD) >> E1000_EEPROM_RW_REG_DATA); |
4549 | 4549 | ||
4550 | } | 4550 | } |
4551 | 4551 | ||
4552 | return error; | 4552 | return error; |
4553 | } | 4553 | } |
4554 | 4554 | ||
@@ -4574,24 +4574,24 @@ e1000_write_eeprom_eewr(struct e1000_hw *hw, | |||
4574 | return -E1000_ERR_SWFW_SYNC; | 4574 | return -E1000_ERR_SWFW_SYNC; |
4575 | 4575 | ||
4576 | for (i = 0; i < words; i++) { | 4576 | for (i = 0; i < words; i++) { |
4577 | register_value = (data[i] << E1000_EEPROM_RW_REG_DATA) | | 4577 | register_value = (data[i] << E1000_EEPROM_RW_REG_DATA) | |
4578 | ((offset+i) << E1000_EEPROM_RW_ADDR_SHIFT) | | 4578 | ((offset+i) << E1000_EEPROM_RW_ADDR_SHIFT) | |
4579 | E1000_EEPROM_RW_REG_START; | 4579 | E1000_EEPROM_RW_REG_START; |
4580 | 4580 | ||
4581 | error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_WRITE); | 4581 | error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_WRITE); |
4582 | if(error) { | 4582 | if(error) { |
4583 | break; | 4583 | break; |
4584 | } | 4584 | } |
4585 | 4585 | ||
4586 | E1000_WRITE_REG(hw, EEWR, register_value); | 4586 | E1000_WRITE_REG(hw, EEWR, register_value); |
4587 | 4587 | ||
4588 | error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_WRITE); | 4588 | error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_WRITE); |
4589 | 4589 | ||
4590 | if(error) { | 4590 | if(error) { |
4591 | break; | 4591 | break; |
4592 | } | 4592 | } |
4593 | } | 4593 | } |
4594 | 4594 | ||
4595 | e1000_swfw_sync_release(hw, E1000_SWFW_EEP_SM); | 4595 | e1000_swfw_sync_release(hw, E1000_SWFW_EEP_SM); |
4596 | return error; | 4596 | return error; |
4597 | } | 4597 | } |
@@ -4611,7 +4611,7 @@ e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd) | |||
4611 | for(i = 0; i < attempts; i++) { | 4611 | for(i = 0; i < attempts; i++) { |
4612 | if(eerd == E1000_EEPROM_POLL_READ) | 4612 | if(eerd == E1000_EEPROM_POLL_READ) |
4613 | reg = E1000_READ_REG(hw, EERD); | 4613 | reg = E1000_READ_REG(hw, EERD); |
4614 | else | 4614 | else |
4615 | reg = E1000_READ_REG(hw, EEWR); | 4615 | reg = E1000_READ_REG(hw, EEWR); |
4616 | 4616 | ||
4617 | if(reg & E1000_EEPROM_RW_REG_DONE) { | 4617 | if(reg & E1000_EEPROM_RW_REG_DONE) { |
@@ -5136,7 +5136,7 @@ e1000_mc_addr_list_update(struct e1000_hw *hw, | |||
5136 | uint32_t i; | 5136 | uint32_t i; |
5137 | uint32_t num_rar_entry; | 5137 | uint32_t num_rar_entry; |
5138 | uint32_t num_mta_entry; | 5138 | uint32_t num_mta_entry; |
5139 | 5139 | ||
5140 | DEBUGFUNC("e1000_mc_addr_list_update"); | 5140 | DEBUGFUNC("e1000_mc_addr_list_update"); |
5141 | 5141 | ||
5142 | /* Set the new number of MC addresses that we are being requested to use. */ | 5142 | /* Set the new number of MC addresses that we are being requested to use. */ |
@@ -6241,7 +6241,7 @@ e1000_check_polarity(struct e1000_hw *hw, | |||
6241 | * 1 - Downshift ocured. | 6241 | * 1 - Downshift ocured. |
6242 | * | 6242 | * |
6243 | * returns: - E1000_ERR_XXX | 6243 | * returns: - E1000_ERR_XXX |
6244 | * E1000_SUCCESS | 6244 | * E1000_SUCCESS |
6245 | * | 6245 | * |
6246 | * For phy's older then IGP, this function reads the Downshift bit in the Phy | 6246 | * For phy's older then IGP, this function reads the Downshift bit in the Phy |
6247 | * Specific Status register. For IGP phy's, it reads the Downgrade bit in the | 6247 | * Specific Status register. For IGP phy's, it reads the Downgrade bit in the |
@@ -6256,7 +6256,7 @@ e1000_check_downshift(struct e1000_hw *hw) | |||
6256 | 6256 | ||
6257 | DEBUGFUNC("e1000_check_downshift"); | 6257 | DEBUGFUNC("e1000_check_downshift"); |
6258 | 6258 | ||
6259 | if(hw->phy_type == e1000_phy_igp || | 6259 | if(hw->phy_type == e1000_phy_igp || |
6260 | hw->phy_type == e1000_phy_igp_2) { | 6260 | hw->phy_type == e1000_phy_igp_2) { |
6261 | ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_LINK_HEALTH, | 6261 | ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_LINK_HEALTH, |
6262 | &phy_data); | 6262 | &phy_data); |
@@ -6685,8 +6685,8 @@ e1000_set_d0_lplu_state(struct e1000_hw *hw, | |||
6685 | 6685 | ||
6686 | 6686 | ||
6687 | } else { | 6687 | } else { |
6688 | 6688 | ||
6689 | phy_data |= IGP02E1000_PM_D0_LPLU; | 6689 | phy_data |= IGP02E1000_PM_D0_LPLU; |
6690 | ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, phy_data); | 6690 | ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, phy_data); |
6691 | if (ret_val) | 6691 | if (ret_val) |
6692 | return ret_val; | 6692 | return ret_val; |
@@ -6778,7 +6778,7 @@ int32_t | |||
6778 | e1000_host_if_read_cookie(struct e1000_hw * hw, uint8_t *buffer) | 6778 | e1000_host_if_read_cookie(struct e1000_hw * hw, uint8_t *buffer) |
6779 | { | 6779 | { |
6780 | uint8_t i; | 6780 | uint8_t i; |
6781 | uint32_t offset = E1000_MNG_DHCP_COOKIE_OFFSET; | 6781 | uint32_t offset = E1000_MNG_DHCP_COOKIE_OFFSET; |
6782 | uint8_t length = E1000_MNG_DHCP_COOKIE_LENGTH; | 6782 | uint8_t length = E1000_MNG_DHCP_COOKIE_LENGTH; |
6783 | 6783 | ||
6784 | length = (length >> 2); | 6784 | length = (length >> 2); |
@@ -6797,7 +6797,7 @@ e1000_host_if_read_cookie(struct e1000_hw * hw, uint8_t *buffer) | |||
6797 | * and also checks whether the previous command is completed. | 6797 | * and also checks whether the previous command is completed. |
6798 | * It busy waits in case of previous command is not completed. | 6798 | * It busy waits in case of previous command is not completed. |
6799 | * | 6799 | * |
6800 | * returns: - E1000_ERR_HOST_INTERFACE_COMMAND in case if is not ready or | 6800 | * returns: - E1000_ERR_HOST_INTERFACE_COMMAND in case if is not ready or |
6801 | * timeout | 6801 | * timeout |
6802 | * - E1000_SUCCESS for success. | 6802 | * - E1000_SUCCESS for success. |
6803 | ****************************************************************************/ | 6803 | ****************************************************************************/ |
@@ -6821,7 +6821,7 @@ e1000_mng_enable_host_if(struct e1000_hw * hw) | |||
6821 | msec_delay_irq(1); | 6821 | msec_delay_irq(1); |
6822 | } | 6822 | } |
6823 | 6823 | ||
6824 | if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) { | 6824 | if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) { |
6825 | DEBUGOUT("Previous command timeout failed .\n"); | 6825 | DEBUGOUT("Previous command timeout failed .\n"); |
6826 | return -E1000_ERR_HOST_INTERFACE_COMMAND; | 6826 | return -E1000_ERR_HOST_INTERFACE_COMMAND; |
6827 | } | 6827 | } |
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h index 03d07ebde4f7..467c9ed944f8 100644 --- a/drivers/net/e1000/e1000_hw.h +++ b/drivers/net/e1000/e1000_hw.h | |||
@@ -375,7 +375,7 @@ struct e1000_host_mng_dhcp_cookie{ | |||
375 | }; | 375 | }; |
376 | #endif | 376 | #endif |
377 | 377 | ||
378 | int32_t e1000_mng_write_dhcp_info(struct e1000_hw *hw, uint8_t *buffer, | 378 | int32_t e1000_mng_write_dhcp_info(struct e1000_hw *hw, uint8_t *buffer, |
379 | uint16_t length); | 379 | uint16_t length); |
380 | boolean_t e1000_check_mng_mode(struct e1000_hw *hw); | 380 | boolean_t e1000_check_mng_mode(struct e1000_hw *hw); |
381 | boolean_t e1000_enable_tx_pkt_filtering(struct e1000_hw *hw); | 381 | boolean_t e1000_enable_tx_pkt_filtering(struct e1000_hw *hw); |
@@ -1802,7 +1802,7 @@ struct e1000_hw { | |||
1802 | * value2 = [0..64512], default=4096 | 1802 | * value2 = [0..64512], default=4096 |
1803 | * value3 = [0..64512], default=0 | 1803 | * value3 = [0..64512], default=0 |
1804 | */ | 1804 | */ |
1805 | 1805 | ||
1806 | #define E1000_PSRCTL_BSIZE0_MASK 0x0000007F | 1806 | #define E1000_PSRCTL_BSIZE0_MASK 0x0000007F |
1807 | #define E1000_PSRCTL_BSIZE1_MASK 0x00003F00 | 1807 | #define E1000_PSRCTL_BSIZE1_MASK 0x00003F00 |
1808 | #define E1000_PSRCTL_BSIZE2_MASK 0x003F0000 | 1808 | #define E1000_PSRCTL_BSIZE2_MASK 0x003F0000 |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index fb8cef619142..258c7d53930e 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -29,45 +29,6 @@ | |||
29 | 29 | ||
30 | #include "e1000.h" | 30 | #include "e1000.h" |
31 | 31 | ||
32 | /* Change Log | ||
33 | * 7.0.33 3-Feb-2006 | ||
34 | * o Added another fix for the pass false carrier bit | ||
35 | * 7.0.32 24-Jan-2006 | ||
36 | * o Need to rebuild with noew version number for the pass false carrier | ||
37 | * fix in e1000_hw.c | ||
38 | * 7.0.30 18-Jan-2006 | ||
39 | * o fixup for tso workaround to disable it for pci-x | ||
40 | * o fix mem leak on 82542 | ||
41 | * o fixes for 10 Mb/s connections and incorrect stats | ||
42 | * 7.0.28 01/06/2006 | ||
43 | * o hardware workaround to only set "speed mode" bit for 1G link. | ||
44 | * 7.0.26 12/23/2005 | ||
45 | * o wake on lan support modified for device ID 10B5 | ||
46 | * o fix dhcp + vlan issue not making it to the iAMT firmware | ||
47 | * 7.0.24 12/9/2005 | ||
48 | * o New hardware support for the Gigabit NIC embedded in the south bridge | ||
49 | * o Fixes to the recycling logic (skb->tail) from IBM LTC | ||
50 | * 6.3.9 12/16/2005 | ||
51 | * o incorporate fix for recycled skbs from IBM LTC | ||
52 | * 6.3.7 11/18/2005 | ||
53 | * o Honor eeprom setting for enabling/disabling Wake On Lan | ||
54 | * 6.3.5 11/17/2005 | ||
55 | * o Fix memory leak in rx ring handling for PCI Express adapters | ||
56 | * 6.3.4 11/8/05 | ||
57 | * o Patch from Jesper Juhl to remove redundant NULL checks for kfree | ||
58 | * 6.3.2 9/20/05 | ||
59 | * o Render logic that sets/resets DRV_LOAD as inline functions to | ||
60 | * avoid code replication. If f/w is AMT then set DRV_LOAD only when | ||
61 | * network interface is open. | ||
62 | * o Handle DRV_LOAD set/reset in cases where AMT uses VLANs. | ||
63 | * o Adjust PBA partioning for Jumbo frames using MTU size and not | ||
64 | * rx_buffer_len | ||
65 | * 6.3.1 9/19/05 | ||
66 | * o Use adapter->tx_timeout_factor in Tx Hung Detect logic | ||
67 | * (e1000_clean_tx_irq) | ||
68 | * o Support for 8086:10B5 device (Quad Port) | ||
69 | */ | ||
70 | |||
71 | char e1000_driver_name[] = "e1000"; | 32 | char e1000_driver_name[] = "e1000"; |
72 | static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; | 33 | static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; |
73 | #ifndef CONFIG_E1000_NAPI | 34 | #ifndef CONFIG_E1000_NAPI |
@@ -75,7 +36,7 @@ static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; | |||
75 | #else | 36 | #else |
76 | #define DRIVERNAPI "-NAPI" | 37 | #define DRIVERNAPI "-NAPI" |
77 | #endif | 38 | #endif |
78 | #define DRV_VERSION "7.0.38-k2"DRIVERNAPI | 39 | #define DRV_VERSION "7.0.38-k4"DRIVERNAPI |
79 | char e1000_driver_version[] = DRV_VERSION; | 40 | char e1000_driver_version[] = DRV_VERSION; |
80 | static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 41 | static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
81 | 42 | ||
@@ -221,6 +182,7 @@ static void e1000_restore_vlan(struct e1000_adapter *adapter); | |||
221 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); | 182 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); |
222 | static int e1000_resume(struct pci_dev *pdev); | 183 | static int e1000_resume(struct pci_dev *pdev); |
223 | #endif | 184 | #endif |
185 | static void e1000_shutdown(struct pci_dev *pdev); | ||
224 | 186 | ||
225 | #ifdef CONFIG_NET_POLL_CONTROLLER | 187 | #ifdef CONFIG_NET_POLL_CONTROLLER |
226 | /* for netdump / net console */ | 188 | /* for netdump / net console */ |
@@ -236,8 +198,9 @@ static struct pci_driver e1000_driver = { | |||
236 | /* Power Managment Hooks */ | 198 | /* Power Managment Hooks */ |
237 | #ifdef CONFIG_PM | 199 | #ifdef CONFIG_PM |
238 | .suspend = e1000_suspend, | 200 | .suspend = e1000_suspend, |
239 | .resume = e1000_resume | 201 | .resume = e1000_resume, |
240 | #endif | 202 | #endif |
203 | .shutdown = e1000_shutdown | ||
241 | }; | 204 | }; |
242 | 205 | ||
243 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); | 206 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); |
@@ -347,7 +310,7 @@ e1000_update_mng_vlan(struct e1000_adapter *adapter) | |||
347 | * For ASF and Pass Through versions of f/w this means that the | 310 | * For ASF and Pass Through versions of f/w this means that the |
348 | * driver is no longer loaded. For AMT version (only with 82573) i | 311 | * driver is no longer loaded. For AMT version (only with 82573) i |
349 | * of the f/w this means that the netowrk i/f is closed. | 312 | * of the f/w this means that the netowrk i/f is closed. |
350 | * | 313 | * |
351 | **/ | 314 | **/ |
352 | 315 | ||
353 | static void | 316 | static void |
@@ -379,10 +342,10 @@ e1000_release_hw_control(struct e1000_adapter *adapter) | |||
379 | * @adapter: address of board private structure | 342 | * @adapter: address of board private structure |
380 | * | 343 | * |
381 | * e1000_get_hw_control sets {CTRL_EXT|FWSM}:DRV_LOAD bit. | 344 | * e1000_get_hw_control sets {CTRL_EXT|FWSM}:DRV_LOAD bit. |
382 | * For ASF and Pass Through versions of f/w this means that | 345 | * For ASF and Pass Through versions of f/w this means that |
383 | * the driver is loaded. For AMT version (only with 82573) | 346 | * the driver is loaded. For AMT version (only with 82573) |
384 | * of the f/w this means that the netowrk i/f is open. | 347 | * of the f/w this means that the netowrk i/f is open. |
385 | * | 348 | * |
386 | **/ | 349 | **/ |
387 | 350 | ||
388 | static void | 351 | static void |
@@ -712,8 +675,8 @@ e1000_probe(struct pci_dev *pdev, | |||
712 | DPRINTK(PROBE, INFO, "PHY reset is blocked due to SOL/IDER session.\n"); | 675 | DPRINTK(PROBE, INFO, "PHY reset is blocked due to SOL/IDER session.\n"); |
713 | 676 | ||
714 | /* if ksp3, indicate if it's port a being setup */ | 677 | /* if ksp3, indicate if it's port a being setup */ |
715 | if (pdev->device == E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 && | 678 | if (pdev->device == E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 && |
716 | e1000_ksp3_port_a == 0) | 679 | e1000_ksp3_port_a == 0) |
717 | adapter->ksp3_port_a = 1; | 680 | adapter->ksp3_port_a = 1; |
718 | e1000_ksp3_port_a++; | 681 | e1000_ksp3_port_a++; |
719 | /* Reset for multiple KP3 adapters */ | 682 | /* Reset for multiple KP3 adapters */ |
@@ -741,9 +704,9 @@ e1000_probe(struct pci_dev *pdev, | |||
741 | if (pci_using_dac) | 704 | if (pci_using_dac) |
742 | netdev->features |= NETIF_F_HIGHDMA; | 705 | netdev->features |= NETIF_F_HIGHDMA; |
743 | 706 | ||
744 | /* hard_start_xmit is safe against parallel locking */ | 707 | /* hard_start_xmit is safe against parallel locking */ |
745 | netdev->features |= NETIF_F_LLTX; | 708 | netdev->features |= NETIF_F_LLTX; |
746 | 709 | ||
747 | adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw); | 710 | adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw); |
748 | 711 | ||
749 | /* before reading the EEPROM, reset the controller to | 712 | /* before reading the EEPROM, reset the controller to |
@@ -2771,7 +2734,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2771 | unsigned int nr_frags = 0; | 2734 | unsigned int nr_frags = 0; |
2772 | unsigned int mss = 0; | 2735 | unsigned int mss = 0; |
2773 | int count = 0; | 2736 | int count = 0; |
2774 | int tso; | 2737 | int tso; |
2775 | unsigned int f; | 2738 | unsigned int f; |
2776 | len -= skb->data_len; | 2739 | len -= skb->data_len; |
2777 | 2740 | ||
@@ -2784,7 +2747,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2784 | 2747 | ||
2785 | #ifdef NETIF_F_TSO | 2748 | #ifdef NETIF_F_TSO |
2786 | mss = skb_shinfo(skb)->tso_size; | 2749 | mss = skb_shinfo(skb)->tso_size; |
2787 | /* The controller does a simple calculation to | 2750 | /* The controller does a simple calculation to |
2788 | * make sure there is enough room in the FIFO before | 2751 | * make sure there is enough room in the FIFO before |
2789 | * initiating the DMA for each buffer. The calc is: | 2752 | * initiating the DMA for each buffer. The calc is: |
2790 | * 4 = ceil(buffer len/mss). To make sure we don't | 2753 | * 4 = ceil(buffer len/mss). To make sure we don't |
@@ -2807,7 +2770,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2807 | case e1000_82573: | 2770 | case e1000_82573: |
2808 | pull_size = min((unsigned int)4, skb->data_len); | 2771 | pull_size = min((unsigned int)4, skb->data_len); |
2809 | if (!__pskb_pull_tail(skb, pull_size)) { | 2772 | if (!__pskb_pull_tail(skb, pull_size)) { |
2810 | printk(KERN_ERR | 2773 | printk(KERN_ERR |
2811 | "__pskb_pull_tail failed.\n"); | 2774 | "__pskb_pull_tail failed.\n"); |
2812 | dev_kfree_skb_any(skb); | 2775 | dev_kfree_skb_any(skb); |
2813 | return NETDEV_TX_OK; | 2776 | return NETDEV_TX_OK; |
@@ -3753,7 +3716,7 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
3753 | * throughput, so unsplit small packets and save the alloc/put*/ | 3716 | * throughput, so unsplit small packets and save the alloc/put*/ |
3754 | if (l1 && ((length + l1) <= adapter->rx_ps_bsize0)) { | 3717 | if (l1 && ((length + l1) <= adapter->rx_ps_bsize0)) { |
3755 | u8 *vaddr; | 3718 | u8 *vaddr; |
3756 | /* there is no documentation about how to call | 3719 | /* there is no documentation about how to call |
3757 | * kmap_atomic, so we can't hold the mapping | 3720 | * kmap_atomic, so we can't hold the mapping |
3758 | * very long */ | 3721 | * very long */ |
3759 | pci_dma_sync_single_for_cpu(pdev, | 3722 | pci_dma_sync_single_for_cpu(pdev, |
@@ -4605,6 +4568,12 @@ e1000_resume(struct pci_dev *pdev) | |||
4605 | return 0; | 4568 | return 0; |
4606 | } | 4569 | } |
4607 | #endif | 4570 | #endif |
4571 | |||
4572 | static void e1000_shutdown(struct pci_dev *pdev) | ||
4573 | { | ||
4574 | e1000_suspend(pdev, PMSG_SUSPEND); | ||
4575 | } | ||
4576 | |||
4608 | #ifdef CONFIG_NET_POLL_CONTROLLER | 4577 | #ifdef CONFIG_NET_POLL_CONTROLLER |
4609 | /* | 4578 | /* |
4610 | * Polling 'interrupt' - used by things like netconsole to send skbs | 4579 | * Polling 'interrupt' - used by things like netconsole to send skbs |