Commit 5c55930b authored by Linus Torvalds's avatar Linus Torvalds

Merge http://gkernel.bkbits.net/net-drivers-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents a63ca30f c20e48a5
Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
==============================================================
April 9, 2002
September 16, 2002
Contents
......@@ -19,26 +19,9 @@ In This Release
===============
This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of
Adapters, version 2.0.x. This driver includes support for Itanium(TM)-based
Adapters, version 2.1.x. This driver includes support for Itanium(TM)-based
systems.
New for this release:
- Additional ethtool functionality, including link status test and EEPROM
read/write. A third-party application can use the ethtool interface to
get and set driver parameters.
- Support for Zero copy on 82550-based adapters. This feature provides
faster data throughput and significant CPU usage improvement in systems
that use the relevant system call (sendfile(2)).
- Support for large MTU-enabling interface (1504 bytes) with kernel's
VLAN module
- Support for polling on RX
- Support for Wake On LAN* on 82550 and 82559-based adapters
Supported Adapters
==================
......@@ -96,8 +79,7 @@ CNR PRO/100 VE Desktop Adapter A10386-xxx, A10725-xxx,
To verify that your adapter is supported, find the board ID number on the
adapter. Look for a label that has a barcode and a number in the format
123456-001 (six digits hyphen three digits). Match this to the list of
numbers above.
A12345-001. Match this to the list of numbers above.
For more information on how to identify your adapter, go to the Adapter &
Driver ID Guide at:
......@@ -106,15 +88,20 @@ Driver ID Guide at:
For the latest Intel PRO/100 network driver for Linux, see:
http://appsr.intel.com/scripts-df/support_intel.asp
http://downloadfinder.intel.com/scripts-df/support_intel.asp
Command Line Parameters
=======================
The following parameters are used by entering them on the command line with
the modprobe or insmod command. For example, with two Intel PRO/100 PCI
adapters, entering:
The following optional parameters are used by entering them on the command
line with the modprobe or insmod command using this syntax:
modprobe e100 [<option>=<VAL1>,<VAL2>,...]
insmod e100 [<option>=<VAL1>,<VAL2>,...]
For example, with two Intel PRO/100 PCI adapters, entering:
modprobe e100 TxDescriptors=32,128
......@@ -122,16 +109,20 @@ loads the e100 driver with 32 TX resources for the first adapter and 128 TX
resources for the second adapter. This configuration favors the second
adapter. The driver supports up to 16 network adapters concurrently.
The default value for each parameter is generally the recommended setting,
unless otherwise noted.
NOTE: Giving any command line option the value "-1" causes the driver to use
the appropriate default value for that option, as if no value was
specified.
BundleMax
Valid Range: 0x1-0xFFFF
Valid Range: 1-65535
Default Value: 6
This parameter holds the maximum number of packets in a bundle. Suggested
values range from 2 to 10. See "CPU Cycle Saver."
This parameter holds the maximum number of small packets (less than 128
bytes) in a bundle. Suggested values range from 2 to 10. See "CPU Cycle
Saver."
BundleSmallFr
Valid Range: 0-1 (0=off, 1=on)
......@@ -142,48 +133,33 @@ Default Value: 0
e100_speed_duplex
Valid Range: 0-4 (1=10half;2=10full;3=100half;4=100full)
Default Value: 0
The default value of 0 is set to auto-negotiate if the link partner is set
to auto-negotiate. If the link partner is forced, e100_speed_duplex
defaults to half-duplex.
The default value of 0 sets the adapter to auto-negotiate. Other values
set the adapter to forced speed and duplex.
Example usage: insmod e100.o e100_speed_duplex=4,4 (for two adapters)
flow_control
Valid Range: 0-1 (0=off, 1=on)
Default Value: 0
This parameter controls the automatic generation(Tx) and response(Rx) to
Ethernet PAUSE frames. flow_control should NOT be set to 1 when the e100
Ethernet PAUSE frames. flow_control should NOT be set to 1 when the
adapter is connected to an interface that does not support Ethernet PAUSE
frames and when the e100_speed_duplex parameter is NOT set to zero.
IntDelay
Valid Range: 0-0xFFFF (0=off)
Valid Range: 0-65535 (0=off)
Default Value: 1536
This parameter holds the number of time units (in adapter terminology)
until the adapter generates an interrupt. The recommended value for
IntDelay is 0x600 (upon initialization). Suggested values range from
0x200h to 0x800. See "CPU Cycle Saver."
IntDelay is 1536 (upon initialization). Suggested values range from
512 to 2048. See "CPU Cycle Saver."
IFS
Valid Range: 0-1 (0=off, 1=on)
Default Value: 1
Inter Frame Spacing (IFS) aims to reduce the number of Ethernet frame
collisions by altering the time between frame transmissions. When IFS is
enabled the driver tries to find an optimal IFS value. However, some
switches function better when IFS is disabled.
PollingMaxWork
Valid Range: 1-1024 (max number of RxDescriptors)
Default Value: Specified number of RxDescriptors
This value specifies the maximum number of receive packets that are
processed on a single polling call. This parameter is invalid if
RxCongestionControl is set to 0.
RxCongestionControl
Valid Range: 0-1 (0=off, 1=on)
Default Value: 1
1 enables polling mode. When the link is congested, the driver can decide
to handle received packets by polling them, instead of waiting until
interrupts occur.
enabled the driver tries to find an optimal IFS value. It is used only at
half duplex.
RxDescriptors
Valid Range: 8-1024
......@@ -200,13 +176,15 @@ Default Value: 64
Increasing this value allows the protocol stack to queue more transmits at
the driver level. The maximum value for Itanium-based systems is 64.
ucode (not available for 82557-based adapters)
ucode
Valid Range: 0-1 (0=off, 1=on)
Default Value: 0 for 82558-based adapters
1 for 82559(and higher)-based adapters
1 for 82559, 82550, and 82551-based adapters
On uploads the micro code to the adapter, which enables CPU Cycle Saver.
See the section "CPU Cycle Saver" below.
Example usage: insmod e100.o ucode=0 (does not reduce CPU usage)
Example usage: insmod e100.o ucode=1
Not available on 82557-based adapters.
XsumRX
Valid Range: 0-1 (0=off, 1=on)
......@@ -214,6 +192,8 @@ Default Value: 1
On allows Rx checksum offloading for TCP/UDP packets. Requires that the
hardware support this feature.
Not available on 82557 and 82558-based adapters.
CPU Cycle Saver
================
......@@ -234,10 +214,11 @@ switching to and from the driver.
CPU Cycle Saver consists of these arguments: IntDelay, BundleMax and
BundleSmallFr. When IntDelay is increased, the adapter waits longer for
frames to arrive before generating the interrupt. By increasing BundleMax,
the network adapter waits for the number of frames specified to arrive before
generating the interrupt. When BundleSmallFr is disabled, the adapter does
not bundle packets that are smaller than 128 bytes. Such small packets are
often, but not always, control packets that are better served immediately.
the network adapter waits for the number of small frames (less than 128 bytes)
specified to arrive before generating the interrupt. When BundleSmallFr is
disabled, the adapter does not bundle small packets. Such small packets are
often, but not always, control packets that are better served immediately;
therefore, BundleSmallFr is disabled by default.
For most users, it is recommended that CPU Cycle Saver be used with the
default values specified in the Command Line Parameters section. However, in
......@@ -249,7 +230,7 @@ ucode=0.
Support
=======
For general information and support, go to the Intel support website at:
For general information, go to the Intel support website at:
http://support.intel.com
......
Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
===============================================================
August 6, 2002
October 12, 2002
Contents
......@@ -20,7 +20,7 @@ In This Release
===============
This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family
of Adapters, version 4.3.x. This driver includes support for
of Adapters, version 4.4.x. This driver includes support for
Itanium(TM)-based systems.
This release version includes the following:
......@@ -32,7 +32,7 @@ This release version includes the following:
default in supporting kernels. It is not supported on the Intel(R)
PRO/1000 Gigabit Server Adapter.
New features include:
Features include:
- Support for the 82545 and 82546-based adapters listed below
......@@ -144,8 +144,7 @@ Default Value: 80
RxIntDelay
Valid Range: 0-65535 (0=off)
Default Value: 0 (82542, 82543, and 82544-based adapters)
128 (82540, 82545, and 82546-based adapters)
Default Value: 0
This value delays the generation of receive interrupts in units of 1.024
microseconds. Receive interrupt reduction can improve CPU efficiency if
properly tuned for specific network traffic. Increasing this value adds
......@@ -154,13 +153,12 @@ Default Value: 0 (82542, 82543, and 82544-based adapters)
may be set too high, causing the driver to run out of available receive
descriptors.
CAUTION: When setting RxIntDelay to a value other than 0, adapters based
on the Intel 82543 and 82544 LAN controllers may hang (stop
transmitting) under certain network conditions. If this occurs a
message is logged in the system event log. In addition, the
controller is automatically reset, restoring the network
connection. To eliminate the potential for the hang ensure that
RxIntDelay is set to 0.
CAUTION: When setting RxIntDelay to a value other than 0, adapters may
hang (stop transmitting) under certain network conditions. If
this occurs a NETDEV WATCHDOG message is logged in the system
event log. In addition, the controller is automatically reset,
restoring the network connection. To eliminate the potential for
the hang ensure that RxIntDelay is set to 0.
RxAbsIntDelay (82540, 82545, and 82546-based adapters only)
Valid Range: 0-65535 (0=off)
......
......@@ -121,7 +121,6 @@
#define E100_DEFAULT_CPUSAVER_BUNDLE_MAX 6
#define E100_DEFAULT_CPUSAVER_INTERRUPT_DELAY 0x600
#define E100_DEFAULT_BUNDLE_SMALL_FR false
#define E100_DEFAULT_RX_CONGESTION_CONTROL true
/* end of configurables */
......@@ -146,8 +145,6 @@ struct driver_stats {
unsigned long xmt_tco_pkts;
unsigned long rcv_tco_pkts;
unsigned long rx_intr_pkts;
unsigned long rx_tasklet_pkts;
unsigned long poll_intr_switch;
};
/* TODO: kill me when we can do C99 */
......@@ -838,7 +835,6 @@ typedef struct _bd_dma_able_t {
#define PRM_FC 0x00000004
#define PRM_IFS 0x00000008
#define PRM_BUNDLE_SMALL 0x00000010
#define PRM_RX_CONG 0x00000020
struct cfg_params {
int e100_speed_duplex;
......@@ -847,7 +843,6 @@ struct cfg_params {
int IntDelay;
int BundleMax;
int ber;
int PollingMaxWork;
u32 b_params;
};
struct ethtool_lpbk_data{
......@@ -949,8 +944,6 @@ struct e100_private {
u32 speed_duplex_caps; /* adapter's speed/duplex capabilities */
struct tasklet_struct polling_tasklet;
/* WOL params for ethtool */
u32 wolsupported;
u32 wolopts;
......@@ -961,6 +954,7 @@ struct e100_private {
#ifdef CONFIG_PM
u32 pci_state[16];
#endif
char ifname[IFNAMSIZ];
};
#define E100_AUTONEG 0
......
This diff is collapsed.
......@@ -249,8 +249,6 @@ static e100_proc_entry e100_proc_list[] = {
{"Rx_TCO_Packets", read_gen_ulong, 0, bdp_drv_off(rcv_tco_pkts)},
{"\n",},
{"Rx_Interrupt_Packets", read_gen_ulong, 0, bdp_drv_off(rx_intr_pkts)},
{"Rx_Polling_Packets", read_gen_ulong, 0, bdp_drv_off(rx_tasklet_pkts)},
{"Polling_Interrupt_Switch", read_gen_ulong, 0, bdp_drv_off(poll_intr_switch)},
{"Identify_Adapter", 0, write_blink_led_timer, 0},
{"", 0, 0, 0}
};
......@@ -291,7 +289,7 @@ read_info(char *page, char **start, off_t off, int count, int *eof, void *data)
return generic_read(page, start, off, count, eof, len);
}
static struct proc_dir_entry * __devinit
static struct proc_dir_entry *
create_proc_rw(char *name, void *data, struct proc_dir_entry *parent,
read_proc_t * read_proc, write_proc_t * write_proc)
{
......@@ -318,7 +316,7 @@ create_proc_rw(char *name, void *data, struct proc_dir_entry *parent,
}
void
e100_remove_proc_subdir(struct e100_private *bdp)
e100_remove_proc_subdir(struct e100_private *bdp, char *name)
{
e100_proc_entry *pe;
char info[256];
......@@ -329,8 +327,8 @@ e100_remove_proc_subdir(struct e100_private *bdp)
return;
}
len = strlen(bdp->device->name);
strncpy(info, bdp->device->name, sizeof (info));
len = strlen(bdp->ifname);
strncpy(info, bdp->ifname, sizeof (info));
strncat(info + len, ".info", sizeof (info) - len);
if (bdp->proc_parent) {
......@@ -341,7 +339,7 @@ e100_remove_proc_subdir(struct e100_private *bdp)
remove_proc_entry(pe->name, bdp->proc_parent);
}
remove_proc_entry(bdp->device->name, adapters_proc_dir);
remove_proc_entry(bdp->ifname, adapters_proc_dir);
bdp->proc_parent = NULL;
}
......@@ -351,7 +349,7 @@ e100_remove_proc_subdir(struct e100_private *bdp)
e100_proc_cleanup();
}
int __devinit
int
e100_create_proc_subdir(struct e100_private *bdp)
{
struct proc_dir_entry *dev_dir;
......@@ -366,7 +364,7 @@ e100_create_proc_subdir(struct e100_private *bdp)
return -ENOMEM;
}
strncpy(info, bdp->device->name, sizeof (info));
strncpy(info, bdp->ifname, sizeof (info));
len = strlen(info);
strncat(info + len, ".info", sizeof (info) - len);
......@@ -376,12 +374,12 @@ e100_create_proc_subdir(struct e100_private *bdp)
return -ENOMEM;
}
dev_dir = create_proc_entry(bdp->device->name, S_IFDIR,
dev_dir = create_proc_entry(bdp->ifname, S_IFDIR,
adapters_proc_dir);
bdp->proc_parent = dev_dir;
if (!dev_dir) {
e100_remove_proc_subdir(bdp);
e100_remove_proc_subdir(bdp, bdp->ifname);
return -ENOMEM;
}
......@@ -396,7 +394,7 @@ e100_create_proc_subdir(struct e100_private *bdp)
if (!(create_proc_rw(pe->name, data, dev_dir,
pe->read_proc, pe->write_proc))) {
e100_remove_proc_subdir(bdp);
e100_remove_proc_subdir(bdp, bdp->ifname);
return -ENOMEM;
}
}
......
......@@ -95,6 +95,15 @@ struct e1000_adapter;
#define E1000_RXBUFFER_8192 8192
#define E1000_RXBUFFER_16384 16384
/* Flow Control High-Watermark: 43464 bytes */
#define E1000_FC_HIGH_THRESH 0xA9C8
/* Flow Control Low-Watermark: 43456 bytes */
#define E1000_FC_LOW_THRESH 0xA9C0
/* Flow Control Pause Time: 858 usec */
#define E1000_FC_PAUSE_TIME 0x0680
/* How many Tx Descriptors do we need to call netif_wake_queue ? */
#define E1000_TX_QUEUE_WAKE 16
/* How many Rx Buffers do we bundle into one write to the hardware ? */
......@@ -194,5 +203,6 @@ struct e1000_adapter {
uint32_t pci_state[16];
char ifname[IFNAMSIZ];
};
#endif /* _E1000_H_ */
......@@ -117,7 +117,8 @@ e1000_ethtool_sset(struct e1000_adapter *adapter, struct ethtool_cmd *ecmd)
if(ecmd->autoneg == AUTONEG_ENABLE) {
hw->autoneg = 1;
hw->autoneg_advertised = (ecmd->advertising & 0x002F);
hw->autoneg_advertised = 0x002F;
ecmd->advertising = 0x002F;
} else {
hw->autoneg = 0;
switch(ecmd->speed + ecmd->duplex) {
......@@ -228,6 +229,7 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter,
for(i = 0; i <= (last_word - first_word); i++)
e1000_read_eeprom(hw, first_word + i, &eeprom_buff[i]);
return 0;
}
......@@ -290,7 +292,6 @@ e1000_ethtool_gwol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
case E1000_DEV_ID_82543GC_FIBER:
case E1000_DEV_ID_82543GC_COPPER:
case E1000_DEV_ID_82544EI_FIBER:
default:
wol->supported = 0;
wol->wolopts = 0;
return;
......@@ -304,14 +305,7 @@ e1000_ethtool_gwol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
}
/* Fall Through */
case E1000_DEV_ID_82544EI_COPPER:
case E1000_DEV_ID_82544GC_COPPER:
case E1000_DEV_ID_82544GC_LOM:
case E1000_DEV_ID_82540EM:
case E1000_DEV_ID_82540EM_LOM:
case E1000_DEV_ID_82545EM_COPPER:
case E1000_DEV_ID_82545EM_FIBER:
case E1000_DEV_ID_82546EB_COPPER:
default:
wol->supported = WAKE_PHY | WAKE_UCAST |
WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC;
......@@ -340,7 +334,6 @@ e1000_ethtool_swol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
case E1000_DEV_ID_82543GC_FIBER:
case E1000_DEV_ID_82543GC_COPPER:
case E1000_DEV_ID_82544EI_FIBER:
default:
return wol->wolopts ? -EOPNOTSUPP : 0;
case E1000_DEV_ID_82546EB_FIBER:
......@@ -349,14 +342,7 @@ e1000_ethtool_swol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
return wol->wolopts ? -EOPNOTSUPP : 0;
/* Fall Through */
case E1000_DEV_ID_82544EI_COPPER:
case E1000_DEV_ID_82544GC_COPPER:
case E1000_DEV_ID_82544GC_LOM:
case E1000_DEV_ID_82540EM:
case E1000_DEV_ID_82540EM_LOM:
case E1000_DEV_ID_82545EM_COPPER:
case E1000_DEV_ID_82545EM_FIBER:
case E1000_DEV_ID_82546EB_COPPER:
default:
if(wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))
return -EOPNOTSUPP;
......@@ -518,7 +504,8 @@ e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr)
if(copy_from_user(&eeprom, addr, sizeof(eeprom)))
return -EFAULT;
if((err = e1000_ethtool_geeprom(adapter, &eeprom, eeprom_buff))<0)
if((err = e1000_ethtool_geeprom(adapter,
&eeprom, eeprom_buff)))
return err;
if(copy_to_user(addr, &eeprom, sizeof(eeprom)))
......
......@@ -47,9 +47,9 @@ static void e1000_lower_ee_clk(struct e1000_hw *hw, uint32_t *eecd);
static void e1000_shift_out_ee_bits(struct e1000_hw *hw, uint16_t data, uint16_t count);
static uint16_t e1000_shift_in_ee_bits(struct e1000_hw *hw);
static void e1000_setup_eeprom(struct e1000_hw *hw);
static void e1000_standby_eeprom(struct e1000_hw *hw);
static void e1000_clock_eeprom(struct e1000_hw *hw);
static void e1000_cleanup_eeprom(struct e1000_hw *hw);
static void e1000_standby_eeprom(struct e1000_hw *hw);
static int32_t e1000_id_led_init(struct e1000_hw * hw);
/******************************************************************************
......@@ -88,6 +88,9 @@ e1000_set_mac_type(struct e1000_hw *hw)
break;
case E1000_DEV_ID_82540EM:
case E1000_DEV_ID_82540EM_LOM:
case E1000_DEV_ID_82540EP:
case E1000_DEV_ID_82540EP_LOM:
case E1000_DEV_ID_82540EP_LP:
hw->mac_type = e1000_82540;
break;
case E1000_DEV_ID_82545EM_COPPER:
......@@ -655,6 +658,8 @@ e1000_setup_copper_link(struct e1000_hw *hw)
return -E1000_ERR_PHY;
}
phy_data |= M88E1000_EPSCR_TX_CLK_25;
if (hw->phy_revision < M88E1011_I_REV_4) {
/* Configure Master and Slave downshift values */
phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK |
M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK);
......@@ -664,6 +669,7 @@ e1000_setup_copper_link(struct e1000_hw *hw)
DEBUGOUT("PHY Write Error\n");
return -E1000_ERR_PHY;
}
}
/* SW Reset the PHY so all changes take effect */
ret_val = e1000_phy_reset(hw);
......@@ -1008,7 +1014,6 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw)
/* Write the configured values back to the Device Control Reg. */
E1000_WRITE_REG(hw, CTRL, ctrl);
/* Write the MII Control Register with the new PHY configuration. */
if(e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data) < 0) {
DEBUGOUT("PHY Read Error\n");
return -E1000_ERR_PHY;
......@@ -1026,6 +1031,8 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw)
/* Need to reset the PHY or these changes will be ignored */
mii_ctrl_reg |= MII_CR_RESET;
/* Write back the modified PHY MII control register. */
if(e1000_write_phy_reg(hw, PHY_CTRL, mii_ctrl_reg) < 0) {
DEBUGOUT("PHY Write Error\n");
return -E1000_ERR_PHY;
......@@ -2100,6 +2107,7 @@ e1000_detect_gig_phy(struct e1000_hw *hw)
return -E1000_ERR_PHY;
}
hw->phy_id |= (uint32_t) (phy_id_low & PHY_REVISION_MASK);
hw->phy_revision = (uint32_t) phy_id_low & ~PHY_REVISION_MASK;
switch(hw->mac_type) {
case e1000_82543:
......@@ -2242,7 +2250,7 @@ e1000_raise_ee_clk(struct e1000_hw *hw,
uint32_t *eecd)
{
/* Raise the clock input to the EEPROM (by setting the SK bit), and then
* wait 50 microseconds.
* wait <delay> microseconds.
*/
*eecd = *eecd | E1000_EECD_SK;
E1000_WRITE_REG(hw, EECD, *eecd);
......@@ -2331,11 +2339,11 @@ e1000_shift_in_ee_bits(struct e1000_hw *hw)
uint32_t i;
uint16_t data;
/* In order to read a register from the EEPROM, we need to shift 16 bits
* in from the EEPROM. Bits are "shifted in" by raising the clock input to
* the EEPROM (setting the SK bit), and then reading the value of the "DO"
* bit. During this "shifting in" process the "DI" bit should always be
* clear..
/* In order to read a register from the EEPROM, we need to shift 'count'
* bits in from the EEPROM. Bits are "shifted in" by raising the clock
* input to the EEPROM (setting the SK bit), and then reading the value of
* the "DO" bit. During this "shifting in" process the "DI" bit should
* always be clear.
*/
eecd = E1000_READ_REG(hw, EECD);
......@@ -3140,6 +3148,9 @@ e1000_setup_led(struct e1000_hw *hw)
ledctl |= (E1000_LEDCTL_MODE_LED_OFF << E1000_LEDCTL_LED0_MODE_SHIFT);
E1000_WRITE_REG(hw, LEDCTL, ledctl);
break;
case E1000_DEV_ID_82540EP:
case E1000_DEV_ID_82540EP_LOM:
case E1000_DEV_ID_82540EP_LP:
case E1000_DEV_ID_82540EM:
case E1000_DEV_ID_82540EM_LOM:
case E1000_DEV_ID_82545EM_COPPER:
......@@ -3173,6 +3184,9 @@ e1000_cleanup_led(struct e1000_hw *hw)
case E1000_DEV_ID_82544GC_LOM:
/* No cleanup necessary */
break;
case E1000_DEV_ID_82540EP:
case E1000_DEV_ID_82540EP_LOM:
case E1000_DEV_ID_82540EP_LP:
case E1000_DEV_ID_82540EM:
case E1000_DEV_ID_82540EM_LOM:
case E1000_DEV_ID_82545EM_COPPER:
......@@ -3223,6 +3237,9 @@ e1000_led_on(struct e1000_hw *hw)
ctrl |= E1000_CTRL_SWDPIO0;
E1000_WRITE_REG(hw, CTRL, ctrl);
break;
case E1000_DEV_ID_82540EP:
case E1000_DEV_ID_82540EP_LOM:
case E1000_DEV_ID_82540EP_LP:
case E1000_DEV_ID_82540EM:
case E1000_DEV_ID_82540EM_LOM:
case E1000_DEV_ID_82545EM_COPPER:
......@@ -3270,6 +3287,9 @@ e1000_led_off(struct e1000_hw *hw)
ctrl |= E1000_CTRL_SWDPIO0;
E1000_WRITE_REG(hw, CTRL, ctrl);
break;
case E1000_DEV_ID_82540EP:
case E1000_DEV_ID_82540EP_LOM:
case E1000_DEV_ID_82540EP_LP:
case E1000_DEV_ID_82540EM:
case E1000_DEV_ID_82540EM_LOM:
case E1000_DEV_ID_82545EM_COPPER:
......
......@@ -246,11 +246,14 @@ void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value);
#define E1000_DEV_ID_82544GC_LOM 0x100D
#define E1000_DEV_ID_82540EM 0x100E
#define E1000_DEV_ID_82540EM_LOM 0x1015
#define E1000_DEV_ID_82540EP_LOM 0x1016
#define E1000_DEV_ID_82540EP 0x1017
#define E1000_DEV_ID_82540EP_LP 0x101E
#define E1000_DEV_ID_82545EM_COPPER 0x100F
#define E1000_DEV_ID_82545EM_FIBER 0x1011
#define E1000_DEV_ID_82546EB_COPPER 0x1010
#define E1000_DEV_ID_82546EB_FIBER 0x1012
#define NUM_DEV_IDS 13
#define NUM_DEV_IDS 16
#define NODE_ADDRESS_SIZE 6
#define ETH_LENGTH_OF_ADDRESS 6
......@@ -851,6 +854,7 @@ struct e1000_hw {
e1000_bus_type bus_type;
uint32_t io_base;
uint32_t phy_id;
uint32_t phy_revision;
uint32_t phy_addr;
uint32_t original_fc;
uint32_t txcw;
......@@ -1755,6 +1759,7 @@ struct e1000_hw {
#define M88E1011_I_PHY_ID 0x01410C20
#define M88E1000_12_PHY_ID M88E1000_E_PHY_ID
#define M88E1000_14_PHY_ID M88E1000_E_PHY_ID
#define M88E1011_I_REV_4 0x04
/* Miscellaneous PHY bit definitions. */
#define PHY_PREAMBLE 0xFFFFFFFF
......
This diff is collapsed.
......@@ -96,6 +96,6 @@ typedef enum {
readl((a)->hw_addr + E1000_##reg + ((offset) << 2)) : \
readl((a)->hw_addr + E1000_82542_##reg + ((offset) << 2)))
#define E1000_WRITE_FLUSH(a) ((void)E1000_READ_REG(a, STATUS))
#define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS)
#endif /* _E1000_OSDEP_H_ */
......@@ -197,8 +197,7 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");
#define MIN_RXD 80
#define MAX_82544_RXD 4096
#define DEFAULT_RDTR 128
#define DEFAULT_RDTR_82544 0
#define DEFAULT_RDTR 0
#define MAX_RXDELAY 0xFFFF
#define MIN_RXDELAY 0
......@@ -315,7 +314,8 @@ e1000_check_options(struct e1000_adapter *adapter)
};
struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
e1000_mac_type mac_type = adapter->hw.mac_type;
opt.arg.r.max = mac_type < e1000_82544 ? MAX_TXD : MAX_82544_TXD;
opt.arg.r.max = mac_type < e1000_82544 ?
MAX_TXD : MAX_82544_TXD;
tx_ring->count = TxDescriptors[bd];
e1000_validate_option(&tx_ring->count, &opt);
......@@ -398,16 +398,13 @@ e1000_check_options(struct e1000_adapter *adapter)
}
{ /* Receive Interrupt Delay */
char *rdtr = "using default of " __MODULE_STRING(DEFAULT_RDTR);
char *rdtr_82544 = "using default of "
__MODULE_STRING(DEFAULT_RDTR_82544);
struct e1000_option opt = {
.type = range_option,
.name = "Receive Interrupt Delay",
.arg = { r: { min: MIN_RXDELAY, max: MAX_RXDELAY }}
};
e1000_mac_type mac_type = adapter->hw.mac_type;
opt.def = mac_type > e1000_82544 ? DEFAULT_RDTR : 0;
opt.err = mac_type > e1000_82544 ? rdtr : rdtr_82544;
opt.def = DEFAULT_RDTR;
opt.err = rdtr;
adapter->rx_int_delay = RxIntDelay[bd];
e1000_validate_option(&adapter->rx_int_delay, &opt);
......
......@@ -132,7 +132,7 @@ e1000_proc_single_read(char *page, char **start, off_t off,
return e1000_proc_read(page, start, off, count, eof);
}
static void __devexit
static void
e1000_proc_dirs_free(char *name, struct list_head *proc_list_head)
{
struct proc_dir_entry *intel_proc_dir, *proc_dir;
......@@ -188,7 +188,7 @@ e1000_proc_dirs_free(char *name, struct list_head *proc_list_head)
}
static int __devinit
static int
e1000_proc_singles_create(struct proc_dir_entry *parent,
struct list_head *proc_list_head)
{
......@@ -215,7 +215,7 @@ e1000_proc_singles_create(struct proc_dir_entry *parent,
return 1;
}
static void __devinit
static void
e1000_proc_dirs_create(void *data, char *name,
struct list_head *proc_list_head)
{
......@@ -255,7 +255,7 @@ e1000_proc_dirs_create(void *data, char *name,
info_entry->data = proc_list_head;
}
static void __devinit
static void
e1000_proc_list_add(struct list_head *proc_list_head, char *tag,
void *data, size_t len,
char *(*func)(void *, size_t, char *))
......@@ -274,7 +274,7 @@ e1000_proc_list_add(struct list_head *proc_list_head, char *tag,
list_add_tail(&new->list, proc_list_head);
}
static void __devexit
static void
e1000_proc_list_free(struct list_head *proc_list_head)
{
struct proc_list *elem;
......@@ -542,7 +542,7 @@ e1000_proc_rx_status(void *data, size_t len, char *buf)
#define LIST_ADD_H(T,D) LIST_ADD_F((T), (D), e1000_proc_hex)
#define LIST_ADD_U(T,D) LIST_ADD_F((T), (D), e1000_proc_unsigned)
static void __devinit
static void
e1000_proc_list_setup(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
......@@ -572,7 +572,7 @@ e1000_proc_list_setup(struct e1000_adapter *adapter)
}
LIST_ADD_U("IRQ", &adapter->pdev->irq);
LIST_ADD_S("System_Device_Name", adapter->netdev->name);
LIST_ADD_S("System_Device_Name", adapter->ifname);
LIST_ADD_F("Current_HWaddr",
adapter->netdev->dev_addr, e1000_proc_hwaddr);
LIST_ADD_F("Permanent_HWaddr",
......@@ -670,13 +670,13 @@ e1000_proc_list_setup(struct e1000_adapter *adapter)
* @adapter: board private structure
*/
void __devinit
void
e1000_proc_dev_setup(struct e1000_adapter *adapter)
{
e1000_proc_list_setup(adapter);
e1000_proc_dirs_create(adapter,
adapter->netdev->name,
adapter->ifname,
&adapter->proc_list_head);
}
......@@ -685,18 +685,18 @@ e1000_proc_dev_setup(struct e1000_adapter *adapter)
* @adapter: board private structure
*/
void __devexit
void
e1000_proc_dev_free(struct e1000_adapter *adapter)
{
e1000_proc_dirs_free(adapter->netdev->name, &adapter->proc_list_head);
e1000_proc_dirs_free(adapter->ifname, &adapter->proc_list_head);
e1000_proc_list_free(&adapter->proc_list_head);
}
#else /* CONFIG_PROC_FS */
void __devinit e1000_proc_dev_setup(struct e1000_adapter *adapter) {}
void __devexit e1000_proc_dev_free(struct e1000_adapter *adapter) {}
void e1000_proc_dev_setup(struct e1000_adapter *adapter) {}
void e1000_proc_dev_free(struct e1000_adapter *adapter) {}
#endif /* CONFIG_PROC_FS */
This diff is collapsed.
......@@ -192,9 +192,12 @@ int mii_nway_restart (struct mii_if_info *mii)
void mii_check_link (struct mii_if_info *mii)
{
if (mii_link_ok(mii))
int cur_link = mii_link_ok(mii);
int prev_link = netif_carrier_ok(mii->dev);
if (cur_link && !prev_link)
netif_carrier_on(mii->dev);
else
else if (prev_link && !cur_link)
netif_carrier_off(mii->dev);
}
......
......@@ -184,7 +184,7 @@
NETIF_MSG_WOL | \
NETIF_MSG_RX_ERR | \
NETIF_MSG_TX_ERR)
static int debug = NATSEMI_DEF_MSG;
static int debug = -1;
/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
static int max_interrupt_work = 20;
......@@ -256,7 +256,7 @@ MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM_DESC(max_interrupt_work,
"DP8381x maximum events handled per interrupt");
MODULE_PARM_DESC(mtu, "DP8381x MTU (all boards)");
MODULE_PARM_DESC(debug, "DP8381x default debug bitmask");
MODULE_PARM_DESC(debug, "DP8381x default debug level");
MODULE_PARM_DESC(rx_copybreak,
"DP8381x copy breakpoint for copy-only-tiny-frames");
MODULE_PARM_DESC(options,
......@@ -796,7 +796,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
pci_set_drvdata(pdev, dev);
np->iosize = iosize;
spin_lock_init(&np->lock);
np->msg_enable = debug;
np->msg_enable = (debug >= 0) ? (1<<debug)-1 : NATSEMI_DEF_MSG;
np->hands_off = 0;
/* Reset the chip to erase previous misconfiguration. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment