📄 readme.txt
字号:
SMSC LAN91C111 Driver
Revision 2.0
9/24/01
Copyright (C) 2001 Standard Microsystems Corporation (SMSC)
Copyright (C) 1996 by Erik Stahlman (ES)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
This file contains the instructions, test methods, and caveats for the
smc91111.c driver. You may not be using the driver without reading this file.
Driver Description:
===================
This driver has been modified to work on kernel 2.4. And it also contains the
latest SMSC updates for the Odd Byte issue. Important thing to note about this
is that, this driver might not compile on kernel version older than 2.4.
Please visit the SMSC website (http://www.smsc.com) for latest updates on the
drivers.
Things to note about installation:
==================================
1. This is designed to be compiled and loaded as a module. While putting
it into your kernel should be possible, it has not yet been tested.
2. The driver will only load on recent kernels because of changes to
the network driver interface. I have compiled this under kernel 2.4.
3. To compile, run 'make' .
4. Loading the driver:
use: insmod smc91111.o
optional parameters:
io=0x### : your base address
irq=## : your irq
nowait=x : 0 for standard I/O access (IOCHRDY wait states)
1 for fast access (no IOCHRDY wait states)
5. To allow automatic loading and intialization of the driver at boot-up
add the following line to /etc/modules.conf (in RedHat 7.0):
alias eth0 smc91111
options eth0 io=0x### irq=##
See the man pages on module.conf. You must also be sure to copy the
smc91111.o file to the modules directory:
su
cd /lib/modules/YOUR_CURRENT_KERNEL_VERSION/net
cp 'directory where the file resides'/smc91111.o .
chown root:root smc91111.o
chmod a+r smc91111.o
Then you must update the module dependencies (as root):
/sbin/depmod
Advanced Features:
==================
If your Linux Kernel was compiled with the configuration options CONFIG_PROC_FS
and CONFIG_SYSCTL enabled then the smc91111 driver provides several sysctl
files for accessing extended features. These files can be found in
/proc/sys/dev/ethX, where X is the interface number of the ethernet port. For
example, if your SMC91C111 card is the only one in the system then your sysctl
files will be located at /proc/sys/dev/eth0.
The following lists the files supported by the driver.
sysctl file Description
------------- --------------------------------------------------------------
info Prints a list of supported files along with a terse
description of each one.
swver Prints the software version information of the driver.
autoneg When set to 1 enables auto negotiation mode. The LAN91C111
supports auto negotiation per IEEE 802.3 Clause 28. When auto
negotiation is set the files "rspeed" and "rfduplx" (below)
limit what capabilities are broadcast to the remote end.
When "autoneg" is set to 0 the auto-negotiation feature
is disabled, and the speed and duplex can be controlled
directly and immediately with "rspeed" and "rfduplx".
You can change the value of this file by issuing the command
"echo 0 > autoneg", assuming that you are in the directory
/proc/sys/dev/ethX.
The default value of "autoneg" is 1.
aspeed Reports the actual speed of the link. This file is read-only.
afduplx Reports the actual duplex of the link. A value of 1 indicates
the link is currently operating in full duplex. This file
is read-only.
rspeed Requested speed, controls the speed of the interface. The
behavior invoked by this file depends on the value of
the "autoneg" file. See the "autoneg" description above. A value
of 100 indicates 100Mpbs, and a speed of 10 indicates 10Mbps.
You cannot change the value of "rspeed" when "autoneg" is
set to 1. You can issue the following commands to restrict
the LAN91C111 to 10Mbps operation:
cd /proc/sys/dev/eth0
echo 0 > autoneg
echo 10 > speed
echo 1 > autoneg
The default value of "speed" is 100.
rfduplx Requested duplex, controls the duplex operation of the
interface. The behavior invoked by this file depends on the
value of the "autoneg" file. See the "autoneg" description
above. A value of 1 indicates full duplex, while a value of 0
indicates half duplex operation. You cannot change the value
of "rfduplx" when "autoneg" is set to 1. The default value of
"rfduplx" is 1.
lnkfail When 1 indicates the PHY link is in a failure state (i.e.
not connected to a valid LAN). A value of 0 indicates
normal operation.
miiop When set to 1 selects an external PHY. This feature has not
yet been tested. The default value of "miiop" is 0.
swfdup When set to 1 enables Switched Full Duplex Operation. This
is to be used only when miiop is set to 1 (according to the
LAN91C111 documentation). This feature has not yet been
tested. The default value of "swfdup" is 0.
ephloop When set to 1 enables a loopback in the EPH block. This feature
has not yet been tested. The default value of "ephloop" is 0.
forcol When set to 1 forces a collision. This feature has not yet been
tested. The default value of "forcol" is 0.
filtcar When set to 1 the LAN91C111 filters the leading edge of carrier
sense for 12 bit times. This feature has not yet been tested.
The default value of "filtcar" is 0.
freemem Reports the amount of buffer memory currently free, in bytes.
totmem Reports the total amount of buffer memory contained in the
LAN91C111, in bytes.
leda Reports and controls which line condition is reported on
LEDA. I tested this feature with the SMSC EVB111-ISA board.
LED A on this card is green and is labelled "100". This
file accepts values from 0 thru 7.
Value Line Condition Reported
----- ----------------------------------------------
0 Logical OR of 100Mbps and 10Mbps link detected
1 Reserved
2 10Mpbs link detected
3 Full Duplex Mode Enabled
4 Transmit or Receive packet occurred
5 100Mbps Link Detected
6 Transmit packet occurred
7 Receive packet occurred
The default value of "leda" is 5.
ledb Reports and controls which line condition is reported on
LEDB. I tested this feature with the SMSC EVB111-ISA board.
LED B on this card is yellow and is labelled "FD". This
file accepts values from 0 thru 7 (see above).
The default value of "ledb" is 3.
chiprev Reports the chip revision number of the LAN91C111.
Testing Methodology and Report:
===============================
I tested the smc91111.c driver using RedHat 7.1. The version I tested with
came with kernel version 2.4.2. I updated the gcc tools because of
known bugs in this version of the RedHat distribution. It should not have
made a difference though, as the module is actually compiled using the "kgcc"
compiler provided by RedHat 7.1 (you have to manually install the kgcc rpm
from the CDROM).
I used two machines to perform tests. The first is an AST Bravo MS-T PRO 6200,
Model 2500C. It contains a PentiumPro w/integrated 256KB L2 cache, 64Mbytes of
EDO DRAM, and a 2.5GB EIDE hard drive.
The second machine is a generic Pentium II running at 360MHz. It contains
64Mbytes of SDRAM, and a 30GB hard drive. I used a NetGear FA311 PCI Ethernet
card in this machine. I compiled and installed the fa311.c driver provided
with the card.
I tested in two configurations. The first was in isolation, where the two
machines were connected to each other with a CAT5 crossover cable. The second
configuration connected both machines to a local area network running at
10Mbps. This lan containes three Windows machines and an Efficient Networks
SpeedStream router, connected to the Internet through an IDSL (today it is
served by Northpoint, tomorrow it is serviced by ????)
Test Scenerio #1
Testing in Isolated Network
The PentiumPro machine with the EVB111-ISA card is named "LOCAL", with IP address 216.36.95.135, netmask 255.255.255.240.
The PentiumII machine with the NetGear FA311 is named "REMOTE", with IP address of 216.36.95.134, netmask 255.255.255.240.
1. Bring the interface up.
The insmod and ifconfig programs must be executed as root.
LOCAL: /sbin/insmod smc91111.o
Check /var/log/messages (at end) for results. You should see the I/O address
and IRQ assigned to the card by the auto probe function.
LOCAL: /sbin/ifconfig eth0 216.36.95.135 netmask 255.255.255.240
Verify that the interace is up by checking the results of ifconfig:
LOCAL: /sbin/ifconfig
Verify that the Ethernet MAC address reported by ifconfig looks reasonable.
The card I tested with contained the address "00:80:0F:6A:00:00". Beware
of addresses with all zeros, all ones, or repeating bytes.
Test Result: Passed
2. Ping Remote Side
LOCAL: ping -c5 216.36.95.134
Verify that 5 pings were returned.
Test Result: Passed
3. Check sysctl variables
LOCAL: cd /proc/sys/dev/eth0
LOCAL: ls
Verify that the following files are shown:
afduplx autoneg ephloop forcol info ledb miiop rspeed swver
aspeed chiprev filtcar freemem leda lnkfail rfduplx swfdup totmem
LOCAL: more autoneg
Verify that the value printed is 1.
LOCAL: more rspeed
Verify that the value printed is 100.
LOCAL: more rfduplx
Verify that the value printed is 1.
LOCAL: more aspeed
Verify that the value printed is 100.
LOCAL: more afduplx
Verify that the value printed is 1.
LOCAL: more lnkfail
Verify that the value printed is 0.
LOCAL: more totmem
Verify that the value printed is 8192.
LOCAL: more freemem
Verify that the value printed is 8192.
LOCAL: more leda
Verify that the value printed is 5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -