Commit d463905a authored by Jeff Garzik's avatar Jeff Garzik

Merge pobox.com:/garz/repo/linux-2.6

into pobox.com:/garz/repo/netdev-2.6/misc
parents 6f60f5cf 0575b4d3
Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
============================================================== ==============================================================
March 15, 2004 September 13, 2004
Contents Contents
======== ========
- In This Release - In This Release
- Supported Adapters - Identifying Your Adapter
- Driver Configuration Parameters
- Additional Configurations
- Support - Support
...@@ -16,26 +18,140 @@ In This Release ...@@ -16,26 +18,140 @@ In This Release
=============== ===============
This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of
Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based Adapters, version 3.2.x. This driver includes support for Itanium(TM)2 and
systems. EM64T systems.
Supported Adapters Identifying Your Adapter
================== ========================
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
A12345-001. Match this to the list of numbers above.
For more information on how to identify your adapter, go to the Adapter & For more information on how to identify your adapter, go to the Adapter &
Driver ID Guide at: Driver ID Guide at:
http://support.intel.com/support/network/adapter/pro100/21397.htm http://support.intel.com/support/network/adapter/pro100/21397.htm
For the latest Intel PRO/100 network driver for Linux, see: For the latest Intel network drivers for Linux, refer to the following
website. In the search field, enter your adapter name or type, or use the
networking link on the left to search for your adapter:
http://downloadfinder.intel.com/scripts-df/support_intel.asp http://downloadfinder.intel.com/scripts-df/support_intel.asp
Driver Configuration Parameters
===============================
The default value for each parameter is generally the recommended setting,
unless otherwise noted.
Rx Descriptors: Number of receive descriptors. A receive descriptor is a data
structure that describes a receive buffer and its attributes to the network
controller. The data in the descriptor is used by the controller to write
data from the controller to host memory. In the 3.0.x driver the valid
range for this parameter is 64-256. The default value is 64. This parameter
can be changed using the command
ethtool -G eth? rx n, where n is the number of desired rx descriptors.
Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a
data structure that describes a transmit buffer and its attributes to the
network controller. The data in the descriptor is used by the controller to
read data from the host memory to the controller. In the 3.0.x driver the
valid range for this parameter is 64-256. The default value is 64. This
parameter can be changed using the command
ethtool -G eth? tx n, where n is the number of desired tx descriptors.
Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by
default. Ethtool can be used as follows to force speed/duplex.
ethtool -s eth? autoneg off speed {10|100} duplex {full|half}
NOTE: setting the speed/duplex to incorrect values will cause the link to
fail.
Event Log Message Level: The driver uses the message level flag to log events
to syslog. The message level can be set at driver load time. It can also be
set using the command
ethtool -s eth? msglvl n
Additional Configurations
=========================
Configuring the Driver on Different Distributions
-------------------------------------------------
Configuring a network driver to load properly when the system is started is
distribution dependent. Typically, the configuration process involves adding
an alias line to /etc/modules.conf as well as editing other system startup
scripts and/or configuration files. Many popular Linux distributions ship
with tools to make these changes for you. To learn the proper way to
configure a network device for your system, refer to your distribution
documentation. If during this process you are asked for the driver or module
name, the name for the Linux Base Driver for the Intel PRO/100 Family of
Adapters is e100.
As an example, if you install the e100 driver for two PRO/100 adapters
(eth0 and eth1), add the following to modules.conf:
alias eth0 e100
alias eth1 e100
Viewing Link Messages
---------------------
In order to see link messages and other Intel driver information on your
console, you must set the dmesg level up to six. This can be done by
entering the following on the command line before loading the e100 driver:
dmesg -n 8
If you wish to see all messages issued by the driver, including debug
messages, set the dmesg level to eight.
NOTE: This setting is not saved across reboots.
Ethtool
-------
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information. Ethtool
version 1.6 or later is required for this functionality.
The latest release of ethtool can be found at:
http://sf.net/projects/gkernel.
After ethtool is installed, ethtool-copy.h must be copied and renamed to
ethtool.h in your kernel source tree at <linux_kernel_src>/include/linux.
Backup the original ethtool.h as needed before copying. The driver then
must be recompiled in order to take advantage of the latest ethtool
features.
NOTE: This driver uses mii support from the kernel. As a result, when
there is no link, ethtool will report speed/duplex to be 10/half.
NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support
for a more complete ethtool feature set can be enabled by upgrading
ethtool to ethtool-1.8.1.
Enabling Wake on LAN* (WoL)
---------------------------
WoL is provided through the Ethtool* utility. Ethtool is included with Red
Hat* 8.0. For other Linux distributions, download and install Ethtool from
the following website: http://sourceforge.net/projects/gkernel.
For instructions on enabling WoL with Ethtool, refer to the Ethtool man
page.
WoL will be enabled on the system during the next shut down or reboot. For
this driver version, in order to enable WoL, the e100 driver must be
loaded when shutting down or rebooting the system.
NAPI
----
NAPI (Rx polling mode) is supported in the e100 driver. NAPI is enabled
or disabled based on the configuration of the kernel.
See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.
Support Support
======= =======
......
Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
=============================================================== ===============================================================
January 8, 2003 September 13, 2004
Contents Contents
======== ========
- In This Release - In This Release
- Supported Adapters - Identifying Your Adapter
- Command Line Parameters - Command Line Parameters
- Speed and Duplex Configuration - Speed and Duplex Configuration
- Additional Configurations - Additional Configurations
...@@ -20,52 +20,17 @@ In This Release ...@@ -20,52 +20,17 @@ In This Release
=============== ===============
This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family
of Adapters, version 5.0.x. This driver includes support for of Adapters, version 5.x.x. This driver includes support for Itanium(TM)2
Itanium(TM)-based systems. and EM64T systems.
For questions related to hardware requirements, refer to the documentation
supplied with your Intel PRO/1000 adapter. All hardware requirements listed
apply to use with Linux.
Native VLANs are now available with supported kernels. Native VLANs are now available with supported kernels.
Identifying Your Adapter
Supported Adapters ========================
==================
The following Intel network adapters are compatible with the drivers in this
release:
Controller Adapter Name Board IDs
---------- ------------ ---------
82542 PRO/1000 Gigabit Server Adapter 700262-xxx, 717037-xxx
82543 PRO/1000 F Server Adapter 738640-xxx, A38888-xxx
82543 PRO/1000 T Server Adapter A19845-xxx, A33948-xxx
82544 PRO/1000 XT Server Adapter A51580-xxx
82544 PRO/1000 XF Server Adapter A50484-xxx
82544 PRO/1000 T Desktop Adapter A62947-xxx
82540 PRO/1000 MT Desktop Adapter A78408-xxx
82541 C91016-xxx
82545 PRO/1000 MT Server Adapter A92165-xxx
82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx
82545 PRO/1000 MF Server Adapter A91622-xxx
82545 PRO/1000 MF Server Adapter(LX) A91624-xxx
82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx
To verify your Intel 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
A12345-001. Match this to the list of numbers above.
For more information on how to identify your adapter, go to the Adapter & For more information on how to identify your adapter, go to the Adapter &
Driver ID Guide at: Driver ID Guide at:
...@@ -73,10 +38,11 @@ Driver ID Guide at: ...@@ -73,10 +38,11 @@ Driver ID Guide at:
http://support.intel.com/support/network/adapter/pro100/21397.htm http://support.intel.com/support/network/adapter/pro100/21397.htm
For the latest Intel network drivers for Linux, refer to the following For the latest Intel network drivers for Linux, refer to the following
website. In the search field, enter your adapter name or type, or use the
networking link on the left to search for your adapter:
http://downloadfinder.intel.com/scripts-df/support_intel.asp http://downloadfinder.intel.com/scripts-df/support_intel.asp
Command Line Parameters Command Line Parameters
======================= =======================
...@@ -92,15 +58,25 @@ For example, with two PRO/1000 PCI adapters, entering: ...@@ -92,15 +58,25 @@ For example, with two PRO/1000 PCI adapters, entering:
insmod e1000 TxDescriptors=80,128 insmod e1000 TxDescriptors=80,128
loads the e1000 driver with 80 TX resources for the first adapter and 128 TX loads the e1000 driver with 80 TX descriptors for the first adapter and 128 TX
resources for the second adapter. descriptors for the second adapter.
The default value for each parameter is generally the recommended setting, The default value for each parameter is generally the recommended setting,
unless otherwise noted. unless otherwise noted. Also, if the driver is statically built into the
kernel, the driver is loaded with the default values for all the parameters.
Ethtool can be used to change some of the parameters at runtime.
NOTES: For more information about the AutoNeg, Duplex, and Speed
parameters, see the "Speed and Duplex Configuration" section in
this document.
For more information about the AutoNeg, Duplex, and Speed parameters, see the For more information about the InterruptThrottleRate, RxIntDelay,
"Speed and Duplex Configuration" section in this document. TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay parameters, see the
application note at:
http://www.intel.com/design/network/applnots/ap450.htm
A descriptor describes a data buffer and attributes related to the
data buffer. This information is accessed by the hardware.
AutoNeg (adapters using copper connections only) AutoNeg (adapters using copper connections only)
Valid Range: 0x01-0x0F, 0x20-0x2F Valid Range: 0x01-0x0F, 0x20-0x2F
...@@ -108,11 +84,13 @@ Default Value: 0x2F ...@@ -108,11 +84,13 @@ Default Value: 0x2F
This parameter is a bit mask that specifies which speed and duplex This parameter is a bit mask that specifies which speed and duplex
settings the board advertises. When this parameter is used, the Speed and settings the board advertises. When this parameter is used, the Speed and
Duplex parameters must not be specified. Duplex parameters must not be specified.
NOTE: Refer to the Speed and Duplex section of this readme for more
information on the AutoNeg parameter.
Duplex (adapters using copper connections only) Duplex (adapters using copper connections only)
Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full)
Default Value: 0 Default Value: 0
Defines the direction in which data is allowed to flow. Can by either one Defines the direction in which data is allowed to flow. Can be either one
or two-directional. If both Duplex and the link partner are set to auto- or two-directional. If both Duplex and the link partner are set to auto-
negotiate, the board auto-detects the correct duplex. If the link partner negotiate, the board auto-detects the correct duplex. If the link partner
is forced (either full or half), Duplex defaults to half-duplex. is forced (either full or half), Duplex defaults to half-duplex.
...@@ -125,22 +103,46 @@ Default: Read flow control settings from the EEPROM ...@@ -125,22 +103,46 @@ Default: Read flow control settings from the EEPROM
InterruptThrottleRate InterruptThrottleRate
Valid Range: 100-100000 (0=off, 1=dynamic) Valid Range: 100-100000 (0=off, 1=dynamic)
Default Value: 1 Default Value: 8000
This value represents the maximum number of interrupts per second the This value represents the maximum number of interrupts per second the
controller generates. InterruptThrottleRate is another setting used in controller generates. InterruptThrottleRate is another setting used in
interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust
InterruptThrottleRate based on the current traffic load. InterruptThrottleRate based on the current traffic load.
Un-supported Adapters: InterruptThrottleRate is NOT supported by 82542, 82543
or 82544-based adapters.
NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and
RxAbsIntDelay parameters. In other words, minimizing the receive RxAbsIntDelay parameters. In other words, minimizing the receive
and/or transmit absolute delays does not force the controller to and/or transmit absolute delays does not force the controller to
generate more interrupts than what the Interrupt Throttle Rate generate more interrupts than what the Interrupt Throttle Rate
allows. allows.
CAUTION: If you are using the Intel PRO/1000 CT Network Connection
(controller 82547), setting InterruptThrottleRate to a value
greater than 75,000, may hang (stop transmitting) adapters 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 InterruptThrottleRate is set no greater than 75,000 and is
not set to 0.
NOTE: When e1000 is loaded with default settings and multiple adapters are
in use simultaneously, the CPU utilization may increase non-linearly.
In order to limit the CPU utilization without impacting the overall
throughput, we recommend that you load the driver as follows:
insmod e1000.o InterruptThrottleRate=3000,3000,3000
This sets the InterruptThrottleRate to 3000 interrupts/sec for the
first, second, and third instances of the driver. The range of 2000 to
3000 interrupts per second works on a majority of systems and is a
good starting point, but the optimal value will be platform-specific.
If CPU utilization is not a concern, use RX_POLLING (NAPI) and default
driver settings.
RxDescriptors RxDescriptors
Valid Range: 80-256 for 82542 and 82543-based adapters Valid Range: 80-256 for 82542 and 82543-based adapters
80-4096 for 82540, 82544, 82545, and 82546-based adapters 80-4096 for all other supported adapters
Default Value: 80 Default Value: 256
This value is the number of receive descriptors allocated by the driver. This value is the number of receive descriptors allocated by the driver.
Increasing this value allows the driver to buffer more incoming packets. Increasing this value allows the driver to buffer more incoming packets.
Each descriptor is 16 bytes. A receive buffer is also allocated for each Each descriptor is 16 bytes. A receive buffer is also allocated for each
...@@ -149,6 +151,9 @@ Default Value: 80 ...@@ -149,6 +151,9 @@ Default Value: 80
NOTE: MTU designates the frame size. It only needs to be set for Jumbo NOTE: MTU designates the frame size. It only needs to be set for Jumbo
Frames. Frames.
NOTE: Depending on the available system resources, the request for a
higher number of receive descriptors may be denied. In this case,
use a lower number.
RxIntDelay RxIntDelay
Valid Range: 0-65535 (0=off) Valid Range: 0-65535 (0=off)
...@@ -168,11 +173,11 @@ Default Value: 0 ...@@ -168,11 +173,11 @@ Default Value: 0
restoring the network connection. To eliminate the potential for restoring the network connection. To eliminate the potential for
the hang ensure that RxIntDelay is set to 0. the hang ensure that RxIntDelay is set to 0.
RxAbsIntDelay (82540, 82545, and 82546-based adapters only) RxAbsIntDelay (82540, 82545 and later adapters only)
Valid Range: 0-65535 (0=off) Valid Range: 0-65535 (0=off)
Default Value: 128 Default Value: 128
This value, in units of 1.024 microseconds, limits the delay in which a This value, in units of 1.024 microseconds, limits the delay in which a
transmit interrupt is generated. Useful only if RxIntDelay is non-zero, receive interrupt is generated. Useful only if RxIntDelay is non-zero,
this value ensures that an interrupt is generated after the initial this value ensures that an interrupt is generated after the initial
packet is received within the set amount of time. Proper tuning, packet is received within the set amount of time. Proper tuning,
along with RxIntDelay, may improve traffic throughput in specific network along with RxIntDelay, may improve traffic throughput in specific network
...@@ -188,12 +193,16 @@ Default Value: 0 (auto-negotiate at all supported speeds) ...@@ -188,12 +193,16 @@ Default Value: 0 (auto-negotiate at all supported speeds)
TxDescriptors TxDescriptors
Valid Range: 80-256 for 82542 and 82543-based adapters Valid Range: 80-256 for 82542 and 82543-based adapters
80-4096 for 82540, 82544, 82545, and 82546-based adapters 80-4096 for all other supported adapters
Default Value: 256 Default Value: 256
This value is the number of transmit descriptors allocated by the driver. This value is the number of transmit descriptors allocated by the driver.
Increasing this value allows the driver to queue more transmits. Each Increasing this value allows the driver to queue more transmits. Each
descriptor is 16 bytes. descriptor is 16 bytes.
NOTE: Depending on the available system resources, the request for a
higher number of transmit descriptors may be denied. In this case,
use a lower number.
TxIntDelay TxIntDelay
Valid Range: 0-65535 (0=off) Valid Range: 0-65535 (0=off)
Default Value: 64 Default Value: 64
...@@ -203,7 +212,7 @@ Default Value: 64 ...@@ -203,7 +212,7 @@ Default Value: 64
system is reporting dropped transmits, this value may be set too high system is reporting dropped transmits, this value may be set too high
causing the driver to run out of available transmit descriptors. causing the driver to run out of available transmit descriptors.
TxAbsIntDelay (82540, 82545, and 82546-based adapters only) TxAbsIntDelay (82540, 82545 and later adapters only)
Valid Range: 0-65535 (0=off) Valid Range: 0-65535 (0=off)
Default Value: 64 Default Value: 64
This value, in units of 1.024 microseconds, limits the delay in which a This value, in units of 1.024 microseconds, limits the delay in which a
...@@ -219,7 +228,6 @@ Default Value: 1 ...@@ -219,7 +228,6 @@ Default Value: 1
A value of '1' indicates that the driver should enable IP checksum A value of '1' indicates that the driver should enable IP checksum
offload for received packets (both UDP and TCP) to the adapter hardware. offload for received packets (both UDP and TCP) to the adapter hardware.
Speed and Duplex Configuration Speed and Duplex Configuration
============================== ==============================
...@@ -251,6 +259,10 @@ Bit 7 6 5 4 3 2 1 0 ...@@ -251,6 +259,10 @@ Bit 7 6 5 4 3 2 1 0
Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10 Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10
Duplex Full Full Half Full Half Duplex Full Full Half Full Half
For example to limit the negotiated speed/duplex on the interface to 10 Mbps
Half or Full duplex, set AutoNeg to 0x02:
insmod e1000 AutoNeg=0x02
Note that setting AutoNeg does not guarantee that the board will link at the Note that setting AutoNeg does not guarantee that the board will link at the
highest specified speed or duplex mode, but the board will link at the highest specified speed or duplex mode, but the board will link at the
highest possible speed/duplex of the link partner IF the link partner is also highest possible speed/duplex of the link partner IF the link partner is also
...@@ -261,6 +273,38 @@ adapter MUST be forced to the same speed/duplex. ...@@ -261,6 +273,38 @@ adapter MUST be forced to the same speed/duplex.
Additional Configurations Additional Configurations
========================= =========================
Configuring the Driver on Different Distributions
-------------------------------------------------
Configuring a network driver to load properly when the system is started is
distribution dependent. Typically, the configuration process involves adding
an alias line to /etc/modules.conf as well as editing other system startup
scripts and/or configuration files. Many popular Linux distributions ship
with tools to make these changes for you. To learn the proper way to
configure a network device for your system, refer to your distribution
documentation. If during this process you are asked for the driver or module
name, the name for the Linux Base Driver for the Intel PRO/1000 Family of
Adapters is e1000.
As an example, if you install the e1000 driver for two PRO/1000 adapters
(eth0 and eth1) and set the speed and duplex to 10full and 100half, add the
following to modules.conf:
alias eth0 e1000
alias eth1 e1000
options e1000 Speed=10,100 Duplex=2,1
Viewing Link Messages
---------------------
Link messages will not be displayed to the console if the distribution is
restricting system messages. In order to see network driver link messages on
your console, set dmesg to eight by entering the following:
dmesg -n 8
NOTE: This setting is not saved across reboots.
Jumbo Frames Jumbo Frames
------------ ------------
...@@ -278,6 +322,51 @@ Additional Configurations ...@@ -278,6 +322,51 @@ Additional Configurations
10 or 100 Mbps may result in poor performance or loss of link. 10 or 100 Mbps may result in poor performance or loss of link.
NOTE: MTU designates the frame size. To enable Jumbo Frames, increase the
MTU size on the interface beyond 1500.
Ethtool
-------
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information. Ethtool
version 1.6 or later is required for this functionality.
The latest release of ethtool can be found from
http://sf.net/projects/gkernel. After ethtool is installed,
ethtool-copy.h must be copied and renamed to ethtool.h in your kernel
source tree at <linux_kernel_src>/include/linux. Backup the original
ethtool.h as needed before copying. The driver then must be recompiled
in order to take advantage of the latest ethtool features.
NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support
for a more complete ethtool feature set can be enabled by upgrading
ethtool to ethtool-1.8.1.
Enabling Wake on LAN* (WoL)
---------------------------
WoL is configured through the Ethtool* utility. Ethtool is included with
all versions of Red Hat after Red Hat 7.2. For other Linux distributions,
download and install Ethtool from the following website:
http://sourceforge.net/projects/gkernel.
For instructions on enabling WoL with Ethtool, refer to the website listed
above.
WoL will be enabled on the system during the next shut down or reboot.
For this driver version, in order to enable WoL, the e1000 driver must be
loaded when shutting down or rebooting the system.
NAPI
----
NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled
or disabled based on the configuration of the kernel.
See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.
Known Issues Known Issues
============ ============
...@@ -285,9 +374,9 @@ Known Issues ...@@ -285,9 +374,9 @@ Known Issues
------------------------------- -------------------------------
Memory allocation failures have been observed on Linux systems with 64 MB Memory allocation failures have been observed on Linux systems with 64 MB
of RAM or less that are running Jumbo Frames. If you are using Jumbo of RAM or less that are running Jumbo Frames. If you are using Jumbo Frames,
Frames, your system may require more than the advertised minimum your system may require more than the advertised minimum requirement of 64 MB
requirement of 64 MB of system memory. of system memory.
Support Support
......
Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters
================================================================ ================================================================
January 06, 2003 September 13, 2004
Contents Contents
======== ========
- In This Release - In This Release
- Supported Adapters - Identifying Your Adapter
- Command Line Parameters - Command Line Parameters
- Improving Performance - Improving Performance
- Support - Support
...@@ -18,34 +18,21 @@ In This Release ...@@ -18,34 +18,21 @@ In This Release
=============== ===============
This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family
of Adapters, version 1.0.x. This driver is intended for 2.4.x kernels; it is of Adapters, version 1.0.x. This driver includes support for Itanium(TM)2 and
known to build properly on 2.4.x kernels through 2.4.18. Intel focused EM64T systems.
testing on Intel architectures running kernels 2.4.18. This driver includes
support for Itanium(TM)-based systems.
For questions related to hardware requirements, refer to the documentation For questions related to hardware requirements, refer to the documentation
supplied with your Intel PRO/10GbE adapter. All hardware requirements listed supplied with your Intel PRO/10GbE adapter. All hardware requirements listed
apply to use with Linux. apply to use with Linux.
Identifying Your Adapter
Supported Adapters ========================
==================
The following Intel network adapters are compatible with the drivers in this
release:
Controller Adapter Name Board IDs
---------- ------------ ---------
82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx
To verify your Intel adapter is supported, find the board ID number on the To verify your Intel 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 adapter. Look for a label that has a barcode and a number in the format
A12345-001. Match this to the list of numbers above. A12345-001.
For more information on how to identify your adapter, go to the Adapter & Use the above information and the Adapter & Driver ID Guide at:
Driver ID Guide at:
http://support.intel.com/support/network/adapter/pro100/21397.htm http://support.intel.com/support/network/adapter/pro100/21397.htm
...@@ -72,8 +59,9 @@ loads the ixgb driver with 80 TX resources for the first adapter and 128 TX ...@@ -72,8 +59,9 @@ loads the ixgb driver with 80 TX resources for the first adapter and 128 TX
resources for the second adapter. resources for the second adapter.
The default value for each parameter is generally the recommended setting, The default value for each parameter is generally the recommended setting,
unless otherwise noted. unless otherwise noted. Also, if the driver is statically built into the
kernel, the driver is loaded with the default values for all the parameters.
Ethtool can be used to change some of the parameters at runtime.
FlowControl FlowControl
Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
...@@ -125,7 +113,6 @@ Default Value: 1 ...@@ -125,7 +113,6 @@ Default Value: 1
offload for transmitted packets (both UDP and TCP) to the adapter offload for transmitted packets (both UDP and TCP) to the adapter
hardware. hardware.
Improving Performance Improving Performance
===================== =====================
......
...@@ -1413,66 +1413,17 @@ config E100 ...@@ -1413,66 +1413,17 @@ config E100
depends on NET_PCI && PCI depends on NET_PCI && PCI
select MII select MII
---help--- ---help---
This driver supports Intel(R) PRO/100 family of adapters, which This driver supports Intel(R) PRO/100 family of adapters.
includes:
Controller Adapter Name Board IDs
---------- ------------ ---------
82558 PRO/100+ PCI Adapter 668081-xxx,
689661-xxx
82558 PRO/100+ Management Adapter 691334-xxx,
701738-xxx,
721383-xxx
82558 PRO/100+ Dual Port Server Adapter 714303-xxx,
711269-xxx,
A28276-xxx
82558 PRO/100+ PCI Server Adapter 710550-xxx
82550 PRO/100 S Server Adapter 752438-xxx
82559 A56831-xxx,
A10563-xxx,
A12171-xxx,
A12321-xxx,
A12320-xxx,
A12170-xxx
748568-xxx
748565-xxx
82550 PRO/100 S Desktop Adapter 751767-xxx
82559 748592-xxx,
A12167-xxx,
A12318-xxx,
A12317-xxx,
A12165-xxx,
748569-xxx
82559 PRO/100+ Server Adapter 729757-xxx
82559 PRO/100 S Management Adapter 748566-xxx,
748564-xxx
82550 PRO/100 S Dual Port Server Adapter A56831-xxx
82551 PRO/100 M Desktop Adapter A80897-xxx
PRO/100 S Advanced Management Adapter
747842-xxx,
745171-xxx
CNR PRO/100 VE Desktop Adapter A10386-xxx,
A10725-xxx,
A23801-xxx,
A19716-xxx
PRO/100 VM Desktop Adapter A14323-xxx,
A19725-xxx,
A23801-xxx,
A22220-xxx,
A23796-xxx
To verify that your adapter is supported, find the board ID number 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 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 in the format 123456-001 (six digits hyphen three digits).
this to the list of numbers above.
For more information on how to identify your adapter, go to the Use the above information and the Adapter & Driver ID Guide at:
Adapter & Driver ID Guide at:
http://support.intel.com/support/network/adapter/pro100/21397.htm http://support.intel.com/support/network/adapter/pro100/21397.htm
to identify the adapter.
For the latest Intel PRO/100 network driver for Linux, see: For the latest Intel PRO/100 network driver for Linux, see:
http://appsr.intel.com/scripts-df/support_intel.asp http://appsr.intel.com/scripts-df/support_intel.asp
...@@ -1730,7 +1681,7 @@ config VIA_RHINE ...@@ -1730,7 +1681,7 @@ config VIA_RHINE
(e.g. VT8235). (e.g. VT8235).
To compile this driver as a module, choose M here. The module To compile this driver as a module, choose M here. The module
will be called via-rhine. will be called via-velocity.
config VIA_RHINE_MMIO config VIA_RHINE_MMIO
bool "Use MMIO instead of PIO" bool "Use MMIO instead of PIO"
...@@ -1742,18 +1693,6 @@ config VIA_RHINE_MMIO ...@@ -1742,18 +1693,6 @@ config VIA_RHINE_MMIO
If unsure, say Y. If unsure, say Y.
config VIA_VELOCITY
tristate "VIA Velocity support"
depends on NET_PCI && PCI
select CRC32
select CRC_CCITT
select MII
help
If you have a VIA "Velocity" based network card say Y here.
To compile this driver as a module, choose M here. The module
will be called via-velocity.
config LAN_SAA9730 config LAN_SAA9730
bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)" bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)"
depends on NET_PCI && EXPERIMENTAL && MIPS depends on NET_PCI && EXPERIMENTAL && MIPS
...@@ -1933,29 +1872,8 @@ config E1000 ...@@ -1933,29 +1872,8 @@ config E1000
depends on PCI depends on PCI
---help--- ---help---
This driver supports Intel(R) PRO/1000 gigabit ethernet family of This driver supports Intel(R) PRO/1000 gigabit ethernet family of
adapters, which includes: adapters. For more information on how to identify your adapter, go
to the Adapter & Driver ID Guide at:
Controller Adapter Name Board IDs
---------- ------------ ---------
82542 PRO/1000 Gigabit Server Adapter 700262-xxx,
717037-xxx
82543 PRO/1000 F Server Adapter 738640-xxx,
A38888-xxx
82543 PRO/1000 T Server Adapter A19845-xxx,
A33948-xxx
82544 PRO/1000 XT Server Adapter A51580-xxx
82544 PRO/1000 XF Server Adapter A50484-xxx
82544 PRO/1000 T Desktop Adapter A62947-xxx
82540 PRO/1000 MT Desktop Adapter A78408-xxx
82541 PRO/1000 MT Desktop Adapter C91016-xxx
82545 PRO/1000 MT Server Adapter A92165-xxx
82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx
82545 PRO/1000 MF Server Adapter A91622-xxx
82545 PRO/1000 MF Server Adapter(LX) A91624-xxx
82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx
For more information on how to identify your adapter, go to the
Adapter & Driver ID Guide at:
<http://support.intel.com/support/network/adapter/pro100/21397.htm> <http://support.intel.com/support/network/adapter/pro100/21397.htm>
...@@ -2140,6 +2058,18 @@ config SK98LIN ...@@ -2140,6 +2058,18 @@ config SK98LIN
say M here and read Documentation/kbuild/modules.txt. The module will say M here and read Documentation/kbuild/modules.txt. The module will
be called sk98lin. This is recommended. be called sk98lin. This is recommended.
config VIA_VELOCITY
tristate "VIA Velocity support"
depends on NET_PCI && PCI
select CRC32
select CRC_CCITT
select MII
help
If you have a VIA "Velocity" based network card say Y here.
To compile this driver as a module, choose M here. The module
will be called via-velocity.
config TIGON3 config TIGON3
tristate "Broadcom Tigon3 support" tristate "Broadcom Tigon3 support"
depends on PCI depends on PCI
...@@ -2202,14 +2132,8 @@ config IXGB ...@@ -2202,14 +2132,8 @@ config IXGB
depends on PCI depends on PCI
---help--- ---help---
This driver supports Intel(R) PRO/10GbE family of This driver supports Intel(R) PRO/10GbE family of
adapters, which includes: adapters. For more information on how to identify your adapter, go
to the Adapter & Driver ID Guide at:
Controller Adapter Name Board IDs
---------- ------------ ---------
82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx
For more information on how to identify your adapter, go to the
Adapter & Driver ID Guide at:
<http://support.intel.com/support/network/adapter/pro100/21397.htm> <http://support.intel.com/support/network/adapter/pro100/21397.htm>
......
...@@ -641,6 +641,8 @@ e1000_remove(struct pci_dev *pdev) ...@@ -641,6 +641,8 @@ e1000_remove(struct pci_dev *pdev)
pci_release_regions(pdev); pci_release_regions(pdev);
free_netdev(netdev); free_netdev(netdev);
pci_disable_device(pdev);
} }
/** /**
......
...@@ -549,6 +549,8 @@ static int hdlcdrv_close(struct net_device *dev) ...@@ -549,6 +549,8 @@ static int hdlcdrv_close(struct net_device *dev)
netif_stop_queue(dev); netif_stop_queue(dev);
netif_stop_queue(dev);
if (s->ops && s->ops->close) if (s->ops && s->ops->close)
i = s->ops->close(dev); i = s->ops->close(dev);
if (s->skb) if (s->skb)
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
char ixgb_driver_name[] = "ixgb"; char ixgb_driver_name[] = "ixgb";
char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver";
char ixgb_driver_version[] = "1.0.66"; char ixgb_driver_version[] = "1.0.66-k2";
char ixgb_copyright[] = "Copyright (c) 2001-2004 Intel Corporation."; char ixgb_copyright[] = "Copyright (c) 2001-2004 Intel Corporation.";
/* ixgb_pci_tbl - PCI Device ID Table /* ixgb_pci_tbl - PCI Device ID Table
...@@ -1614,8 +1614,12 @@ static irqreturn_t ixgb_intr(int irq, void *data, struct pt_regs *regs) ...@@ -1614,8 +1614,12 @@ static irqreturn_t ixgb_intr(int irq, void *data, struct pt_regs *regs)
} }
#else #else
for (i = 0; i < IXGB_MAX_INTR; i++) for (i = 0; i < IXGB_MAX_INTR; i++)
if (!ixgb_clean_rx_irq(adapter) & !ixgb_clean_tx_irq(adapter)) if (ixgb_clean_rx_irq(adapter) == FALSE)
break; break;
for (i = 0; i < IXGB_MAX_INTR; i++)
if (ixgb_clean_tx_irq(adapter) == FALSE)
break;
/* if RAIDC:EN == 1 and ICR:RXDMT0 == 1, we need to /* if RAIDC:EN == 1 and ICR:RXDMT0 == 1, we need to
* set IMS:RXDMT0 to 1 to restart the RBD timer (POLL) * set IMS:RXDMT0 to 1 to restart the RBD timer (POLL)
*/ */
...@@ -1676,7 +1680,7 @@ static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter) ...@@ -1676,7 +1680,7 @@ static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter)
eop = tx_ring->buffer_info[i].next_to_watch; eop = tx_ring->buffer_info[i].next_to_watch;
eop_desc = IXGB_TX_DESC(*tx_ring, eop); eop_desc = IXGB_TX_DESC(*tx_ring, eop);
while (eop_desc->status & cpu_to_le32(IXGB_TX_DESC_STATUS_DD)) { while (eop_desc->status & IXGB_TX_DESC_STATUS_DD) {
for (cleaned = FALSE; !cleaned;) { for (cleaned = FALSE; !cleaned;) {
tx_desc = IXGB_TX_DESC(*tx_ring, i); tx_desc = IXGB_TX_DESC(*tx_ring, i);
......
...@@ -42,10 +42,6 @@ ...@@ -42,10 +42,6 @@
#include "8390.h" #include "8390.h"
#if (LINUX_VERSION_CODE < 0x02030e)
#define net_device device
#endif
#define WD_START_PG 0x00 /* First page of TX buffer */ #define WD_START_PG 0x00 /* First page of TX buffer */
#define CABLETRON_RX_START_PG 0x00 /* First page of RX buffer */ #define CABLETRON_RX_START_PG 0x00 /* First page of RX buffer */
#define CABLETRON_RX_STOP_PG 0x30 /* Last page +1 of RX ring */ #define CABLETRON_RX_STOP_PG 0x30 /* Last page +1 of RX ring */
......
...@@ -653,12 +653,43 @@ static void __devexit ne2k_pci_remove_one (struct pci_dev *pdev) ...@@ -653,12 +653,43 @@ static void __devexit ne2k_pci_remove_one (struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
} }
#ifdef CONFIG_PM
static int ne2k_pci_suspend (struct pci_dev *pdev, u32 state)
{
struct net_device *dev = pci_get_drvdata (pdev);
netif_device_detach(dev);
pci_save_state(pdev, pdev->saved_config_space);
pci_set_power_state(pdev, state);
return 0;
}
static int ne2k_pci_resume (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata (pdev);
pci_set_power_state(pdev, 0);
pci_restore_state(pdev, pdev->saved_config_space);
NS8390_init(dev, 1);
netif_device_attach(dev);
return 0;
}
#endif /* CONFIG_PM */
static struct pci_driver ne2k_driver = { static struct pci_driver ne2k_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.probe = ne2k_pci_init_one, .probe = ne2k_pci_init_one,
.remove = __devexit_p(ne2k_pci_remove_one), .remove = __devexit_p(ne2k_pci_remove_one),
.id_table = ne2k_pci_tbl, .id_table = ne2k_pci_tbl,
#ifdef CONFIG_PM
.suspend = ne2k_pci_suspend,
.resume = ne2k_pci_resume,
#endif /* CONFIG_PM */
}; };
......
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
* tuning * tuning
* 0.20 - fix stupid RFEN thinko. i am such a smurf. * 0.20 - fix stupid RFEN thinko. i am such a smurf.
* *
* 20040828 0.21 - add hardware vlan accleration
* by Neil Horman <nhorman@redhat.com>
* Driver Overview * Driver Overview
* =============== * ===============
* *
...@@ -92,6 +94,7 @@ ...@@ -92,6 +94,7 @@
//#define dprintk printk //#define dprintk printk
#define dprintk(x...) do { } while (0) #define dprintk(x...) do { } while (0)
#include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -108,6 +111,7 @@ ...@@ -108,6 +111,7 @@
#include <linux/prefetch.h> #include <linux/prefetch.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/if_vlan.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -138,6 +142,9 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */ ...@@ -138,6 +142,9 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
/* tunables */ /* tunables */
#define RX_BUF_SIZE 1500 /* 8192 */ #define RX_BUF_SIZE 1500 /* 8192 */
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#define NS83820_VLAN_ACCEL_SUPPORT
#endif
/* Must not exceed ~65000. */ /* Must not exceed ~65000. */
#define NR_RX_DESC 64 #define NR_RX_DESC 64
...@@ -262,6 +269,8 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */ ...@@ -262,6 +269,8 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
#define EXTSTS_UDPPKT 0x00200000 #define EXTSTS_UDPPKT 0x00200000
#define EXTSTS_TCPPKT 0x00080000 #define EXTSTS_TCPPKT 0x00080000
#define EXTSTS_IPPKT 0x00020000 #define EXTSTS_IPPKT 0x00020000
#define EXTSTS_VPKT 0x00010000
#define EXTSTS_VTG_MASK 0x0000ffff
#define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0)) #define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0))
...@@ -403,6 +412,7 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */ ...@@ -403,6 +412,7 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
#define CMDSTS_INTR 0x20000000 #define CMDSTS_INTR 0x20000000
#define CMDSTS_ERR 0x10000000 #define CMDSTS_ERR 0x10000000
#define CMDSTS_OK 0x08000000 #define CMDSTS_OK 0x08000000
#define CMDSTS_RUNT 0x00200000
#define CMDSTS_LEN_MASK 0x0000ffff #define CMDSTS_LEN_MASK 0x0000ffff
#define CMDSTS_DEST_MASK 0x01800000 #define CMDSTS_DEST_MASK 0x01800000
...@@ -432,6 +442,10 @@ struct ns83820 { ...@@ -432,6 +442,10 @@ struct ns83820 {
struct pci_dev *pci_dev; struct pci_dev *pci_dev;
#ifdef NS83820_VLAN_ACCEL_SUPPORT
struct vlan_group *vlgrp;
#endif
struct rx_info rx_info; struct rx_info rx_info;
struct tasklet_struct rx_tasklet; struct tasklet_struct rx_tasklet;
...@@ -494,6 +508,33 @@ static inline void kick_rx(struct net_device *ndev) ...@@ -494,6 +508,33 @@ static inline void kick_rx(struct net_device *ndev)
(((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE) (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE)
#ifdef NS83820_VLAN_ACCEL_SUPPORT
static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp)
{
struct ns83820 *dev = PRIV(ndev);
spin_lock_irq(&dev->misc_lock);
spin_lock(&dev->tx_lock);
dev->vlgrp = grp;
spin_unlock(&dev->tx_lock);
spin_unlock_irq(&dev->misc_lock);
}
static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid)
{
struct ns83820 *dev = PRIV(ndev);
spin_lock_irq(&dev->misc_lock);
spin_lock(&dev->tx_lock);
if (dev->vlgrp)
dev->vlgrp->vlan_devices[vid] = NULL;
spin_unlock(&dev->tx_lock);
spin_unlock_irq(&dev->misc_lock);
}
#endif
/* Packet Receiver /* Packet Receiver
* *
* The hardware supports linked lists of receive descriptors for * The hardware supports linked lists of receive descriptors for
...@@ -836,6 +877,7 @@ static void fastcall rx_irq(struct net_device *ndev) ...@@ -836,6 +877,7 @@ static void fastcall rx_irq(struct net_device *ndev)
struct ns83820 *dev = PRIV(ndev); struct ns83820 *dev = PRIV(ndev);
struct rx_info *info = &dev->rx_info; struct rx_info *info = &dev->rx_info;
unsigned next_rx; unsigned next_rx;
int rx_rc, len;
u32 cmdsts, *desc; u32 cmdsts, *desc;
unsigned long flags; unsigned long flags;
int nr = 0; int nr = 0;
...@@ -876,8 +918,24 @@ static void fastcall rx_irq(struct net_device *ndev) ...@@ -876,8 +918,24 @@ static void fastcall rx_irq(struct net_device *ndev)
pci_unmap_single(dev->pci_dev, bufptr, pci_unmap_single(dev->pci_dev, bufptr,
RX_BUF_SIZE, PCI_DMA_FROMDEVICE); RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
len = cmdsts & CMDSTS_LEN_MASK;
#ifdef NS83820_VLAN_ACCEL_SUPPORT
/* NH: As was mentioned below, this chip is kinda
* brain dead about vlan tag stripping. Frames
* that are 64 bytes with a vlan header appended
* like arp frames, or pings, are flagged as Runts
* when the tag is stripped and hardware. This
* also means that the OK bit in the descriptor
* is cleared when the frame comes in so we have
* to do a specific length check here to make sure
* the frame would have been ok, had we not stripped
* the tag.
*/
if (likely((CMDSTS_OK & cmdsts) ||
((cmdsts & CMDSTS_RUNT) && len >= 56))) {
#else
if (likely(CMDSTS_OK & cmdsts)) { if (likely(CMDSTS_OK & cmdsts)) {
int len = cmdsts & 0xffff; #endif
skb_put(skb, len); skb_put(skb, len);
if (unlikely(!skb)) if (unlikely(!skb))
goto netdev_mangle_me_harder_failed; goto netdev_mangle_me_harder_failed;
...@@ -891,7 +949,18 @@ static void fastcall rx_irq(struct net_device *ndev) ...@@ -891,7 +949,18 @@ static void fastcall rx_irq(struct net_device *ndev)
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
} }
skb->protocol = eth_type_trans(skb, ndev); skb->protocol = eth_type_trans(skb, ndev);
if (NET_RX_DROP == netif_rx(skb)) { #ifdef NS83820_VLAN_ACCEL_SUPPORT
if(extsts & EXTSTS_VPKT) {
unsigned short tag;
tag = ntohs(extsts & EXTSTS_VTG_MASK);
rx_rc = vlan_hwaccel_rx(skb,dev->vlgrp,tag);
} else {
rx_rc = netif_rx(skb);
}
#else
rx_rc = netif_rx(skb);
#endif
if (NET_RX_DROP == rx_rc) {
netdev_mangle_me_harder_failed: netdev_mangle_me_harder_failed:
dev->stats.rx_dropped ++; dev->stats.rx_dropped ++;
} }
...@@ -1099,6 +1168,17 @@ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev) ...@@ -1099,6 +1168,17 @@ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
extsts |= EXTSTS_UDPPKT; extsts |= EXTSTS_UDPPKT;
} }
#ifdef NS83820_VLAN_ACCEL_SUPPORT
if(vlan_tx_tag_present(skb)) {
/* fetch the vlan tag info out of the
* ancilliary data if the vlan code
* is using hw vlan acceleration
*/
short tag = vlan_tx_tag_get(skb);
extsts |= (EXTSTS_VPKT | htons(tag));
}
#endif
len = skb->len; len = skb->len;
if (nr_frags) if (nr_frags)
len -= skb->data_len; len -= skb->data_len;
...@@ -1854,7 +1934,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ ...@@ -1854,7 +1934,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
SET_ETHTOOL_OPS(ndev, &ops); SET_ETHTOOL_OPS(ndev, &ops);
ndev->tx_timeout = ns83820_tx_timeout; ndev->tx_timeout = ns83820_tx_timeout;
ndev->watchdog_timeo = 5 * HZ; ndev->watchdog_timeo = 5 * HZ;
pci_set_drvdata(pci_dev, ndev); pci_set_drvdata(pci_dev, ndev);
ns83820_do_reset(dev, CR_RST); ns83820_do_reset(dev, CR_RST);
...@@ -1980,11 +2059,25 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ ...@@ -1980,11 +2059,25 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
* a ping with a VLAN header) then the card, strips the 4 byte VLAN * a ping with a VLAN header) then the card, strips the 4 byte VLAN
* tag and then checks the packet size, so if RXCFG_ARP is not enabled, * tag and then checks the packet size, so if RXCFG_ARP is not enabled,
* it discrards it!. These guys...... * it discrards it!. These guys......
* also turn on tag stripping if hardware acceleration is enabled
*/ */
writel(VRCR_IPEN | VRCR_VTDEN, dev->base + VRCR); #ifdef NS83820_VLAN_ACCEL_SUPPORT
#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN|VRCR_VTREN)
#else
#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN)
#endif
writel(VRCR_INIT_VALUE, dev->base + VRCR);
/* Enable per-packet TCP/UDP/IP checksumming */ /* Enable per-packet TCP/UDP/IP checksumming
writel(VTCR_PPCHK, dev->base + VTCR); * and per packet vlan tag insertion if
* vlan hardware acceleration is enabled
*/
#ifdef NS83820_VLAN_ACCEL_SUPPORT
#define VTCR_INIT_VALUE (VTCR_PPCHK|VTCR_VPPTI)
#else
#define VTCR_INIT_VALUE VTCR_PPCHK
#endif
writel(VTCR_INIT_VALUE, dev->base + VTCR);
/* Ramit : Enable async and sync pause frames */ /* Ramit : Enable async and sync pause frames */
/* writel(0, dev->base + PCR); */ /* writel(0, dev->base + PCR); */
...@@ -2001,6 +2094,13 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ ...@@ -2001,6 +2094,13 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
ndev->features |= NETIF_F_SG; ndev->features |= NETIF_F_SG;
ndev->features |= NETIF_F_IP_CSUM; ndev->features |= NETIF_F_IP_CSUM;
#ifdef NS83820_VLAN_ACCEL_SUPPORT
/* We also support hardware vlan acceleration */
ndev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
ndev->vlan_rx_register = ns83820_vlan_rx_register;
ndev->vlan_rx_kill_vid = ns83820_vlan_rx_kill_vid;
#endif
if (using_dac) { if (using_dac) {
printk(KERN_INFO "%s: using 64 bit addressing.\n", printk(KERN_INFO "%s: using 64 bit addressing.\n",
ndev->name); ndev->name);
......
...@@ -359,7 +359,7 @@ struct pcnet32_private { ...@@ -359,7 +359,7 @@ struct pcnet32_private {
struct net_device_stats stats; struct net_device_stats stats;
char tx_full; char tx_full;
int options; int options;
int shared_irq:1, /* shared irq possible */ unsigned int shared_irq:1, /* shared irq possible */
dxsuflo:1, /* disable transmit stop on uflo */ dxsuflo:1, /* disable transmit stop on uflo */
mii:1; /* mii port available */ mii:1; /* mii port available */
struct net_device *next; struct net_device *next;
......
...@@ -1401,7 +1401,6 @@ static void olympic_arb_cmd(struct net_device *dev) ...@@ -1401,7 +1401,6 @@ static void olympic_arb_cmd(struct net_device *dev)
u16 lan_status = 0, lan_status_diff ; /* Initialize to stop compiler warning */ u16 lan_status = 0, lan_status_diff ; /* Initialize to stop compiler warning */
u8 fdx_prot_error ; u8 fdx_prot_error ;
u16 next_ptr; u16 next_ptr;
int i ;
arb_block = (olympic_priv->olympic_lap + olympic_priv->arb) ; arb_block = (olympic_priv->olympic_lap + olympic_priv->arb) ;
asb_block = (olympic_priv->olympic_lap + olympic_priv->asb) ; asb_block = (olympic_priv->olympic_lap + olympic_priv->asb) ;
......
...@@ -1208,8 +1208,7 @@ static void de_adapter_wake (struct de_private *de) ...@@ -1208,8 +1208,7 @@ static void de_adapter_wake (struct de_private *de)
pci_write_config_dword(de->pdev, PCIPM, pmctl); pci_write_config_dword(de->pdev, PCIPM, pmctl);
/* de4x5.c delays, so we do too */ /* de4x5.c delays, so we do too */
current->state = TASK_UNINTERRUPTIBLE; msleep(10);
schedule_timeout(msecs_to_jiffies(10));
} }
} }
......
...@@ -5089,7 +5089,7 @@ mii_get_phy(struct net_device *dev) ...@@ -5089,7 +5089,7 @@ mii_get_phy(struct net_device *dev)
lp->useMII = TRUE; lp->useMII = TRUE;
/* Search the MII address space for possible PHY devices */ /* Search the MII address space for possible PHY devices */
for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(++i)%DE4X5_MAX_MII) { for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(i+1)%DE4X5_MAX_MII) {
lp->phy[lp->active].addr = i; lp->phy[lp->active].addr = i;
if (i==0) n++; /* Count cycles */ if (i==0) n++; /* Count cycles */
while (de4x5_reset_phy(dev)<0) udelay(100);/* Wait for reset */ while (de4x5_reset_phy(dev)<0) udelay(100);/* Wait for reset */
......
...@@ -117,6 +117,9 @@ static int xircom_open(struct net_device *dev); ...@@ -117,6 +117,9 @@ static int xircom_open(struct net_device *dev);
static int xircom_close(struct net_device *dev); static int xircom_close(struct net_device *dev);
static void xircom_up(struct xircom_private *card); static void xircom_up(struct xircom_private *card);
static struct net_device_stats *xircom_get_stats(struct net_device *dev); static struct net_device_stats *xircom_get_stats(struct net_device *dev);
#if CONFIG_NET_POLL_CONTROLLER
static void xircom_poll_controller(struct net_device *dev);
#endif
static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset); static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset);
static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset); static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset);
...@@ -269,6 +272,9 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ ...@@ -269,6 +272,9 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
dev->stop = &xircom_close; dev->stop = &xircom_close;
dev->get_stats = &xircom_get_stats; dev->get_stats = &xircom_get_stats;
dev->priv = private; dev->priv = private;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = &xircom_poll_controller;
#endif
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
...@@ -500,6 +506,14 @@ static struct net_device_stats *xircom_get_stats(struct net_device *dev) ...@@ -500,6 +506,14 @@ static struct net_device_stats *xircom_get_stats(struct net_device *dev)
} }
#ifdef CONFIG_NET_POLL_CONTROLLER
static void xircom_poll_controller(struct net_device *dev)
{
disable_irq(dev->irq);
xircom_interrupt(dev->irq, dev, NULL);
enable_irq(dev->irq);
}
#endif
static void initialize_card(struct xircom_private *card) static void initialize_card(struct xircom_private *card)
......
...@@ -234,7 +234,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, ...@@ -234,7 +234,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap,
ASSERT(tsap == self->client.tsap_ctrl, return;); ASSERT(tsap == self->client.tsap_ctrl, return;);
/* Remove frames queued on the control channel */ /* Remove frames queued on the control channel */
while ((skb = skb_dequeue(&self->client.txq))) { while ((skb = skb_dequeue(&self->client.txq)) != NULL) {
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
self->client.tx_busy = FALSE; self->client.tx_busy = FALSE;
......
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