Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
cd9f63e2
Commit
cd9f63e2
authored
Oct 25, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://gkernel.bkbits.net/net-drivers-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
64416848
4f591d72
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
790 additions
and
503 deletions
+790
-503
Documentation/networking/e100.txt
Documentation/networking/e100.txt
+127
-11
Documentation/networking/e1000.txt
Documentation/networking/e1000.txt
+153
-64
Documentation/networking/ixgb.txt
Documentation/networking/ixgb.txt
+12
-25
drivers/net/3c59x.c
drivers/net/3c59x.c
+1
-1
drivers/net/Kconfig
drivers/net/Kconfig
+22
-98
drivers/net/dummy.c
drivers/net/dummy.c
+2
-2
drivers/net/e1000/e1000.h
drivers/net/e1000/e1000.h
+0
-2
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_ethtool.c
+9
-4
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_hw.c
+109
-19
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+16
-27
drivers/net/e1000/e1000_osdep.h
drivers/net/e1000/e1000_osdep.h
+6
-0
drivers/net/e1000/e1000_param.c
drivers/net/e1000/e1000_param.c
+104
-63
drivers/net/eql.c
drivers/net/eql.c
+13
-13
drivers/net/hamradio/hdlcdrv.c
drivers/net/hamradio/hdlcdrv.c
+2
-0
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgb/ixgb_main.c
+7
-3
drivers/net/mac8390.c
drivers/net/mac8390.c
+0
-4
drivers/net/ne2k-pci.c
drivers/net/ne2k-pci.c
+31
-0
drivers/net/ns83820.c
drivers/net/ns83820.c
+111
-10
drivers/net/pcnet32.c
drivers/net/pcnet32.c
+3
-3
drivers/net/sis900.c
drivers/net/sis900.c
+10
-8
drivers/net/skfp/hwmtm.c
drivers/net/skfp/hwmtm.c
+2
-1
drivers/net/slip.c
drivers/net/slip.c
+19
-20
drivers/net/tokenring/olympic.c
drivers/net/tokenring/olympic.c
+0
-1
drivers/net/tulip/de2104x.c
drivers/net/tulip/de2104x.c
+1
-2
drivers/net/tulip/de4x5.c
drivers/net/tulip/de4x5.c
+1
-1
drivers/net/tulip/tulip_core.c
drivers/net/tulip/tulip_core.c
+12
-9
drivers/net/tulip/xircom_cb.c
drivers/net/tulip/xircom_cb.c
+14
-0
include/linux/netdevice.h
include/linux/netdevice.h
+0
-2
net/Kconfig
net/Kconfig
+0
-18
net/core/dev.c
net/core/dev.c
+2
-91
net/irda/irlan/irlan_client.c
net/irda/irlan/irlan_client.c
+1
-1
No files found.
Documentation/networking/e100.txt
View file @
cd9f63e2
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
=======
=======
...
...
Documentation/networking/e1000.txt
View file @
cd9f63e2
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,63 +20,29 @@ In This Release
...
@@ -20,63 +20,29 @@ 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:
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,27 +58,39 @@ For example, with two PRO/1000 PCI adapters, entering:
...
@@ -92,27 +58,39 @@ 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
resource
s for the first adapter and 128 TX
loads the e1000 driver with 80 TX
descriptor
s for the first adapter and 128 TX
resource
s for the second adapter.
descriptor
s 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
Default Value: 0x2F
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 b
y
either one
Defines the direction in which data is allowed to flow. Can b
e
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-bas
ed adapters
80-4096 for
all other support
ed 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-bas
ed adapters
80-4096 for
all other support
ed 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
...
...
Documentation/networking/ixgb.txt
View file @
cd9f63e2
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,36 +18,23 @@ In This Release
...
@@ -18,36 +18,23 @@ 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
For the latest Intel network drivers for Linux, go to:
For the latest Intel network drivers for Linux, go to:
...
@@ -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
=====================
=====================
...
...
drivers/net/3c59x.c
View file @
cd9f63e2
...
@@ -2887,7 +2887,7 @@ static void vortex_get_drvinfo(struct net_device *dev,
...
@@ -2887,7 +2887,7 @@ static void vortex_get_drvinfo(struct net_device *dev,
}
}
static
struct
ethtool_ops
vortex_ethtool_ops
=
{
static
struct
ethtool_ops
vortex_ethtool_ops
=
{
.
get_drvinfo
=
vortex_get_drvinfo
,
.
get_drvinfo
=
vortex_get_drvinfo
,
};
};
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI
...
...
drivers/net/Kconfig
View file @
cd9f63e2
...
@@ -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>
...
...
drivers/net/dummy.c
View file @
cd9f63e2
...
@@ -77,7 +77,7 @@ static void __init dummy_setup(struct net_device *dev)
...
@@ -77,7 +77,7 @@ static void __init dummy_setup(struct net_device *dev)
static
int
dummy_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
dummy_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_device_stats
*
stats
=
dev
->
priv
;
struct
net_device_stats
*
stats
=
netdev_priv
(
dev
)
;
stats
->
tx_packets
++
;
stats
->
tx_packets
++
;
stats
->
tx_bytes
+=
skb
->
len
;
stats
->
tx_bytes
+=
skb
->
len
;
...
@@ -88,7 +88,7 @@ static int dummy_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -88,7 +88,7 @@ static int dummy_xmit(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
dummy_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
dummy_get_stats
(
struct
net_device
*
dev
)
{
{
return
dev
->
priv
;
return
netdev_priv
(
dev
)
;
}
}
static
struct
net_device
**
dummies
;
static
struct
net_device
**
dummies
;
...
...
drivers/net/e1000/e1000.h
View file @
cd9f63e2
...
@@ -64,7 +64,6 @@
...
@@ -64,7 +64,6 @@
#include <linux/udp.h>
#include <linux/udp.h>
#include <net/pkt_sched.h>
#include <net/pkt_sched.h>
#include <linux/list.h>
#include <linux/list.h>
#include <linux/rtnetlink.h>
#include <linux/reboot.h>
#include <linux/reboot.h>
#ifdef NETIF_F_TSO
#ifdef NETIF_F_TSO
#include <net/checksum.h>
#include <net/checksum.h>
...
@@ -73,7 +72,6 @@
...
@@ -73,7 +72,6 @@
#include <linux/mii.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/if_vlan.h>
#include <linux/moduleparam.h>
#define BAR_0 0
#define BAR_0 0
#define BAR_1 1
#define BAR_1 1
...
...
drivers/net/e1000/e1000_ethtool.c
View file @
cd9f63e2
...
@@ -249,7 +249,8 @@ e1000_set_pauseparam(struct net_device *netdev,
...
@@ -249,7 +249,8 @@ e1000_set_pauseparam(struct net_device *netdev,
e1000_reset
(
adapter
);
e1000_reset
(
adapter
);
}
}
else
else
return
e1000_force_mac_fc
(
hw
);
return
((
hw
->
media_type
==
e1000_media_type_fiber
)
?
e1000_setup_link
(
hw
)
:
e1000_force_mac_fc
(
hw
));
return
0
;
return
0
;
}
}
...
@@ -592,6 +593,9 @@ e1000_set_ringparam(struct net_device *netdev,
...
@@ -592,6 +593,9 @@ e1000_set_ringparam(struct net_device *netdev,
tx_old
=
adapter
->
tx_ring
;
tx_old
=
adapter
->
tx_ring
;
rx_old
=
adapter
->
rx_ring
;
rx_old
=
adapter
->
rx_ring
;
if
((
ring
->
rx_mini_pending
)
||
(
ring
->
rx_jumbo_pending
))
return
-
EINVAL
;
if
(
netif_running
(
adapter
->
netdev
))
if
(
netif_running
(
adapter
->
netdev
))
e1000_down
(
adapter
);
e1000_down
(
adapter
);
...
@@ -637,7 +641,6 @@ e1000_set_ringparam(struct net_device *netdev,
...
@@ -637,7 +641,6 @@ e1000_set_ringparam(struct net_device *netdev,
return
err
;
return
err
;
}
}
#define REG_PATTERN_TEST(R, M, W) \
#define REG_PATTERN_TEST(R, M, W) \
{ \
{ \
uint32_t pat, value; \
uint32_t pat, value; \
...
@@ -1017,8 +1020,8 @@ e1000_setup_desc_rings(struct e1000_adapter *adapter)
...
@@ -1017,8 +1020,8 @@ e1000_setup_desc_rings(struct e1000_adapter *adapter)
struct
e1000_rx_desc
*
rx_desc
=
E1000_RX_DESC
(
*
rxdr
,
i
);
struct
e1000_rx_desc
*
rx_desc
=
E1000_RX_DESC
(
*
rxdr
,
i
);
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
if
(
!
(
skb
=
alloc_skb
(
E1000_RXBUFFER_2048
+
NET_IP_ALIGN
,
if
(
!
(
skb
=
alloc_skb
(
E1000_RXBUFFER_2048
+
NET_IP_ALIGN
,
GFP_KERNEL
)))
{
GFP_KERNEL
)))
{
ret_val
=
6
;
ret_val
=
6
;
goto
err_nomem
;
goto
err_nomem
;
}
}
...
@@ -1442,6 +1445,8 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
...
@@ -1442,6 +1445,8 @@ e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
case
E1000_DEV_ID_82543GC_COPPER
:
case
E1000_DEV_ID_82543GC_COPPER
:
case
E1000_DEV_ID_82544EI_FIBER
:
case
E1000_DEV_ID_82544EI_FIBER
:
case
E1000_DEV_ID_82546EB_QUAD_COPPER
:
case
E1000_DEV_ID_82546EB_QUAD_COPPER
:
case
E1000_DEV_ID_82545EM_FIBER
:
case
E1000_DEV_ID_82545EM_COPPER
:
wol
->
supported
=
0
;
wol
->
supported
=
0
;
wol
->
wolopts
=
0
;
wol
->
wolopts
=
0
;
return
;
return
;
...
...
drivers/net/e1000/e1000_hw.c
View file @
cd9f63e2
...
@@ -65,6 +65,7 @@ static void e1000_release_eeprom(struct e1000_hw *hw);
...
@@ -65,6 +65,7 @@ static void e1000_release_eeprom(struct e1000_hw *hw);
static
void
e1000_standby_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
);
static
int32_t
e1000_id_led_init
(
struct
e1000_hw
*
hw
);
static
int32_t
e1000_set_vco_speed
(
struct
e1000_hw
*
hw
);
static
int32_t
e1000_set_vco_speed
(
struct
e1000_hw
*
hw
);
static
int32_t
e1000_polarity_reversal_workaround
(
struct
e1000_hw
*
hw
);
static
int32_t
e1000_set_phy_mode
(
struct
e1000_hw
*
hw
);
static
int32_t
e1000_set_phy_mode
(
struct
e1000_hw
*
hw
);
/* IGP cable length table */
/* IGP cable length table */
...
@@ -1594,6 +1595,15 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw)
...
@@ -1594,6 +1595,15 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw)
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_SPEC_CTRL
,
phy_data
);
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_SPEC_CTRL
,
phy_data
);
if
(
ret_val
)
if
(
ret_val
)
return
ret_val
;
return
ret_val
;
if
((
hw
->
mac_type
==
e1000_82544
||
hw
->
mac_type
==
e1000_82543
)
&&
(
!
hw
->
autoneg
)
&&
(
hw
->
forced_speed_duplex
==
e1000_10_full
||
hw
->
forced_speed_duplex
==
e1000_10_half
))
{
ret_val
=
e1000_polarity_reversal_workaround
(
hw
);
if
(
ret_val
)
return
ret_val
;
}
}
}
return
E1000_SUCCESS
;
return
E1000_SUCCESS
;
}
}
...
@@ -1983,6 +1993,7 @@ e1000_check_for_link(struct e1000_hw *hw)
...
@@ -1983,6 +1993,7 @@ e1000_check_for_link(struct e1000_hw *hw)
uint32_t
ctrl
;
uint32_t
ctrl
;
uint32_t
status
;
uint32_t
status
;
uint32_t
rctl
;
uint32_t
rctl
;
uint32_t
icr
;
uint32_t
signal
=
0
;
uint32_t
signal
=
0
;
int32_t
ret_val
;
int32_t
ret_val
;
uint16_t
phy_data
;
uint16_t
phy_data
;
...
@@ -2032,6 +2043,25 @@ e1000_check_for_link(struct e1000_hw *hw)
...
@@ -2032,6 +2043,25 @@ e1000_check_for_link(struct e1000_hw *hw)
* link-up */
* link-up */
e1000_check_downshift
(
hw
);
e1000_check_downshift
(
hw
);
/* If we are on 82544 or 82543 silicon and speed/duplex
* are forced to 10H or 10F, then we will implement the polarity
* reversal workaround. We disable interrupts first, and upon
* returning, place the devices interrupt state to its previous
* value except for the link status change interrupt which will
* happen due to the execution of this workaround.
*/
if
((
hw
->
mac_type
==
e1000_82544
||
hw
->
mac_type
==
e1000_82543
)
&&
(
!
hw
->
autoneg
)
&&
(
hw
->
forced_speed_duplex
==
e1000_10_full
||
hw
->
forced_speed_duplex
==
e1000_10_half
))
{
E1000_WRITE_REG
(
hw
,
IMC
,
0xffffffff
);
ret_val
=
e1000_polarity_reversal_workaround
(
hw
);
icr
=
E1000_READ_REG
(
hw
,
ICR
);
E1000_WRITE_REG
(
hw
,
ICS
,
(
icr
&
~
E1000_ICS_LSC
));
E1000_WRITE_REG
(
hw
,
IMS
,
IMS_ENABLE_MASK
);
}
}
else
{
}
else
{
/* No link detected */
/* No link detected */
e1000_config_dsp_after_link_change
(
hw
,
FALSE
);
e1000_config_dsp_after_link_change
(
hw
,
FALSE
);
...
@@ -5191,28 +5221,88 @@ e1000_set_vco_speed(struct e1000_hw *hw)
...
@@ -5191,28 +5221,88 @@ e1000_set_vco_speed(struct e1000_hw *hw)
return
E1000_SUCCESS
;
return
E1000_SUCCESS
;
}
}
/******************************************************************************
static
int32_t
* Verifies the hardware needs to allow ARPs to be processed by the host
e1000_polarity_reversal_workaround
(
struct
e1000_hw
*
hw
)
*
* hw - Struct containing variables accessed by shared code
*
* returns: - TRUE/FALSE
*
*****************************************************************************/
uint32_t
e1000_enable_mng_pass_thru
(
struct
e1000_hw
*
hw
)
{
{
uint32_t
manc
;
int32_t
ret_val
;
uint16_t
mii_status_reg
;
uint16_t
i
;
if
(
hw
->
asf_firmware_present
)
{
/* Polarity reversal workaround for forced 10F/10H links. */
manc
=
E1000_READ_REG
(
hw
,
MANC
);
/* Disable the transmitter on the PHY */
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_PAGE_SELECT
,
0x0019
);
if
(
ret_val
)
return
ret_val
;
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_GEN_CONTROL
,
0xFFFF
);
if
(
ret_val
)
return
ret_val
;
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_PAGE_SELECT
,
0x0000
);
if
(
ret_val
)
return
ret_val
;
/* This loop will early-out if the NO link condition has been met. */
for
(
i
=
PHY_FORCE_TIME
;
i
>
0
;
i
--
)
{
/* Read the MII Status Register and wait for Link Status bit
* to be clear.
*/
ret_val
=
e1000_read_phy_reg
(
hw
,
PHY_STATUS
,
&
mii_status_reg
);
if
(
ret_val
)
return
ret_val
;
ret_val
=
e1000_read_phy_reg
(
hw
,
PHY_STATUS
,
&
mii_status_reg
);
if
(
ret_val
)
return
ret_val
;
if
((
mii_status_reg
&
~
MII_SR_LINK_STATUS
)
==
0
)
break
;
msec_delay_irq
(
100
);
}
/* Recommended delay time after link has been lost */
msec_delay_irq
(
1000
);
/* Now we will re-enable th transmitter on the PHY */
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_PAGE_SELECT
,
0x0019
);
if
(
ret_val
)
return
ret_val
;
msec_delay_irq
(
50
);
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_GEN_CONTROL
,
0xFFF0
);
if
(
ret_val
)
return
ret_val
;
msec_delay_irq
(
50
);
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_GEN_CONTROL
,
0xFF00
);
if
(
ret_val
)
return
ret_val
;
msec_delay_irq
(
50
);
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_GEN_CONTROL
,
0x0000
);
if
(
ret_val
)
return
ret_val
;
if
(
!
(
manc
&
E1000_MANC_RCV_TCO_EN
)
||
ret_val
=
e1000_write_phy_reg
(
hw
,
M88E1000_PHY_PAGE_SELECT
,
0x0000
);
!
(
manc
&
E1000_MANC_EN_MAC_ADDR_FILTER
))
if
(
ret_val
)
return
FALSE
;
return
ret_val
;
if
((
manc
&
E1000_MANC_SMBUS_EN
)
&&
!
(
manc
&
E1000_MANC_ASF_EN
))
return
TRUE
;
/* This loop will early-out if the link condition has been met. */
for
(
i
=
PHY_FORCE_TIME
;
i
>
0
;
i
--
)
{
/* Read the MII Status Register and wait for Link Status bit
* to be set.
*/
ret_val
=
e1000_read_phy_reg
(
hw
,
PHY_STATUS
,
&
mii_status_reg
);
if
(
ret_val
)
return
ret_val
;
ret_val
=
e1000_read_phy_reg
(
hw
,
PHY_STATUS
,
&
mii_status_reg
);
if
(
ret_val
)
return
ret_val
;
if
(
mii_status_reg
&
MII_SR_LINK_STATUS
)
break
;
msec_delay_irq
(
100
);
}
}
return
FALSE
;
return
E1000_SUCCESS
;
}
}
drivers/net/e1000/e1000_main.c
View file @
cd9f63e2
...
@@ -48,7 +48,7 @@ char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
...
@@ -48,7 +48,7 @@ char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
#else
#else
#define DRIVERNAPI "-NAPI"
#define DRIVERNAPI "-NAPI"
#endif
#endif
char
e1000_driver_version
[]
=
"5.
3.19
-k2"
DRIVERNAPI
;
char
e1000_driver_version
[]
=
"5.
5.4
-k2"
DRIVERNAPI
;
char
e1000_copyright
[]
=
"Copyright (c) 1999-2004 Intel Corporation."
;
char
e1000_copyright
[]
=
"Copyright (c) 1999-2004 Intel Corporation."
;
/* e1000_pci_tbl - PCI Device ID Table
/* e1000_pci_tbl - PCI Device ID Table
...
@@ -311,7 +311,8 @@ e1000_down(struct e1000_adapter *adapter)
...
@@ -311,7 +311,8 @@ e1000_down(struct e1000_adapter *adapter)
void
void
e1000_reset
(
struct
e1000_adapter
*
adapter
)
e1000_reset
(
struct
e1000_adapter
*
adapter
)
{
{
uint32_t
pba
,
manc
;
uint32_t
pba
;
/* Repartition Pba for greater than 9k mtu
/* Repartition Pba for greater than 9k mtu
* To take effect CTRL.RST is required.
* To take effect CTRL.RST is required.
*/
*/
...
@@ -354,12 +355,6 @@ e1000_reset(struct e1000_adapter *adapter)
...
@@ -354,12 +355,6 @@ e1000_reset(struct e1000_adapter *adapter)
e1000_reset_adaptive
(
&
adapter
->
hw
);
e1000_reset_adaptive
(
&
adapter
->
hw
);
e1000_phy_get_info
(
&
adapter
->
hw
,
&
adapter
->
phy_info
);
e1000_phy_get_info
(
&
adapter
->
hw
,
&
adapter
->
phy_info
);
if
(
adapter
->
en_mng_pt
)
{
manc
=
E1000_READ_REG
(
&
adapter
->
hw
,
MANC
);
manc
|=
(
E1000_MANC_ARP_EN
|
E1000_MANC_EN_MNG2HOST
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
MANC
,
manc
);
}
}
}
/**
/**
...
@@ -422,11 +417,6 @@ e1000_probe(struct pci_dev *pdev,
...
@@ -422,11 +417,6 @@ e1000_probe(struct pci_dev *pdev,
adapter
->
hw
.
back
=
adapter
;
adapter
->
hw
.
back
=
adapter
;
adapter
->
msg_enable
=
(
1
<<
debug
)
-
1
;
adapter
->
msg_enable
=
(
1
<<
debug
)
-
1
;
rtnl_lock
();
/* we need to set the name early for the DPRINTK macro */
if
(
dev_alloc_name
(
netdev
,
netdev
->
name
)
<
0
)
goto
err_free_unlock
;
mmio_start
=
pci_resource_start
(
pdev
,
BAR_0
);
mmio_start
=
pci_resource_start
(
pdev
,
BAR_0
);
mmio_len
=
pci_resource_len
(
pdev
,
BAR_0
);
mmio_len
=
pci_resource_len
(
pdev
,
BAR_0
);
...
@@ -466,6 +456,7 @@ e1000_probe(struct pci_dev *pdev,
...
@@ -466,6 +456,7 @@ e1000_probe(struct pci_dev *pdev,
#ifdef CONFIG_NET_POLL_CONTROLLER
#ifdef CONFIG_NET_POLL_CONTROLLER
netdev
->
poll_controller
=
e1000_netpoll
;
netdev
->
poll_controller
=
e1000_netpoll
;
#endif
#endif
strcpy
(
netdev
->
name
,
pci_name
(
pdev
));
netdev
->
mem_start
=
mmio_start
;
netdev
->
mem_start
=
mmio_start
;
netdev
->
mem_end
=
mmio_start
+
mmio_len
;
netdev
->
mem_end
=
mmio_start
+
mmio_len
;
...
@@ -502,8 +493,6 @@ e1000_probe(struct pci_dev *pdev,
...
@@ -502,8 +493,6 @@ e1000_probe(struct pci_dev *pdev,
/* hard_start_xmit is safe against parallel locking */
/* hard_start_xmit is safe against parallel locking */
netdev
->
features
|=
NETIF_F_LLTX
;
netdev
->
features
|=
NETIF_F_LLTX
;
adapter
->
en_mng_pt
=
e1000_enable_mng_pass_thru
(
&
adapter
->
hw
);
/* before reading the EEPROM, reset the controller to
/* before reading the EEPROM, reset the controller to
* put the device in a known good starting state */
* put the device in a known good starting state */
...
@@ -553,7 +542,6 @@ e1000_probe(struct pci_dev *pdev,
...
@@ -553,7 +542,6 @@ e1000_probe(struct pci_dev *pdev,
netif_carrier_off
(
netdev
);
netif_carrier_off
(
netdev
);
netif_stop_queue
(
netdev
);
netif_stop_queue
(
netdev
);
DPRINTK
(
PROBE
,
INFO
,
"Intel(R) PRO/1000 Network Connection
\n
"
);
e1000_check_options
(
adapter
);
e1000_check_options
(
adapter
);
/* Initial Wake on LAN setting
/* Initial Wake on LAN setting
...
@@ -586,12 +574,13 @@ e1000_probe(struct pci_dev *pdev,
...
@@ -586,12 +574,13 @@ e1000_probe(struct pci_dev *pdev,
/* reset the hardware with the new settings */
/* reset the hardware with the new settings */
e1000_reset
(
adapter
);
e1000_reset
(
adapter
);
/* We're already holding the rtnl lock; call the no-lock version */
strcpy
(
netdev
->
name
,
"eth%d"
);
if
((
err
=
register_netdev
ice
(
netdev
)))
if
((
err
=
register_netdev
(
netdev
)))
goto
err_register
;
goto
err_register
;
DPRINTK
(
PROBE
,
INFO
,
"Intel(R) PRO/1000 Network Connection
\n
"
);
cards_found
++
;
cards_found
++
;
rtnl_unlock
();
return
0
;
return
0
;
err_register:
err_register:
...
@@ -599,8 +588,6 @@ e1000_probe(struct pci_dev *pdev,
...
@@ -599,8 +588,6 @@ e1000_probe(struct pci_dev *pdev,
err_eeprom:
err_eeprom:
iounmap
(
adapter
->
hw
.
hw_addr
);
iounmap
(
adapter
->
hw
.
hw_addr
);
err_ioremap:
err_ioremap:
err_free_unlock:
rtnl_unlock
();
free_netdev
(
netdev
);
free_netdev
(
netdev
);
err_alloc_etherdev:
err_alloc_etherdev:
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
...
@@ -641,6 +628,8 @@ e1000_remove(struct pci_dev *pdev)
...
@@ -641,6 +628,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
);
}
}
/**
/**
...
@@ -2335,8 +2324,8 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter)
...
@@ -2335,8 +2324,8 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter)
if
(
unlikely
(
adapter
->
vlgrp
&&
if
(
unlikely
(
adapter
->
vlgrp
&&
(
rx_desc
->
status
&
E1000_RXD_STAT_VP
)))
{
(
rx_desc
->
status
&
E1000_RXD_STAT_VP
)))
{
vlan_hwaccel_receive_skb
(
skb
,
adapter
->
vlgrp
,
vlan_hwaccel_receive_skb
(
skb
,
adapter
->
vlgrp
,
le16_to_cpu
(
rx_desc
->
special
&
le16_to_cpu
(
rx_desc
->
special
)
&
E1000_RXD_SPC_VLAN_MASK
)
);
E1000_RXD_SPC_VLAN_MASK
);
}
else
{
}
else
{
netif_receive_skb
(
skb
);
netif_receive_skb
(
skb
);
}
}
...
@@ -2344,8 +2333,8 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter)
...
@@ -2344,8 +2333,8 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter)
if
(
unlikely
(
adapter
->
vlgrp
&&
if
(
unlikely
(
adapter
->
vlgrp
&&
(
rx_desc
->
status
&
E1000_RXD_STAT_VP
)))
{
(
rx_desc
->
status
&
E1000_RXD_STAT_VP
)))
{
vlan_hwaccel_rx
(
skb
,
adapter
->
vlgrp
,
vlan_hwaccel_rx
(
skb
,
adapter
->
vlgrp
,
le16_to_cpu
(
rx_desc
->
special
&
le16_to_cpu
(
rx_desc
->
special
)
&
E1000_RXD_SPC_VLAN_MASK
)
)
;
E1000_RXD_SPC_VLAN_MASK
);
}
else
{
}
else
{
netif_rx
(
skb
);
netif_rx
(
skb
);
}
}
...
@@ -2894,9 +2883,9 @@ e1000_resume(struct pci_dev *pdev)
...
@@ -2894,9 +2883,9 @@ e1000_resume(struct pci_dev *pdev)
{
{
struct
net_device
*
netdev
=
pci_get_drvdata
(
pdev
);
struct
net_device
*
netdev
=
pci_get_drvdata
(
pdev
);
struct
e1000_adapter
*
adapter
=
netdev
->
priv
;
struct
e1000_adapter
*
adapter
=
netdev
->
priv
;
uint32_t
manc
;
uint32_t
manc
,
ret
;
pci_enable_device
(
pdev
);
ret
=
pci_enable_device
(
pdev
);
pci_set_power_state
(
pdev
,
0
);
pci_set_power_state
(
pdev
,
0
);
pci_restore_state
(
pdev
);
pci_restore_state
(
pdev
);
...
...
drivers/net/e1000/e1000_osdep.h
View file @
cd9f63e2
...
@@ -49,6 +49,12 @@
...
@@ -49,6 +49,12 @@
set_current_state(TASK_UNINTERRUPTIBLE); \
set_current_state(TASK_UNINTERRUPTIBLE); \
schedule_timeout((x * HZ)/1000 + 2); \
schedule_timeout((x * HZ)/1000 + 2); \
} } while(0)
} } while(0)
/* Some workarounds require millisecond delays and are run during interrupt
* context. Most notably, when establishing link, the phy may need tweaking
* but cannot process phy register reads/writes faster than millisecond
* intervals...and we establish link due to a "link status change" interrupt.
*/
#define msec_delay_irq(x) mdelay(x)
#endif
#endif
#define PCI_COMMAND_REGISTER PCI_COMMAND
#define PCI_COMMAND_REGISTER PCI_COMMAND
...
...
drivers/net/e1000/e1000_param.c
View file @
cd9f63e2
...
@@ -34,31 +34,21 @@
...
@@ -34,31 +34,21 @@
#define E1000_MAX_NIC 32
#define E1000_MAX_NIC 32
#define OPTION_UNSET
-1
#define OPTION_UNSET -1
#define OPTION_DISABLED 0
#define OPTION_DISABLED 0
#define OPTION_ENABLED 1
#define OPTION_ENABLED 1
/* Module Parameters are always initialized to -1, so that the driver
* can tell the difference between no user specified value or the
* user asking for the default value.
* The true default values are loaded in when e1000_check_options is called.
*
* This is a GCC extension to ANSI C.
* See the item "Labeled Elements in Initializers" in the section
* "Extensions to the C Language Family" of the GCC documentation.
*/
#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
/* All parameters are treated the same, as an integer array of values.
/* All parameters are treated the same, as an integer array of values.
* This macro just reduces the need to repeat the same declaration code
* This macro just reduces the need to repeat the same declaration code
* over and over (plus this helps to avoid typo bugs).
* over and over (plus this helps to avoid typo bugs).
*/
*/
#define E1000_PARAM(X, S) \
#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
static const int __devinitdata X[E1000_MAX_NIC + 1] = E1000_PARAM_INIT; \
#define E1000_PARAM(X, desc) \
MODULE_PARM(X, "1-" __MODULE_STRING(E1000_MAX_NIC) "i"); \
static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \
MODULE_PARM_DESC(X, S);
static int num_##X = 0; \
module_param_array(X, int, &num_##X, 0); \
MODULE_PARM_DESC(X, desc);
/* Transmit Descriptor Count
/* Transmit Descriptor Count
*
*
...
@@ -305,7 +295,6 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -305,7 +295,6 @@ e1000_check_options(struct e1000_adapter *adapter)
DPRINTK
(
PROBE
,
NOTICE
,
DPRINTK
(
PROBE
,
NOTICE
,
"Warning: no configuration for board #%i
\n
"
,
bd
);
"Warning: no configuration for board #%i
\n
"
,
bd
);
DPRINTK
(
PROBE
,
NOTICE
,
"Using defaults for all values
\n
"
);
DPRINTK
(
PROBE
,
NOTICE
,
"Using defaults for all values
\n
"
);
bd
=
E1000_MAX_NIC
;
}
}
{
/* Transmit Descriptor Count */
{
/* Transmit Descriptor Count */
...
@@ -322,9 +311,14 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -322,9 +311,14 @@ e1000_check_options(struct e1000_adapter *adapter)
opt
.
arg
.
r
.
max
=
mac_type
<
e1000_82544
?
opt
.
arg
.
r
.
max
=
mac_type
<
e1000_82544
?
E1000_MAX_TXD
:
E1000_MAX_82544_TXD
;
E1000_MAX_TXD
:
E1000_MAX_82544_TXD
;
tx_ring
->
count
=
TxDescriptors
[
bd
];
if
(
num_TxDescriptors
>
bd
)
{
e1000_validate_option
(
&
tx_ring
->
count
,
&
opt
,
adapter
);
tx_ring
->
count
=
TxDescriptors
[
bd
];
E1000_ROUNDUP
(
tx_ring
->
count
,
REQ_TX_DESCRIPTOR_MULTIPLE
);
e1000_validate_option
(
&
tx_ring
->
count
,
&
opt
,
adapter
);
E1000_ROUNDUP
(
tx_ring
->
count
,
REQ_TX_DESCRIPTOR_MULTIPLE
);
}
else
{
tx_ring
->
count
=
opt
.
def
;
}
}
}
{
/* Receive Descriptor Count */
{
/* Receive Descriptor Count */
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
...
@@ -340,9 +334,14 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -340,9 +334,14 @@ e1000_check_options(struct e1000_adapter *adapter)
opt
.
arg
.
r
.
max
=
mac_type
<
e1000_82544
?
E1000_MAX_RXD
:
opt
.
arg
.
r
.
max
=
mac_type
<
e1000_82544
?
E1000_MAX_RXD
:
E1000_MAX_82544_RXD
;
E1000_MAX_82544_RXD
;
rx_ring
->
count
=
RxDescriptors
[
bd
];
if
(
num_RxDescriptors
>
bd
)
{
e1000_validate_option
(
&
rx_ring
->
count
,
&
opt
,
adapter
);
rx_ring
->
count
=
RxDescriptors
[
bd
];
E1000_ROUNDUP
(
rx_ring
->
count
,
REQ_RX_DESCRIPTOR_MULTIPLE
);
e1000_validate_option
(
&
rx_ring
->
count
,
&
opt
,
adapter
);
E1000_ROUNDUP
(
rx_ring
->
count
,
REQ_RX_DESCRIPTOR_MULTIPLE
);
}
else
{
rx_ring
->
count
=
opt
.
def
;
}
}
}
{
/* Checksum Offload Enable/Disable */
{
/* Checksum Offload Enable/Disable */
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
...
@@ -352,9 +351,13 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -352,9 +351,13 @@ e1000_check_options(struct e1000_adapter *adapter)
.
def
=
OPTION_ENABLED
.
def
=
OPTION_ENABLED
};
};
int
rx_csum
=
XsumRX
[
bd
];
if
(
num_XsumRX
>
bd
)
{
e1000_validate_option
(
&
rx_csum
,
&
opt
,
adapter
);
int
rx_csum
=
XsumRX
[
bd
];
adapter
->
rx_csum
=
rx_csum
;
e1000_validate_option
(
&
rx_csum
,
&
opt
,
adapter
);
adapter
->
rx_csum
=
rx_csum
;
}
else
{
adapter
->
rx_csum
=
opt
.
def
;
}
}
}
{
/* Flow Control */
{
/* Flow Control */
...
@@ -374,9 +377,13 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -374,9 +377,13 @@ e1000_check_options(struct e1000_adapter *adapter)
.
p
=
fc_list
}}
.
p
=
fc_list
}}
};
};
int
fc
=
FlowControl
[
bd
];
if
(
num_FlowControl
>
bd
)
{
e1000_validate_option
(
&
fc
,
&
opt
,
adapter
);
int
fc
=
FlowControl
[
bd
];
adapter
->
hw
.
fc
=
adapter
->
hw
.
original_fc
=
fc
;
e1000_validate_option
(
&
fc
,
&
opt
,
adapter
);
adapter
->
hw
.
fc
=
adapter
->
hw
.
original_fc
=
fc
;
}
else
{
adapter
->
hw
.
fc
=
opt
.
def
;
}
}
}
{
/* Transmit Interrupt Delay */
{
/* Transmit Interrupt Delay */
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
...
@@ -388,8 +395,13 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -388,8 +395,13 @@ e1000_check_options(struct e1000_adapter *adapter)
.
max
=
MAX_TXDELAY
}}
.
max
=
MAX_TXDELAY
}}
};
};
adapter
->
tx_int_delay
=
TxIntDelay
[
bd
];
if
(
num_TxIntDelay
>
bd
)
{
e1000_validate_option
(
&
adapter
->
tx_int_delay
,
&
opt
,
adapter
);
adapter
->
tx_int_delay
=
TxIntDelay
[
bd
];
e1000_validate_option
(
&
adapter
->
tx_int_delay
,
&
opt
,
adapter
);
}
else
{
adapter
->
tx_int_delay
=
opt
.
def
;
}
}
}
{
/* Transmit Absolute Interrupt Delay */
{
/* Transmit Absolute Interrupt Delay */
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
...
@@ -401,8 +413,13 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -401,8 +413,13 @@ e1000_check_options(struct e1000_adapter *adapter)
.
max
=
MAX_TXABSDELAY
}}
.
max
=
MAX_TXABSDELAY
}}
};
};
adapter
->
tx_abs_int_delay
=
TxAbsIntDelay
[
bd
];
if
(
num_TxAbsIntDelay
>
bd
)
{
e1000_validate_option
(
&
adapter
->
tx_abs_int_delay
,
&
opt
,
adapter
);
adapter
->
tx_abs_int_delay
=
TxAbsIntDelay
[
bd
];
e1000_validate_option
(
&
adapter
->
tx_abs_int_delay
,
&
opt
,
adapter
);
}
else
{
adapter
->
tx_abs_int_delay
=
opt
.
def
;
}
}
}
{
/* Receive Interrupt Delay */
{
/* Receive Interrupt Delay */
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
...
@@ -414,8 +431,13 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -414,8 +431,13 @@ e1000_check_options(struct e1000_adapter *adapter)
.
max
=
MAX_RXDELAY
}}
.
max
=
MAX_RXDELAY
}}
};
};
adapter
->
rx_int_delay
=
RxIntDelay
[
bd
];
if
(
num_RxIntDelay
>
bd
)
{
e1000_validate_option
(
&
adapter
->
rx_int_delay
,
&
opt
,
adapter
);
adapter
->
rx_int_delay
=
RxIntDelay
[
bd
];
e1000_validate_option
(
&
adapter
->
rx_int_delay
,
&
opt
,
adapter
);
}
else
{
adapter
->
rx_int_delay
=
opt
.
def
;
}
}
}
{
/* Receive Absolute Interrupt Delay */
{
/* Receive Absolute Interrupt Delay */
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
...
@@ -427,8 +449,13 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -427,8 +449,13 @@ e1000_check_options(struct e1000_adapter *adapter)
.
max
=
MAX_RXABSDELAY
}}
.
max
=
MAX_RXABSDELAY
}}
};
};
adapter
->
rx_abs_int_delay
=
RxAbsIntDelay
[
bd
];
if
(
num_RxAbsIntDelay
>
bd
)
{
e1000_validate_option
(
&
adapter
->
rx_abs_int_delay
,
&
opt
,
adapter
);
adapter
->
rx_abs_int_delay
=
RxAbsIntDelay
[
bd
];
e1000_validate_option
(
&
adapter
->
rx_abs_int_delay
,
&
opt
,
adapter
);
}
else
{
adapter
->
rx_abs_int_delay
=
opt
.
def
;
}
}
}
{
/* Interrupt Throttling Rate */
{
/* Interrupt Throttling Rate */
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
...
@@ -440,20 +467,27 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -440,20 +467,27 @@ e1000_check_options(struct e1000_adapter *adapter)
.
max
=
MAX_ITR
}}
.
max
=
MAX_ITR
}}
};
};
adapter
->
itr
=
InterruptThrottleRate
[
bd
];
if
(
num_InterruptThrottleRate
>
bd
)
{
switch
(
adapter
->
itr
)
{
adapter
->
itr
=
InterruptThrottleRate
[
bd
];
case
-
1
:
switch
(
adapter
->
itr
)
{
case
-
1
:
adapter
->
itr
=
1
;
break
;
case
0
:
DPRINTK
(
PROBE
,
INFO
,
"%s turned off
\n
"
,
opt
.
name
);
break
;
case
1
:
DPRINTK
(
PROBE
,
INFO
,
"%s set to dynamic mode
\n
"
,
opt
.
name
);
break
;
default:
e1000_validate_option
(
&
adapter
->
itr
,
&
opt
,
adapter
);
break
;
}
}
else
{
adapter
->
itr
=
1
;
adapter
->
itr
=
1
;
break
;
case
0
:
DPRINTK
(
PROBE
,
INFO
,
"%s turned off
\n
"
,
opt
.
name
);
break
;
case
1
:
DPRINTK
(
PROBE
,
INFO
,
"%s set to dynamic mode
\n
"
,
opt
.
name
);
break
;
default:
e1000_validate_option
(
&
adapter
->
itr
,
&
opt
,
adapter
);
break
;
}
}
}
}
...
@@ -481,17 +515,17 @@ static void __devinit
...
@@ -481,17 +515,17 @@ static void __devinit
e1000_check_fiber_options
(
struct
e1000_adapter
*
adapter
)
e1000_check_fiber_options
(
struct
e1000_adapter
*
adapter
)
{
{
int
bd
=
adapter
->
bd_number
;
int
bd
=
adapter
->
bd_number
;
bd
=
bd
>
E1000_MAX_NIC
?
E1000_MAX_NIC
:
bd
;
if
(
num_Speed
>
bd
)
{
if
((
Speed
[
bd
]
!=
OPTION_UNSET
))
{
DPRINTK
(
PROBE
,
INFO
,
"Speed not valid for fiber adapters, "
DPRINTK
(
PROBE
,
INFO
,
"Speed not valid for fiber adapters, "
"parameter ignored
\n
"
);
"parameter ignored
\n
"
);
}
}
if
((
Duplex
[
bd
]
!=
OPTION_UNSET
))
{
if
(
num_Duplex
>
bd
)
{
DPRINTK
(
PROBE
,
INFO
,
"Duplex not valid for fiber adapters, "
DPRINTK
(
PROBE
,
INFO
,
"Duplex not valid for fiber adapters, "
"parameter ignored
\n
"
);
"parameter ignored
\n
"
);
}
}
if
((
AutoNeg
[
bd
]
!=
OPTION_UNSET
)
&&
(
AutoNeg
[
bd
]
!=
0x20
))
{
if
((
num_AutoNeg
>
bd
)
&&
(
AutoNeg
[
bd
]
!=
0x20
))
{
DPRINTK
(
PROBE
,
INFO
,
"AutoNeg other than 1000/Full is "
DPRINTK
(
PROBE
,
INFO
,
"AutoNeg other than 1000/Full is "
"not valid for fiber adapters, "
"not valid for fiber adapters, "
"parameter ignored
\n
"
);
"parameter ignored
\n
"
);
...
@@ -510,7 +544,6 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -510,7 +544,6 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
{
{
int
speed
,
dplx
;
int
speed
,
dplx
;
int
bd
=
adapter
->
bd_number
;
int
bd
=
adapter
->
bd_number
;
bd
=
bd
>
E1000_MAX_NIC
?
E1000_MAX_NIC
:
bd
;
{
/* Speed */
{
/* Speed */
struct
e1000_opt_list
speed_list
[]
=
{{
0
,
""
},
struct
e1000_opt_list
speed_list
[]
=
{{
0
,
""
},
...
@@ -527,8 +560,12 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -527,8 +560,12 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
.
p
=
speed_list
}}
.
p
=
speed_list
}}
};
};
speed
=
Speed
[
bd
];
if
(
num_Speed
>
bd
)
{
e1000_validate_option
(
&
speed
,
&
opt
,
adapter
);
speed
=
Speed
[
bd
];
e1000_validate_option
(
&
speed
,
&
opt
,
adapter
);
}
else
{
speed
=
opt
.
def
;
}
}
}
{
/* Duplex */
{
/* Duplex */
struct
e1000_opt_list
dplx_list
[]
=
{{
0
,
""
},
struct
e1000_opt_list
dplx_list
[]
=
{{
0
,
""
},
...
@@ -544,11 +581,15 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -544,11 +581,15 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
.
p
=
dplx_list
}}
.
p
=
dplx_list
}}
};
};
dplx
=
Duplex
[
bd
];
if
(
num_Duplex
>
bd
)
{
e1000_validate_option
(
&
dplx
,
&
opt
,
adapter
);
dplx
=
Duplex
[
bd
];
e1000_validate_option
(
&
dplx
,
&
opt
,
adapter
);
}
else
{
dplx
=
opt
.
def
;
}
}
}
if
(
AutoNeg
[
bd
]
!=
OPTION_UNSET
&&
(
speed
!=
0
||
dplx
!=
0
))
{
if
(
(
num_AutoNeg
>
bd
)
&&
(
speed
!=
0
||
dplx
!=
0
))
{
DPRINTK
(
PROBE
,
INFO
,
DPRINTK
(
PROBE
,
INFO
,
"AutoNeg specified along with Speed or Duplex, "
"AutoNeg specified along with Speed or Duplex, "
"parameter ignored
\n
"
);
"parameter ignored
\n
"
);
...
@@ -605,7 +646,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -605,7 +646,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
switch
(
speed
+
dplx
)
{
switch
(
speed
+
dplx
)
{
case
0
:
case
0
:
adapter
->
hw
.
autoneg
=
adapter
->
fc_autoneg
=
1
;
adapter
->
hw
.
autoneg
=
adapter
->
fc_autoneg
=
1
;
if
(
Speed
[
bd
]
!=
OPTION_UNSET
||
Duplex
[
bd
]
!=
OPTION_UNSET
)
if
(
(
num_Speed
>
bd
)
&&
(
speed
!=
0
||
dplx
!=
0
)
)
DPRINTK
(
PROBE
,
INFO
,
DPRINTK
(
PROBE
,
INFO
,
"Speed and duplex autonegotiation enabled
\n
"
);
"Speed and duplex autonegotiation enabled
\n
"
);
break
;
break
;
...
...
drivers/net/eql.c
View file @
cd9f63e2
...
@@ -164,12 +164,12 @@ static char version[] __initdata =
...
@@ -164,12 +164,12 @@ static char version[] __initdata =
static
void
__init
eql_setup
(
struct
net_device
*
dev
)
static
void
__init
eql_setup
(
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
SET_MODULE_OWNER
(
dev
);
SET_MODULE_OWNER
(
dev
);
init_timer
(
&
eql
->
timer
);
init_timer
(
&
eql
->
timer
);
eql
->
timer
.
data
=
(
unsigned
long
)
dev
->
priv
;
eql
->
timer
.
data
=
(
unsigned
long
)
eql
;
eql
->
timer
.
expires
=
jiffies
+
EQL_DEFAULT_RESCHED_IVAL
;
eql
->
timer
.
expires
=
jiffies
+
EQL_DEFAULT_RESCHED_IVAL
;
eql
->
timer
.
function
=
eql_timer
;
eql
->
timer
.
function
=
eql_timer
;
...
@@ -197,7 +197,7 @@ static void __init eql_setup(struct net_device *dev)
...
@@ -197,7 +197,7 @@ static void __init eql_setup(struct net_device *dev)
static
int
eql_open
(
struct
net_device
*
dev
)
static
int
eql_open
(
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
/* XXX We should force this off automatically for the user. */
/* XXX We should force this off automatically for the user. */
printk
(
KERN_INFO
"%s: remember to turn off Van-Jacobson compression on "
printk
(
KERN_INFO
"%s: remember to turn off Van-Jacobson compression on "
...
@@ -241,7 +241,7 @@ static void eql_kill_slave_queue(slave_queue_t *queue)
...
@@ -241,7 +241,7 @@ static void eql_kill_slave_queue(slave_queue_t *queue)
static
int
eql_close
(
struct
net_device
*
dev
)
static
int
eql_close
(
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
/*
/*
* The timer has to be stopped first before we start hacking away
* The timer has to be stopped first before we start hacking away
...
@@ -326,7 +326,7 @@ static slave_t *__eql_schedule_slaves(slave_queue_t *queue)
...
@@ -326,7 +326,7 @@ static slave_t *__eql_schedule_slaves(slave_queue_t *queue)
static
int
eql_slave_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
eql_slave_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
slave_t
*
slave
;
slave_t
*
slave
;
spin_lock
(
&
eql
->
queue
.
lock
);
spin_lock
(
&
eql
->
queue
.
lock
);
...
@@ -352,7 +352,7 @@ static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -352,7 +352,7 @@ static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
eql_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
eql_get_stats
(
struct
net_device
*
dev
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
return
&
eql
->
stats
;
return
&
eql
->
stats
;
}
}
...
@@ -378,7 +378,7 @@ static slave_t *__eql_find_slave_dev(slave_queue_t *queue, struct net_device *de
...
@@ -378,7 +378,7 @@ static slave_t *__eql_find_slave_dev(slave_queue_t *queue, struct net_device *de
static
inline
int
eql_is_full
(
slave_queue_t
*
queue
)
static
inline
int
eql_is_full
(
slave_queue_t
*
queue
)
{
{
equalizer_t
*
eql
=
queue
->
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
queue
->
master_dev
)
;
if
(
queue
->
num_slaves
>=
eql
->
max_slaves
)
if
(
queue
->
num_slaves
>=
eql
->
max_slaves
)
return
1
;
return
1
;
...
@@ -420,7 +420,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
...
@@ -420,7 +420,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
if
(
!
eql_is_master
(
slave_dev
)
&&
if
(
!
eql_is_master
(
slave_dev
)
&&
!
eql_is_slave
(
slave_dev
))
{
!
eql_is_slave
(
slave_dev
))
{
slave_t
*
s
=
kmalloc
(
sizeof
(
*
s
),
GFP_KERNEL
);
slave_t
*
s
=
kmalloc
(
sizeof
(
*
s
),
GFP_KERNEL
);
equalizer_t
*
eql
=
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
master_dev
)
;
int
ret
;
int
ret
;
if
(
!
s
)
{
if
(
!
s
)
{
...
@@ -453,7 +453,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
...
@@ -453,7 +453,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
static
int
eql_emancipate
(
struct
net_device
*
master_dev
,
slaving_request_t
__user
*
srqp
)
static
int
eql_emancipate
(
struct
net_device
*
master_dev
,
slaving_request_t
__user
*
srqp
)
{
{
equalizer_t
*
eql
=
master_dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
master_dev
)
;
struct
net_device
*
slave_dev
;
struct
net_device
*
slave_dev
;
slaving_request_t
srq
;
slaving_request_t
srq
;
int
ret
;
int
ret
;
...
@@ -485,7 +485,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __use
...
@@ -485,7 +485,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __use
static
int
eql_g_slave_cfg
(
struct
net_device
*
dev
,
slave_config_t
__user
*
scp
)
static
int
eql_g_slave_cfg
(
struct
net_device
*
dev
,
slave_config_t
__user
*
scp
)
{
{
equalizer_t
*
eql
=
dev
->
priv
;
equalizer_t
*
eql
=
netdev_priv
(
dev
)
;
slave_t
*
slave
;
slave_t
*
slave
;
struct
net_device
*
slave_dev
;
struct
net_device
*
slave_dev
;
slave_config_t
sc
;
slave_config_t
sc
;
...
@@ -539,7 +539,7 @@ static int eql_s_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
...
@@ -539,7 +539,7 @@ static int eql_s_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
if
(
!
slave_dev
)
if
(
!
slave_dev
)
return
ret
;
return
ret
;
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
spin_lock_bh
(
&
eql
->
queue
.
lock
);
spin_lock_bh
(
&
eql
->
queue
.
lock
);
if
(
eql_is_slave
(
slave_dev
))
{
if
(
eql_is_slave
(
slave_dev
))
{
slave
=
__eql_find_slave_dev
(
&
eql
->
queue
,
slave_dev
);
slave
=
__eql_find_slave_dev
(
&
eql
->
queue
,
slave_dev
);
...
@@ -561,7 +561,7 @@ static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mcp)
...
@@ -561,7 +561,7 @@ static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mcp)
master_config_t
mc
;
master_config_t
mc
;
if
(
eql_is_master
(
dev
))
{
if
(
eql_is_master
(
dev
))
{
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
mc
.
max_slaves
=
eql
->
max_slaves
;
mc
.
max_slaves
=
eql
->
max_slaves
;
mc
.
min_slaves
=
eql
->
min_slaves
;
mc
.
min_slaves
=
eql
->
min_slaves
;
if
(
copy_to_user
(
mcp
,
&
mc
,
sizeof
(
master_config_t
)))
if
(
copy_to_user
(
mcp
,
&
mc
,
sizeof
(
master_config_t
)))
...
@@ -580,7 +580,7 @@ static int eql_s_master_cfg(struct net_device *dev, master_config_t __user *mcp)
...
@@ -580,7 +580,7 @@ static int eql_s_master_cfg(struct net_device *dev, master_config_t __user *mcp)
return
-
EFAULT
;
return
-
EFAULT
;
if
(
eql_is_master
(
dev
))
{
if
(
eql_is_master
(
dev
))
{
eql
=
dev
->
priv
;
eql
=
netdev_priv
(
dev
)
;
eql
->
max_slaves
=
mc
.
max_slaves
;
eql
->
max_slaves
=
mc
.
max_slaves
;
eql
->
min_slaves
=
mc
.
min_slaves
;
eql
->
min_slaves
=
mc
.
min_slaves
;
return
0
;
return
0
;
...
...
drivers/net/hamradio/hdlcdrv.c
View file @
cd9f63e2
...
@@ -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
)
...
...
drivers/net/ixgb/ixgb_main.c
View file @
cd9f63e2
...
@@ -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
);
...
...
drivers/net/mac8390.c
View file @
cd9f63e2
...
@@ -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 */
...
...
drivers/net/ne2k-pci.c
View file @
cd9f63e2
...
@@ -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
);
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
);
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 */
};
};
...
...
drivers/net/ns83820.c
View file @
cd9f63e2
...
@@ -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,7 +94,9 @@
...
@@ -92,7 +94,9 @@
//#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/moduleparam.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/netdevice.h>
...
@@ -108,6 +112,7 @@
...
@@ -108,6 +112,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>
...
@@ -115,7 +120,7 @@
...
@@ -115,7 +120,7 @@
#define DRV_NAME "ns83820"
#define DRV_NAME "ns83820"
/* Global parameters. See
MODULE_PARM
near the bottom. */
/* Global parameters. See
module_param
near the bottom. */
static
int
ihr
=
2
;
static
int
ihr
=
2
;
static
int
reset_phy
=
0
;
static
int
reset_phy
=
0
;
static
int
lnksts
=
0
;
/* CFG_LNKSTS bit polarity */
static
int
lnksts
=
0
;
/* CFG_LNKSTS bit polarity */
...
@@ -138,6 +143,9 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
...
@@ -138,6 +143,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 +270,8 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
...
@@ -262,6 +270,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 +413,7 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
...
@@ -403,6 +413,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 +443,10 @@ struct ns83820 {
...
@@ -432,6 +443,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 +509,33 @@ static inline void kick_rx(struct net_device *ndev)
...
@@ -494,6 +509,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 +878,7 @@ static void fastcall rx_irq(struct net_device *ndev)
...
@@ -836,6 +878,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 +919,24 @@ static void fastcall rx_irq(struct net_device *ndev)
...
@@ -876,8 +919,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 +950,18 @@ static void fastcall rx_irq(struct net_device *ndev)
...
@@ -891,7 +950,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 +1169,17 @@ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
...
@@ -1099,6 +1169,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 +1935,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
...
@@ -1854,7 +1935,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 +2060,25 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
...
@@ -1980,11 +2060,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 +2095,13 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
...
@@ -2001,6 +2095,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
);
...
@@ -2109,13 +2210,13 @@ MODULE_LICENSE("GPL");
...
@@ -2109,13 +2210,13 @@ MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE
(
pci
,
ns83820_pci_tbl
);
MODULE_DEVICE_TABLE
(
pci
,
ns83820_pci_tbl
);
MODULE_PARM
(
lnksts
,
"i"
);
module_param
(
lnksts
,
int
,
0
);
MODULE_PARM_DESC
(
lnksts
,
"Polarity of LNKSTS bit"
);
MODULE_PARM_DESC
(
lnksts
,
"Polarity of LNKSTS bit"
);
MODULE_PARM
(
ihr
,
"i"
);
module_param
(
ihr
,
int
,
0
);
MODULE_PARM_DESC
(
ihr
,
"Time in 100 us increments to delay interrupts (range 0-127)"
);
MODULE_PARM_DESC
(
ihr
,
"Time in 100 us increments to delay interrupts (range 0-127)"
);
MODULE_PARM
(
reset_phy
,
"i"
);
module_param
(
reset_phy
,
int
,
0
);
MODULE_PARM_DESC
(
reset_phy
,
"Set to 1 to reset the PHY on startup"
);
MODULE_PARM_DESC
(
reset_phy
,
"Set to 1 to reset the PHY on startup"
);
module_init
(
ns83820_init
);
module_init
(
ns83820_init
);
...
...
drivers/net/pcnet32.c
View file @
cd9f63e2
...
@@ -359,9 +359,9 @@ struct pcnet32_private {
...
@@ -359,9 +359,9 @@ 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
;
struct
mii_if_info
mii_if
;
struct
mii_if_info
mii_if
;
struct
timer_list
watchdog_timer
;
struct
timer_list
watchdog_timer
;
...
...
drivers/net/sis900.c
View file @
cd9f63e2
...
@@ -262,13 +262,12 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
...
@@ -262,13 +262,12 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
u8
reg
;
u8
reg
;
int
i
;
int
i
;
isa_bridge
=
pci_find_device
(
PCI_VENDOR_ID_SI
,
0x0008
,
isa_bridge
);
isa_bridge
=
pci_get_device
(
PCI_VENDOR_ID_SI
,
0x0008
,
isa_bridge
);
if
(
!
isa_bridge
)
isa_bridge
=
pci_get_device
(
PCI_VENDOR_ID_SI
,
0x0018
,
isa_bridge
);
if
(
!
isa_bridge
)
{
if
(
!
isa_bridge
)
{
isa_bridge
=
pci_find_device
(
PCI_VENDOR_ID_SI
,
0x0018
,
isa_bridge
);
printk
(
"%s: Can not find ISA bridge
\n
"
,
net_dev
->
name
);
if
(
!
isa_bridge
)
{
return
0
;
printk
(
"%s: Can not find ISA bridge
\n
"
,
net_dev
->
name
);
return
0
;
}
}
}
pci_read_config_byte
(
isa_bridge
,
0x48
,
&
reg
);
pci_read_config_byte
(
isa_bridge
,
0x48
,
&
reg
);
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
|
0x40
);
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
|
0x40
);
...
@@ -278,6 +277,7 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
...
@@ -278,6 +277,7 @@ static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,
((
u8
*
)(
net_dev
->
dev_addr
))[
i
]
=
inb
(
0x71
);
((
u8
*
)(
net_dev
->
dev_addr
))[
i
]
=
inb
(
0x71
);
}
}
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
&
~
0x40
);
pci_write_config_byte
(
isa_bridge
,
0x48
,
reg
&
~
0x40
);
pci_dev_put
(
isa_bridge
);
return
1
;
return
1
;
}
}
...
@@ -488,9 +488,11 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
...
@@ -488,9 +488,11 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
}
}
/* save our host bridge revision */
/* save our host bridge revision */
dev
=
pci_
find
_device
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_630
,
NULL
);
dev
=
pci_
get
_device
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_630
,
NULL
);
if
(
dev
)
if
(
dev
)
{
pci_read_config_byte
(
dev
,
PCI_CLASS_REVISION
,
&
sis_priv
->
host_bridge_rev
);
pci_read_config_byte
(
dev
,
PCI_CLASS_REVISION
,
&
sis_priv
->
host_bridge_rev
);
pci_dev_put
(
dev
);
}
/* print some information about our NIC */
/* print some information about our NIC */
printk
(
KERN_INFO
"%s: %s at %#lx, IRQ %d, "
,
net_dev
->
name
,
printk
(
KERN_INFO
"%s: %s at %#lx, IRQ %d, "
,
net_dev
->
name
,
...
...
drivers/net/skfp/hwmtm.c
View file @
cd9f63e2
...
@@ -1901,7 +1901,8 @@ void smt_send_mbuf(struct s_smc *smc, SMbuf *mb, int fc)
...
@@ -1901,7 +1901,8 @@ void smt_send_mbuf(struct s_smc *smc, SMbuf *mb, int fc)
}
}
if
(
!
smc
->
hw
.
mac_ring_is_up
||
frag_count
>
queue
->
tx_free
)
{
if
(
!
smc
->
hw
.
mac_ring_is_up
||
frag_count
>
queue
->
tx_free
)
{
if
(
frame_status
&=
~
LAN_TX
)
{
frame_status
&=
~
LAN_TX
;
if
(
frame_status
)
{
DB_TX
(
"Ring is down: terminate LAN_TX"
,
0
,
0
,
2
)
;
DB_TX
(
"Ring is down: terminate LAN_TX"
,
0
,
0
,
2
)
;
}
}
else
{
else
{
...
...
drivers/net/slip.c
View file @
cd9f63e2
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
#define SL_CHECK_TRANSMIT
#define SL_CHECK_TRANSMIT
#include <linux/config.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
...
@@ -85,8 +86,8 @@
...
@@ -85,8 +86,8 @@
static
struct
net_device
**
slip_devs
;
static
struct
net_device
**
slip_devs
;
int
slip_maxdev
=
SL_NRUNIT
;
/* Can be overridden with insmod! */
static
int
slip_maxdev
=
SL_NRUNIT
;
MODULE_PARM
(
slip_maxdev
,
"i"
);
module_param
(
slip_maxdev
,
int
,
0
);
MODULE_PARM_DESC
(
slip_maxdev
,
"Maximum number of slip devices"
);
MODULE_PARM_DESC
(
slip_maxdev
,
"Maximum number of slip devices"
);
static
int
slip_esc
(
unsigned
char
*
p
,
unsigned
char
*
d
,
int
len
);
static
int
slip_esc
(
unsigned
char
*
p
,
unsigned
char
*
d
,
int
len
);
...
@@ -458,13 +459,11 @@ static void slip_write_wakeup(struct tty_struct *tty)
...
@@ -458,13 +459,11 @@ static void slip_write_wakeup(struct tty_struct *tty)
static
void
sl_tx_timeout
(
struct
net_device
*
dev
)
static
void
sl_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
spin_lock
(
&
sl
->
lock
);
spin_lock
(
&
sl
->
lock
);
if
(
netif_queue_stopped
(
dev
))
{
if
(
netif_queue_stopped
(
dev
))
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
priv
);
if
(
!
netif_running
(
dev
))
if
(
!
netif_running
(
dev
))
goto
out
;
goto
out
;
...
@@ -494,7 +493,7 @@ static void sl_tx_timeout(struct net_device *dev)
...
@@ -494,7 +493,7 @@ static void sl_tx_timeout(struct net_device *dev)
static
int
static
int
sl_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
sl_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
spin_lock
(
&
sl
->
lock
);
spin_lock
(
&
sl
->
lock
);
if
(
!
netif_running
(
dev
))
{
if
(
!
netif_running
(
dev
))
{
...
@@ -528,7 +527,7 @@ sl_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -528,7 +527,7 @@ sl_xmit(struct sk_buff *skb, struct net_device *dev)
static
int
static
int
sl_close
(
struct
net_device
*
dev
)
sl_close
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
spin_lock_bh
(
&
sl
->
lock
);
spin_lock_bh
(
&
sl
->
lock
);
if
(
sl
->
tty
)
{
if
(
sl
->
tty
)
{
...
@@ -547,7 +546,7 @@ sl_close(struct net_device *dev)
...
@@ -547,7 +546,7 @@ sl_close(struct net_device *dev)
static
int
sl_open
(
struct
net_device
*
dev
)
static
int
sl_open
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
if
(
sl
->
tty
==
NULL
)
if
(
sl
->
tty
==
NULL
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -561,7 +560,7 @@ static int sl_open(struct net_device *dev)
...
@@ -561,7 +560,7 @@ static int sl_open(struct net_device *dev)
static
int
sl_change_mtu
(
struct
net_device
*
dev
,
int
new_mtu
)
static
int
sl_change_mtu
(
struct
net_device
*
dev
,
int
new_mtu
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
if
(
new_mtu
<
68
||
new_mtu
>
65534
)
if
(
new_mtu
<
68
||
new_mtu
>
65534
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -577,7 +576,7 @@ static struct net_device_stats *
...
@@ -577,7 +576,7 @@ static struct net_device_stats *
sl_get_stats
(
struct
net_device
*
dev
)
sl_get_stats
(
struct
net_device
*
dev
)
{
{
static
struct
net_device_stats
stats
;
static
struct
net_device_stats
stats
;
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
#ifdef SL_INCLUDE_CSLIP
#ifdef SL_INCLUDE_CSLIP
struct
slcompress
*
comp
;
struct
slcompress
*
comp
;
#endif
#endif
...
@@ -612,7 +611,7 @@ sl_get_stats(struct net_device *dev)
...
@@ -612,7 +611,7 @@ sl_get_stats(struct net_device *dev)
static
int
sl_init
(
struct
net_device
*
dev
)
static
int
sl_init
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
/*
/*
* Finish setting up the DEVICE info.
* Finish setting up the DEVICE info.
...
@@ -630,7 +629,7 @@ static int sl_init(struct net_device *dev)
...
@@ -630,7 +629,7 @@ static int sl_init(struct net_device *dev)
static
void
sl_uninit
(
struct
net_device
*
dev
)
static
void
sl_uninit
(
struct
net_device
*
dev
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
sl_free_bufs
(
sl
);
sl_free_bufs
(
sl
);
}
}
...
@@ -719,7 +718,7 @@ static void sl_sync(void)
...
@@ -719,7 +718,7 @@ static void sl_sync(void)
if
((
dev
=
slip_devs
[
i
])
==
NULL
)
if
((
dev
=
slip_devs
[
i
])
==
NULL
)
break
;
break
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
tty
||
sl
->
leased
)
if
(
sl
->
tty
||
sl
->
leased
)
continue
;
continue
;
if
(
dev
->
flags
&
IFF_UP
)
if
(
dev
->
flags
&
IFF_UP
)
...
@@ -746,7 +745,7 @@ sl_alloc(dev_t line)
...
@@ -746,7 +745,7 @@ sl_alloc(dev_t line)
if
(
dev
==
NULL
)
if
(
dev
==
NULL
)
break
;
break
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
leased
)
{
if
(
sl
->
leased
)
{
if
(
sl
->
line
!=
line
)
if
(
sl
->
line
!=
line
)
continue
;
continue
;
...
@@ -788,7 +787,7 @@ sl_alloc(dev_t line)
...
@@ -788,7 +787,7 @@ sl_alloc(dev_t line)
i
=
sel
;
i
=
sel
;
dev
=
slip_devs
[
i
];
dev
=
slip_devs
[
i
];
if
(
score
>
1
)
{
if
(
score
>
1
)
{
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
sl
->
flags
&=
(
1
<<
SLF_INUSE
);
sl
->
flags
&=
(
1
<<
SLF_INUSE
);
return
sl
;
return
sl
;
}
}
...
@@ -799,7 +798,7 @@ sl_alloc(dev_t line)
...
@@ -799,7 +798,7 @@ sl_alloc(dev_t line)
return
NULL
;
return
NULL
;
if
(
dev
)
{
if
(
dev
)
{
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
test_bit
(
SLF_INUSE
,
&
sl
->
flags
))
{
if
(
test_bit
(
SLF_INUSE
,
&
sl
->
flags
))
{
unregister_netdevice
(
dev
);
unregister_netdevice
(
dev
);
dev
=
NULL
;
dev
=
NULL
;
...
@@ -817,7 +816,7 @@ sl_alloc(dev_t line)
...
@@ -817,7 +816,7 @@ sl_alloc(dev_t line)
dev
->
base_addr
=
i
;
dev
->
base_addr
=
i
;
}
}
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
/* Initialize channel control data */
/* Initialize channel control data */
sl
->
magic
=
SLIP_MAGIC
;
sl
->
magic
=
SLIP_MAGIC
;
...
@@ -1260,7 +1259,7 @@ static int slip_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
...
@@ -1260,7 +1259,7 @@ static int slip_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
static
int
sl_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
static
int
sl_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
{
struct
slip
*
sl
=
(
struct
slip
*
)(
dev
->
pri
v
);
struct
slip
*
sl
=
netdev_priv
(
de
v
);
unsigned
long
*
p
=
(
unsigned
long
*
)
&
rq
->
ifr_ifru
;
unsigned
long
*
p
=
(
unsigned
long
*
)
&
rq
->
ifr_ifru
;
if
(
sl
==
NULL
)
/* Allocation failed ?? */
if
(
sl
==
NULL
)
/* Allocation failed ?? */
...
@@ -1406,7 +1405,7 @@ static void __exit slip_exit(void)
...
@@ -1406,7 +1405,7 @@ static void __exit slip_exit(void)
dev
=
slip_devs
[
i
];
dev
=
slip_devs
[
i
];
if
(
!
dev
)
if
(
!
dev
)
continue
;
continue
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
spin_lock_bh
(
&
sl
->
lock
);
spin_lock_bh
(
&
sl
->
lock
);
if
(
sl
->
tty
)
{
if
(
sl
->
tty
)
{
busy
++
;
busy
++
;
...
@@ -1423,7 +1422,7 @@ static void __exit slip_exit(void)
...
@@ -1423,7 +1422,7 @@ static void __exit slip_exit(void)
continue
;
continue
;
slip_devs
[
i
]
=
NULL
;
slip_devs
[
i
]
=
NULL
;
sl
=
dev
->
priv
;
sl
=
netdev_priv
(
dev
)
;
if
(
sl
->
tty
)
{
if
(
sl
->
tty
)
{
printk
(
KERN_ERR
"%s: tty discipline still running
\n
"
,
printk
(
KERN_ERR
"%s: tty discipline still running
\n
"
,
dev
->
name
);
dev
->
name
);
...
...
drivers/net/tokenring/olympic.c
View file @
cd9f63e2
...
@@ -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
)
;
...
...
drivers/net/tulip/de2104x.c
View file @
cd9f63e2
...
@@ -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
));
}
}
}
}
...
...
drivers/net/tulip/de4x5.c
View file @
cd9f63e2
...
@@ -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 */
...
...
drivers/net/tulip/tulip_core.c
View file @
cd9f63e2
...
@@ -1221,6 +1221,11 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
...
@@ -1221,6 +1221,11 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
struct
tulip_private
*
tp
;
struct
tulip_private
*
tp
;
/* See note below on the multiport cards. */
/* See note below on the multiport cards. */
static
unsigned
char
last_phys_addr
[
6
]
=
{
0x00
,
'L'
,
'i'
,
'n'
,
'u'
,
'x'
};
static
unsigned
char
last_phys_addr
[
6
]
=
{
0x00
,
'L'
,
'i'
,
'n'
,
'u'
,
'x'
};
static
struct
pci_device_id
early_486_chipsets
[]
=
{
{
PCI_DEVICE
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82424
)
},
{
PCI_DEVICE
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_496
)
},
{
},
};
static
int
last_irq
;
static
int
last_irq
;
static
int
multiport_cnt
;
/* For four-port boards w/one EEPROM */
static
int
multiport_cnt
;
/* For four-port boards w/one EEPROM */
u8
chip_rev
;
u8
chip_rev
;
...
@@ -1274,17 +1279,15 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
...
@@ -1274,17 +1279,15 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
* without the workarounds being on.
* without the workarounds being on.
*/
*/
/* Intel Saturn. Switch to 8 long words burst, 8 long word cache aligned
/* 1. Intel Saturn. Switch to 8 long words burst, 8 long word cache
Aries might need this too. The Saturn errata are not pretty reading but
aligned. Aries might need this too. The Saturn errata are not
thankfully it's an old 486 chipset.
pretty reading but thankfully it's an old 486 chipset.
2. The dreaded SiS496 486 chipset. Same workaround as Intel
Saturn.
*/
*/
if
(
pci_find_device
(
PCI_VENDOR_ID_INTEL
,
PCI_DEVICE_ID_INTEL_82424
,
NULL
))
{
if
(
pci_dev_present
(
early_486_chipsets
))
{
csr0
=
MRL
|
MRM
|
(
8
<<
BurstLenShift
)
|
(
1
<<
CALShift
);
force_csr0
=
1
;
}
/* The dreaded SiS496 486 chipset. Same workaround as above. */
if
(
pci_find_device
(
PCI_VENDOR_ID_SI
,
PCI_DEVICE_ID_SI_496
,
NULL
))
{
csr0
=
MRL
|
MRM
|
(
8
<<
BurstLenShift
)
|
(
1
<<
CALShift
);
csr0
=
MRL
|
MRM
|
(
8
<<
BurstLenShift
)
|
(
1
<<
CALShift
);
force_csr0
=
1
;
force_csr0
=
1
;
}
}
...
...
drivers/net/tulip/xircom_cb.c
View file @
cd9f63e2
...
@@ -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
)
...
...
include/linux/netdevice.h
View file @
cd9f63e2
...
@@ -930,8 +930,6 @@ extern void netdev_state_change(struct net_device *dev);
...
@@ -930,8 +930,6 @@ extern void netdev_state_change(struct net_device *dev);
/* Load a device via the kmod */
/* Load a device via the kmod */
extern
void
dev_load
(
const
char
*
name
);
extern
void
dev_load
(
const
char
*
name
);
extern
void
dev_mcast_init
(
void
);
extern
void
dev_mcast_init
(
void
);
extern
int
netdev_register_fc
(
struct
net_device
*
dev
,
void
(
*
stimul
)(
struct
net_device
*
dev
));
extern
void
netdev_unregister_fc
(
int
bit
);
extern
int
netdev_max_backlog
;
extern
int
netdev_max_backlog
;
extern
int
weight_p
;
extern
int
weight_p
;
extern
unsigned
long
netdev_fc_xoff
;
extern
unsigned
long
netdev_fc_xoff
;
...
...
net/Kconfig
View file @
cd9f63e2
...
@@ -564,24 +564,6 @@ config WAN_ROUTER
...
@@ -564,24 +564,6 @@ config WAN_ROUTER
If unsure, say N.
If unsure, say N.
config NET_HW_FLOWCONTROL
bool "Forwarding between high speed interfaces"
depends on EXPERIMENTAL
---help---
This option enables NIC (Network Interface Card) hardware throttling
during periods of extreme congestion. At the moment only a couple
of device drivers support it (really only one -- tulip, a modified
8390 driver can be found at
<ftp://ftp.tux.org/pub/net/ip-routing/fastroute/fastroute-8390.tar.gz>).
Really, this option is applicable to any machine attached to a fast
enough network, and even a 10 Mb NIC is able to kill a not very slow
box, such as a 120MHz Pentium.
However, do not say Y here if you did not experience any serious
problems.
menu "QoS and/or fair queueing"
menu "QoS and/or fair queueing"
config NET_SCHED
config NET_SCHED
...
...
net/core/dev.c
View file @
cd9f63e2
...
@@ -1390,66 +1390,6 @@ int mod_cong = 290;
...
@@ -1390,66 +1390,6 @@ int mod_cong = 290;
DEFINE_PER_CPU
(
struct
netif_rx_stats
,
netdev_rx_stat
)
=
{
0
,
};
DEFINE_PER_CPU
(
struct
netif_rx_stats
,
netdev_rx_stat
)
=
{
0
,
};
#ifdef CONFIG_NET_HW_FLOWCONTROL
atomic_t
netdev_dropping
=
ATOMIC_INIT
(
0
);
static
unsigned
long
netdev_fc_mask
=
1
;
unsigned
long
netdev_fc_xoff
;
spinlock_t
netdev_fc_lock
=
SPIN_LOCK_UNLOCKED
;
static
struct
{
void
(
*
stimul
)(
struct
net_device
*
);
struct
net_device
*
dev
;
}
netdev_fc_slots
[
BITS_PER_LONG
];
int
netdev_register_fc
(
struct
net_device
*
dev
,
void
(
*
stimul
)(
struct
net_device
*
dev
))
{
int
bit
=
0
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
netdev_fc_lock
,
flags
);
if
(
netdev_fc_mask
!=
~
0UL
)
{
bit
=
ffz
(
netdev_fc_mask
);
netdev_fc_slots
[
bit
].
stimul
=
stimul
;
netdev_fc_slots
[
bit
].
dev
=
dev
;
set_bit
(
bit
,
&
netdev_fc_mask
);
clear_bit
(
bit
,
&
netdev_fc_xoff
);
}
spin_unlock_irqrestore
(
&
netdev_fc_lock
,
flags
);
return
bit
;
}
void
netdev_unregister_fc
(
int
bit
)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
netdev_fc_lock
,
flags
);
if
(
bit
>
0
)
{
netdev_fc_slots
[
bit
].
stimul
=
NULL
;
netdev_fc_slots
[
bit
].
dev
=
NULL
;
clear_bit
(
bit
,
&
netdev_fc_mask
);
clear_bit
(
bit
,
&
netdev_fc_xoff
);
}
spin_unlock_irqrestore
(
&
netdev_fc_lock
,
flags
);
}
static
void
netdev_wakeup
(
void
)
{
unsigned
long
xoff
;
spin_lock
(
&
netdev_fc_lock
);
xoff
=
netdev_fc_xoff
;
netdev_fc_xoff
=
0
;
while
(
xoff
)
{
int
i
=
ffz
(
~
xoff
);
xoff
&=
~
(
1
<<
i
);
netdev_fc_slots
[
i
].
stimul
(
netdev_fc_slots
[
i
].
dev
);
}
spin_unlock
(
&
netdev_fc_lock
);
}
#endif
static
void
get_sample_stats
(
int
cpu
)
static
void
get_sample_stats
(
int
cpu
)
{
{
#ifdef RAND_LIE
#ifdef RAND_LIE
...
@@ -1559,13 +1499,8 @@ int netif_rx(struct sk_buff *skb)
...
@@ -1559,13 +1499,8 @@ int netif_rx(struct sk_buff *skb)
return
queue
->
cng_level
;
return
queue
->
cng_level
;
}
}
if
(
queue
->
throttle
)
{
if
(
queue
->
throttle
)
queue
->
throttle
=
0
;
queue
->
throttle
=
0
;
#ifdef CONFIG_NET_HW_FLOWCONTROL
if
(
atomic_dec_and_test
(
&
netdev_dropping
))
netdev_wakeup
();
#endif
}
netif_rx_schedule
(
&
queue
->
backlog_dev
);
netif_rx_schedule
(
&
queue
->
backlog_dev
);
goto
enqueue
;
goto
enqueue
;
...
@@ -1574,9 +1509,6 @@ int netif_rx(struct sk_buff *skb)
...
@@ -1574,9 +1509,6 @@ int netif_rx(struct sk_buff *skb)
if
(
!
queue
->
throttle
)
{
if
(
!
queue
->
throttle
)
{
queue
->
throttle
=
1
;
queue
->
throttle
=
1
;
__get_cpu_var
(
netdev_rx_stat
).
throttled
++
;
__get_cpu_var
(
netdev_rx_stat
).
throttled
++
;
#ifdef CONFIG_NET_HW_FLOWCONTROL
atomic_inc
(
&
netdev_dropping
);
#endif
}
}
drop:
drop:
...
@@ -1848,16 +1780,6 @@ static int process_backlog(struct net_device *backlog_dev, int *budget)
...
@@ -1848,16 +1780,6 @@ static int process_backlog(struct net_device *backlog_dev, int *budget)
if
(
work
>=
quota
||
jiffies
-
start_time
>
1
)
if
(
work
>=
quota
||
jiffies
-
start_time
>
1
)
break
;
break
;
#ifdef CONFIG_NET_HW_FLOWCONTROL
if
(
queue
->
throttle
&&
queue
->
input_pkt_queue
.
qlen
<
no_cong_thresh
)
{
queue
->
throttle
=
0
;
if
(
atomic_dec_and_test
(
&
netdev_dropping
))
{
netdev_wakeup
();
break
;
}
}
#endif
}
}
backlog_dev
->
quota
-=
work
;
backlog_dev
->
quota
-=
work
;
...
@@ -1872,13 +1794,8 @@ static int process_backlog(struct net_device *backlog_dev, int *budget)
...
@@ -1872,13 +1794,8 @@ static int process_backlog(struct net_device *backlog_dev, int *budget)
smp_mb__before_clear_bit
();
smp_mb__before_clear_bit
();
netif_poll_enable
(
backlog_dev
);
netif_poll_enable
(
backlog_dev
);
if
(
queue
->
throttle
)
{
if
(
queue
->
throttle
)
queue
->
throttle
=
0
;
queue
->
throttle
=
0
;
#ifdef CONFIG_NET_HW_FLOWCONTROL
if
(
atomic_dec_and_test
(
&
netdev_dropping
))
netdev_wakeup
();
#endif
}
local_irq_enable
();
local_irq_enable
();
return
0
;
return
0
;
}
}
...
@@ -3365,12 +3282,6 @@ EXPORT_SYMBOL(br_handle_frame_hook);
...
@@ -3365,12 +3282,6 @@ EXPORT_SYMBOL(br_handle_frame_hook);
#ifdef CONFIG_KMOD
#ifdef CONFIG_KMOD
EXPORT_SYMBOL
(
dev_load
);
EXPORT_SYMBOL
(
dev_load
);
#endif
#endif
#ifdef CONFIG_NET_HW_FLOWCONTROL
EXPORT_SYMBOL
(
netdev_dropping
);
EXPORT_SYMBOL
(
netdev_fc_xoff
);
EXPORT_SYMBOL
(
netdev_register_fc
);
EXPORT_SYMBOL
(
netdev_unregister_fc
);
#endif
#ifdef CONFIG_NET_CLS_ACT
#ifdef CONFIG_NET_CLS_ACT
EXPORT_SYMBOL
(
ing_filter
);
EXPORT_SYMBOL
(
ing_filter
);
...
...
net/irda/irlan/irlan_client.c
View file @
cd9f63e2
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment