diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-08-24 00:45:36 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-24 00:45:36 -0400 |
commit | 699a71238856b19091503c671bac8abb1e3f9a3a (patch) | |
tree | db0e6db06961db05c35f3df61e7f14b845b7cd29 /drivers/net/e1000 | |
parent | 85a7ea1b0a3263f3ad423b789a841d03c9acbb65 (diff) | |
parent | 891b11f619dcfe045015394fa89041f02dac9428 (diff) |
Merge branch 'upstream-fixes' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into tmp
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 40 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_hw.c | 24 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 9 |
3 files changed, 52 insertions, 21 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 88a82ba88f57..2baccf864328 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -183,6 +183,9 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
183 | return -EINVAL; | 183 | return -EINVAL; |
184 | } | 184 | } |
185 | 185 | ||
186 | while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) | ||
187 | msleep(1); | ||
188 | |||
186 | if (ecmd->autoneg == AUTONEG_ENABLE) { | 189 | if (ecmd->autoneg == AUTONEG_ENABLE) { |
187 | hw->autoneg = 1; | 190 | hw->autoneg = 1; |
188 | if (hw->media_type == e1000_media_type_fiber) | 191 | if (hw->media_type == e1000_media_type_fiber) |
@@ -199,16 +202,20 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
199 | ADVERTISED_TP; | 202 | ADVERTISED_TP; |
200 | ecmd->advertising = hw->autoneg_advertised; | 203 | ecmd->advertising = hw->autoneg_advertised; |
201 | } else | 204 | } else |
202 | if (e1000_set_spd_dplx(adapter, ecmd->speed + ecmd->duplex)) | 205 | if (e1000_set_spd_dplx(adapter, ecmd->speed + ecmd->duplex)) { |
206 | clear_bit(__E1000_RESETTING, &adapter->flags); | ||
203 | return -EINVAL; | 207 | return -EINVAL; |
208 | } | ||
204 | 209 | ||
205 | /* reset the link */ | 210 | /* reset the link */ |
206 | 211 | ||
207 | if (netif_running(adapter->netdev)) | 212 | if (netif_running(adapter->netdev)) { |
208 | e1000_reinit_locked(adapter); | 213 | e1000_down(adapter); |
209 | else | 214 | e1000_up(adapter); |
215 | } else | ||
210 | e1000_reset(adapter); | 216 | e1000_reset(adapter); |
211 | 217 | ||
218 | clear_bit(__E1000_RESETTING, &adapter->flags); | ||
212 | return 0; | 219 | return 0; |
213 | } | 220 | } |
214 | 221 | ||
@@ -238,9 +245,13 @@ e1000_set_pauseparam(struct net_device *netdev, | |||
238 | { | 245 | { |
239 | struct e1000_adapter *adapter = netdev_priv(netdev); | 246 | struct e1000_adapter *adapter = netdev_priv(netdev); |
240 | struct e1000_hw *hw = &adapter->hw; | 247 | struct e1000_hw *hw = &adapter->hw; |
248 | int retval = 0; | ||
241 | 249 | ||
242 | adapter->fc_autoneg = pause->autoneg; | 250 | adapter->fc_autoneg = pause->autoneg; |
243 | 251 | ||
252 | while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) | ||
253 | msleep(1); | ||
254 | |||
244 | if (pause->rx_pause && pause->tx_pause) | 255 | if (pause->rx_pause && pause->tx_pause) |
245 | hw->fc = e1000_fc_full; | 256 | hw->fc = e1000_fc_full; |
246 | else if (pause->rx_pause && !pause->tx_pause) | 257 | else if (pause->rx_pause && !pause->tx_pause) |
@@ -253,15 +264,17 @@ e1000_set_pauseparam(struct net_device *netdev, | |||
253 | hw->original_fc = hw->fc; | 264 | hw->original_fc = hw->fc; |
254 | 265 | ||
255 | if (adapter->fc_autoneg == AUTONEG_ENABLE) { | 266 | if (adapter->fc_autoneg == AUTONEG_ENABLE) { |
256 | if (netif_running(adapter->netdev)) | 267 | if (netif_running(adapter->netdev)) { |
257 | e1000_reinit_locked(adapter); | 268 | e1000_down(adapter); |
258 | else | 269 | e1000_up(adapter); |
270 | } else | ||
259 | e1000_reset(adapter); | 271 | e1000_reset(adapter); |
260 | } else | 272 | } else |
261 | return ((hw->media_type == e1000_media_type_fiber) ? | 273 | retval = ((hw->media_type == e1000_media_type_fiber) ? |
262 | e1000_setup_link(hw) : e1000_force_mac_fc(hw)); | 274 | e1000_setup_link(hw) : e1000_force_mac_fc(hw)); |
263 | 275 | ||
264 | return 0; | 276 | clear_bit(__E1000_RESETTING, &adapter->flags); |
277 | return retval; | ||
265 | } | 278 | } |
266 | 279 | ||
267 | static uint32_t | 280 | static uint32_t |
@@ -1590,6 +1603,8 @@ e1000_diag_test_count(struct net_device *netdev) | |||
1590 | return E1000_TEST_LEN; | 1603 | return E1000_TEST_LEN; |
1591 | } | 1604 | } |
1592 | 1605 | ||
1606 | extern void e1000_power_up_phy(struct e1000_adapter *); | ||
1607 | |||
1593 | static void | 1608 | static void |
1594 | e1000_diag_test(struct net_device *netdev, | 1609 | e1000_diag_test(struct net_device *netdev, |
1595 | struct ethtool_test *eth_test, uint64_t *data) | 1610 | struct ethtool_test *eth_test, uint64_t *data) |
@@ -1606,6 +1621,8 @@ e1000_diag_test(struct net_device *netdev, | |||
1606 | uint8_t forced_speed_duplex = adapter->hw.forced_speed_duplex; | 1621 | uint8_t forced_speed_duplex = adapter->hw.forced_speed_duplex; |
1607 | uint8_t autoneg = adapter->hw.autoneg; | 1622 | uint8_t autoneg = adapter->hw.autoneg; |
1608 | 1623 | ||
1624 | DPRINTK(HW, INFO, "offline testing starting\n"); | ||
1625 | |||
1609 | /* Link test performed before hardware reset so autoneg doesn't | 1626 | /* Link test performed before hardware reset so autoneg doesn't |
1610 | * interfere with test result */ | 1627 | * interfere with test result */ |
1611 | if (e1000_link_test(adapter, &data[4])) | 1628 | if (e1000_link_test(adapter, &data[4])) |
@@ -1629,6 +1646,8 @@ e1000_diag_test(struct net_device *netdev, | |||
1629 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1646 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1630 | 1647 | ||
1631 | e1000_reset(adapter); | 1648 | e1000_reset(adapter); |
1649 | /* make sure the phy is powered up */ | ||
1650 | e1000_power_up_phy(adapter); | ||
1632 | if (e1000_loopback_test(adapter, &data[3])) | 1651 | if (e1000_loopback_test(adapter, &data[3])) |
1633 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1652 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1634 | 1653 | ||
@@ -1642,6 +1661,7 @@ e1000_diag_test(struct net_device *netdev, | |||
1642 | if (if_running) | 1661 | if (if_running) |
1643 | dev_open(netdev); | 1662 | dev_open(netdev); |
1644 | } else { | 1663 | } else { |
1664 | DPRINTK(HW, INFO, "online testing starting\n"); | ||
1645 | /* Online tests */ | 1665 | /* Online tests */ |
1646 | if (e1000_link_test(adapter, &data[4])) | 1666 | if (e1000_link_test(adapter, &data[4])) |
1647 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1667 | eth_test->flags |= ETH_TEST_FL_FAILED; |
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index b3b919116e0f..f62d17848332 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -745,6 +745,17 @@ e1000_init_hw(struct e1000_hw *hw) | |||
745 | 745 | ||
746 | DEBUGFUNC("e1000_init_hw"); | 746 | DEBUGFUNC("e1000_init_hw"); |
747 | 747 | ||
748 | /* force full DMA clock frequency for 10/100 on ICH8 A0-B0 */ | ||
749 | if (hw->mac_type == e1000_ich8lan) { | ||
750 | reg_data = E1000_READ_REG(hw, TARC0); | ||
751 | reg_data |= 0x30000000; | ||
752 | E1000_WRITE_REG(hw, TARC0, reg_data); | ||
753 | |||
754 | reg_data = E1000_READ_REG(hw, STATUS); | ||
755 | reg_data &= ~0x80000000; | ||
756 | E1000_WRITE_REG(hw, STATUS, reg_data); | ||
757 | } | ||
758 | |||
748 | /* Initialize Identification LED */ | 759 | /* Initialize Identification LED */ |
749 | ret_val = e1000_id_led_init(hw); | 760 | ret_val = e1000_id_led_init(hw); |
750 | if(ret_val) { | 761 | if(ret_val) { |
@@ -1351,11 +1362,14 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw) | |||
1351 | E1000_WRITE_REG(hw, LEDCTL, led_ctrl); | 1362 | E1000_WRITE_REG(hw, LEDCTL, led_ctrl); |
1352 | } | 1363 | } |
1353 | 1364 | ||
1354 | /* disable lplu d3 during driver init */ | 1365 | /* The NVM settings will configure LPLU in D3 for IGP2 and IGP3 PHYs */ |
1355 | ret_val = e1000_set_d3_lplu_state(hw, FALSE); | 1366 | if (hw->phy_type == e1000_phy_igp) { |
1356 | if (ret_val) { | 1367 | /* disable lplu d3 during driver init */ |
1357 | DEBUGOUT("Error Disabling LPLU D3\n"); | 1368 | ret_val = e1000_set_d3_lplu_state(hw, FALSE); |
1358 | return ret_val; | 1369 | if (ret_val) { |
1370 | DEBUGOUT("Error Disabling LPLU D3\n"); | ||
1371 | return ret_val; | ||
1372 | } | ||
1359 | } | 1373 | } |
1360 | 1374 | ||
1361 | /* disable lplu d0 during driver init */ | 1375 | /* disable lplu d0 during driver init */ |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 336435d81eca..0cf9ff2462ba 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -36,7 +36,7 @@ static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; | |||
36 | #else | 36 | #else |
37 | #define DRIVERNAPI "-NAPI" | 37 | #define DRIVERNAPI "-NAPI" |
38 | #endif | 38 | #endif |
39 | #define DRV_VERSION "7.1.9-k4"DRIVERNAPI | 39 | #define DRV_VERSION "7.1.9-k6"DRIVERNAPI |
40 | char e1000_driver_version[] = DRV_VERSION; | 40 | char e1000_driver_version[] = DRV_VERSION; |
41 | static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 41 | static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
42 | 42 | ||
@@ -48,7 +48,6 @@ static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | |||
48 | * {PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)} | 48 | * {PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)} |
49 | */ | 49 | */ |
50 | static struct pci_device_id e1000_pci_tbl[] = { | 50 | static struct pci_device_id e1000_pci_tbl[] = { |
51 | INTEL_E1000_ETHERNET_DEVICE(0x1000), | ||
52 | INTEL_E1000_ETHERNET_DEVICE(0x1001), | 51 | INTEL_E1000_ETHERNET_DEVICE(0x1001), |
53 | INTEL_E1000_ETHERNET_DEVICE(0x1004), | 52 | INTEL_E1000_ETHERNET_DEVICE(0x1004), |
54 | INTEL_E1000_ETHERNET_DEVICE(0x1008), | 53 | INTEL_E1000_ETHERNET_DEVICE(0x1008), |
@@ -485,7 +484,7 @@ e1000_up(struct e1000_adapter *adapter) | |||
485 | * | 484 | * |
486 | **/ | 485 | **/ |
487 | 486 | ||
488 | static void e1000_power_up_phy(struct e1000_adapter *adapter) | 487 | void e1000_power_up_phy(struct e1000_adapter *adapter) |
489 | { | 488 | { |
490 | uint16_t mii_reg = 0; | 489 | uint16_t mii_reg = 0; |
491 | 490 | ||
@@ -1499,8 +1498,6 @@ e1000_configure_tx(struct e1000_adapter *adapter) | |||
1499 | } else if (hw->mac_type == e1000_80003es2lan) { | 1498 | } else if (hw->mac_type == e1000_80003es2lan) { |
1500 | tarc = E1000_READ_REG(hw, TARC0); | 1499 | tarc = E1000_READ_REG(hw, TARC0); |
1501 | tarc |= 1; | 1500 | tarc |= 1; |
1502 | if (hw->media_type == e1000_media_type_internal_serdes) | ||
1503 | tarc |= (1 << 20); | ||
1504 | E1000_WRITE_REG(hw, TARC0, tarc); | 1501 | E1000_WRITE_REG(hw, TARC0, tarc); |
1505 | tarc = E1000_READ_REG(hw, TARC1); | 1502 | tarc = E1000_READ_REG(hw, TARC1); |
1506 | tarc |= 1; | 1503 | tarc |= 1; |
@@ -2545,7 +2542,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2545 | cmd_length = E1000_TXD_CMD_IP; | 2542 | cmd_length = E1000_TXD_CMD_IP; |
2546 | ipcse = skb->h.raw - skb->data - 1; | 2543 | ipcse = skb->h.raw - skb->data - 1; |
2547 | #ifdef NETIF_F_TSO_IPV6 | 2544 | #ifdef NETIF_F_TSO_IPV6 |
2548 | } else if (skb->protocol == ntohs(ETH_P_IPV6)) { | 2545 | } else if (skb->protocol == htons(ETH_P_IPV6)) { |
2549 | skb->nh.ipv6h->payload_len = 0; | 2546 | skb->nh.ipv6h->payload_len = 0; |
2550 | skb->h.th->check = | 2547 | skb->h.th->check = |
2551 | ~csum_ipv6_magic(&skb->nh.ipv6h->saddr, | 2548 | ~csum_ipv6_magic(&skb->nh.ipv6h->saddr, |