Merge branch 'e1000-7.0.38-k4' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into upstream
This commit is contained in:
commit
bdad69b23c
@ -1,7 +1,7 @@
|
||||
################################################################################
|
||||
#
|
||||
#
|
||||
# Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved.
|
||||
# Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the Free
|
||||
|
@ -865,15 +865,15 @@ static int
|
||||
e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
|
||||
{
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
uint32_t mask, i=0, shared_int = TRUE;
|
||||
uint32_t irq = adapter->pdev->irq;
|
||||
uint32_t mask, i=0, shared_int = TRUE;
|
||||
uint32_t irq = adapter->pdev->irq;
|
||||
|
||||
*data = 0;
|
||||
|
||||
/* Hook up test interrupt handler just for this test */
|
||||
if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) {
|
||||
shared_int = FALSE;
|
||||
} else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ,
|
||||
if (!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) {
|
||||
shared_int = FALSE;
|
||||
} else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ,
|
||||
netdev->name, netdev)){
|
||||
*data = 1;
|
||||
return -1;
|
||||
@ -889,22 +889,22 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
|
||||
/* Interrupt to test */
|
||||
mask = 1 << i;
|
||||
|
||||
if (!shared_int) {
|
||||
/* Disable the interrupt to be reported in
|
||||
* the cause register and then force the same
|
||||
* interrupt and see if one gets posted. If
|
||||
* an interrupt was posted to the bus, the
|
||||
* test failed.
|
||||
*/
|
||||
adapter->test_icr = 0;
|
||||
E1000_WRITE_REG(&adapter->hw, IMC, mask);
|
||||
E1000_WRITE_REG(&adapter->hw, ICS, mask);
|
||||
msec_delay(10);
|
||||
if (!shared_int) {
|
||||
/* Disable the interrupt to be reported in
|
||||
* the cause register and then force the same
|
||||
* interrupt and see if one gets posted. If
|
||||
* an interrupt was posted to the bus, the
|
||||
* test failed.
|
||||
*/
|
||||
adapter->test_icr = 0;
|
||||
E1000_WRITE_REG(&adapter->hw, IMC, mask);
|
||||
E1000_WRITE_REG(&adapter->hw, ICS, mask);
|
||||
msec_delay(10);
|
||||
|
||||
if (adapter->test_icr & mask) {
|
||||
*data = 3;
|
||||
break;
|
||||
}
|
||||
if (adapter->test_icr & mask) {
|
||||
*data = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable the interrupt to be reported in
|
||||
@ -923,7 +923,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!shared_int) {
|
||||
if (!shared_int) {
|
||||
/* Disable the other interrupts to be reported in
|
||||
* the cause register and then force the other
|
||||
* interrupts and see if any get posted. If
|
||||
|
@ -2493,10 +2493,10 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw)
|
||||
*/
|
||||
if(hw->original_fc == e1000_fc_full) {
|
||||
hw->fc = e1000_fc_full;
|
||||
DEBUGOUT("Flow Control = FULL.\r\n");
|
||||
DEBUGOUT("Flow Control = FULL.\n");
|
||||
} else {
|
||||
hw->fc = e1000_fc_rx_pause;
|
||||
DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n");
|
||||
DEBUGOUT("Flow Control = RX PAUSE frames only.\n");
|
||||
}
|
||||
}
|
||||
/* For receiving PAUSE frames ONLY.
|
||||
@ -2512,7 +2512,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw)
|
||||
(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) &&
|
||||
(mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) {
|
||||
hw->fc = e1000_fc_tx_pause;
|
||||
DEBUGOUT("Flow Control = TX PAUSE frames only.\r\n");
|
||||
DEBUGOUT("Flow Control = TX PAUSE frames only.\n");
|
||||
}
|
||||
/* For transmitting PAUSE frames ONLY.
|
||||
*
|
||||
@ -2527,7 +2527,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw)
|
||||
!(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) &&
|
||||
(mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) {
|
||||
hw->fc = e1000_fc_rx_pause;
|
||||
DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n");
|
||||
DEBUGOUT("Flow Control = RX PAUSE frames only.\n");
|
||||
}
|
||||
/* Per the IEEE spec, at this point flow control should be
|
||||
* disabled. However, we want to consider that we could
|
||||
@ -2553,10 +2553,10 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw)
|
||||
hw->original_fc == e1000_fc_tx_pause) ||
|
||||
hw->fc_strict_ieee) {
|
||||
hw->fc = e1000_fc_none;
|
||||
DEBUGOUT("Flow Control = NONE.\r\n");
|
||||
DEBUGOUT("Flow Control = NONE.\n");
|
||||
} else {
|
||||
hw->fc = e1000_fc_rx_pause;
|
||||
DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n");
|
||||
DEBUGOUT("Flow Control = RX PAUSE frames only.\n");
|
||||
}
|
||||
|
||||
/* 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)
|
||||
return ret_val;
|
||||
}
|
||||
} else {
|
||||
DEBUGOUT("Copper PHY and Auto Neg has not completed.\r\n");
|
||||
DEBUGOUT("Copper PHY and Auto Neg has not completed.\n");
|
||||
}
|
||||
}
|
||||
return E1000_SUCCESS;
|
||||
@ -2764,7 +2764,7 @@ e1000_check_for_link(struct e1000_hw *hw)
|
||||
hw->autoneg_failed = 1;
|
||||
return 0;
|
||||
}
|
||||
DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\r\n");
|
||||
DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\n");
|
||||
|
||||
/* Disable auto-negotiation in the TXCW register */
|
||||
E1000_WRITE_REG(hw, TXCW, (hw->txcw & ~E1000_TXCW_ANE));
|
||||
@ -2789,7 +2789,7 @@ e1000_check_for_link(struct e1000_hw *hw)
|
||||
else if(((hw->media_type == e1000_media_type_fiber) ||
|
||||
(hw->media_type == e1000_media_type_internal_serdes)) &&
|
||||
(ctrl & E1000_CTRL_SLU) && (rxcw & E1000_RXCW_C)) {
|
||||
DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\r\n");
|
||||
DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\n");
|
||||
E1000_WRITE_REG(hw, TXCW, hw->txcw);
|
||||
E1000_WRITE_REG(hw, CTRL, (ctrl & ~E1000_CTRL_SLU));
|
||||
|
||||
@ -2852,13 +2852,13 @@ e1000_get_speed_and_duplex(struct e1000_hw *hw,
|
||||
|
||||
if(status & E1000_STATUS_FD) {
|
||||
*duplex = FULL_DUPLEX;
|
||||
DEBUGOUT("Full Duplex\r\n");
|
||||
DEBUGOUT("Full Duplex\n");
|
||||
} else {
|
||||
*duplex = HALF_DUPLEX;
|
||||
DEBUGOUT(" Half Duplex\r\n");
|
||||
DEBUGOUT(" Half Duplex\n");
|
||||
}
|
||||
} else {
|
||||
DEBUGOUT("1000 Mbs, Full Duplex\r\n");
|
||||
DEBUGOUT("1000 Mbs, Full Duplex\n");
|
||||
*speed = SPEED_1000;
|
||||
*duplex = FULL_DUPLEX;
|
||||
}
|
||||
|
@ -29,45 +29,6 @@
|
||||
|
||||
#include "e1000.h"
|
||||
|
||||
/* Change Log
|
||||
* 7.0.33 3-Feb-2006
|
||||
* o Added another fix for the pass false carrier bit
|
||||
* 7.0.32 24-Jan-2006
|
||||
* o Need to rebuild with noew version number for the pass false carrier
|
||||
* fix in e1000_hw.c
|
||||
* 7.0.30 18-Jan-2006
|
||||
* o fixup for tso workaround to disable it for pci-x
|
||||
* o fix mem leak on 82542
|
||||
* o fixes for 10 Mb/s connections and incorrect stats
|
||||
* 7.0.28 01/06/2006
|
||||
* o hardware workaround to only set "speed mode" bit for 1G link.
|
||||
* 7.0.26 12/23/2005
|
||||
* o wake on lan support modified for device ID 10B5
|
||||
* o fix dhcp + vlan issue not making it to the iAMT firmware
|
||||
* 7.0.24 12/9/2005
|
||||
* o New hardware support for the Gigabit NIC embedded in the south bridge
|
||||
* o Fixes to the recycling logic (skb->tail) from IBM LTC
|
||||
* 6.3.9 12/16/2005
|
||||
* o incorporate fix for recycled skbs from IBM LTC
|
||||
* 6.3.7 11/18/2005
|
||||
* o Honor eeprom setting for enabling/disabling Wake On Lan
|
||||
* 6.3.5 11/17/2005
|
||||
* o Fix memory leak in rx ring handling for PCI Express adapters
|
||||
* 6.3.4 11/8/05
|
||||
* o Patch from Jesper Juhl to remove redundant NULL checks for kfree
|
||||
* 6.3.2 9/20/05
|
||||
* o Render logic that sets/resets DRV_LOAD as inline functions to
|
||||
* avoid code replication. If f/w is AMT then set DRV_LOAD only when
|
||||
* network interface is open.
|
||||
* o Handle DRV_LOAD set/reset in cases where AMT uses VLANs.
|
||||
* o Adjust PBA partioning for Jumbo frames using MTU size and not
|
||||
* rx_buffer_len
|
||||
* 6.3.1 9/19/05
|
||||
* o Use adapter->tx_timeout_factor in Tx Hung Detect logic
|
||||
* (e1000_clean_tx_irq)
|
||||
* o Support for 8086:10B5 device (Quad Port)
|
||||
*/
|
||||
|
||||
char e1000_driver_name[] = "e1000";
|
||||
static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
|
||||
#ifndef CONFIG_E1000_NAPI
|
||||
@ -75,7 +36,7 @@ static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
|
||||
#else
|
||||
#define DRIVERNAPI "-NAPI"
|
||||
#endif
|
||||
#define DRV_VERSION "7.0.38-k2"DRIVERNAPI
|
||||
#define DRV_VERSION "7.0.38-k4"DRIVERNAPI
|
||||
char e1000_driver_version[] = DRV_VERSION;
|
||||
static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
|
||||
|
||||
@ -221,6 +182,7 @@ static void e1000_restore_vlan(struct e1000_adapter *adapter);
|
||||
static int e1000_suspend(struct pci_dev *pdev, pm_message_t state);
|
||||
static int e1000_resume(struct pci_dev *pdev);
|
||||
#endif
|
||||
static void e1000_shutdown(struct pci_dev *pdev);
|
||||
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
/* for netdump / net console */
|
||||
@ -236,8 +198,9 @@ static struct pci_driver e1000_driver = {
|
||||
/* Power Managment Hooks */
|
||||
#ifdef CONFIG_PM
|
||||
.suspend = e1000_suspend,
|
||||
.resume = e1000_resume
|
||||
.resume = e1000_resume,
|
||||
#endif
|
||||
.shutdown = e1000_shutdown
|
||||
};
|
||||
|
||||
MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>");
|
||||
@ -741,8 +704,8 @@ e1000_probe(struct pci_dev *pdev,
|
||||
if (pci_using_dac)
|
||||
netdev->features |= NETIF_F_HIGHDMA;
|
||||
|
||||
/* hard_start_xmit is safe against parallel locking */
|
||||
netdev->features |= NETIF_F_LLTX;
|
||||
/* hard_start_xmit is safe against parallel locking */
|
||||
netdev->features |= NETIF_F_LLTX;
|
||||
|
||||
adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw);
|
||||
|
||||
@ -2771,7 +2734,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
||||
unsigned int nr_frags = 0;
|
||||
unsigned int mss = 0;
|
||||
int count = 0;
|
||||
int tso;
|
||||
int tso;
|
||||
unsigned int f;
|
||||
len -= skb->data_len;
|
||||
|
||||
@ -4605,6 +4568,12 @@ e1000_resume(struct pci_dev *pdev)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void e1000_shutdown(struct pci_dev *pdev)
|
||||
{
|
||||
e1000_suspend(pdev, PMSG_SUSPEND);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
/*
|
||||
* Polling 'interrupt' - used by things like netconsole to send skbs
|
||||
|
Loading…
Reference in New Issue
Block a user