- 论坛徽章:
- 0
|
上网的问题,怎么解决?
Using the Source RPM Package
The updated drivers are best installed by using the source RPM to create a custom binary RPM with kernel modules for your system:
ftp://ftp.scyld.com/pub/network/netdriver-2.0.src.rpm
Use the following commands to install and test the driver pack:
# Transfer the Scyld PCI Netdriver package
rpm -i ftp://ftp.scyld.com/pub/network/netdriver-2.0.src.rpm
# Build the binary version for your kernel
cd /usr/src/{redhat,TurboLinux}/
rpm -bb SPECS/netdriver.spec
# Now install it your newly built package.
rpm -i --force RPMS/i386/netdriver-2.0-*.i386.rpm
The --force option is needed because the new drivers may conflict with the existing drivers installed by the kernel package. If this occurs you will see a warning message for each driver that has been updated.
--------------------------------------------------------------------------------
Installing Individual Drivers
Drivers may be updated individually by following the directions in http://scyld.com/expert/modules.html. You will need to build both the driver.o and pci-scan.o modules using the following source files from ftp://ftp.scyld.com/pub/network/
the driver source file
pci-scan.c
pci-scan.h and
kern_compat.h
In the instructions below driver.c refers to the name of the driver source file for your device e.g. 3c59x.c, and driver.o refers to the compiled driver binary module.
Copy the driver source files to a convenient directory. I usually use /usr/src/modules/.
Compile the file using the compile-command at the bottom of the driver source file. If a compile-command is not there use the following compile command:
gcc -DMODULE -D__KERNEL__ -O6 -c driver.c
gcc -DMODULE -D__KERNEL__ -O6 -c pci-scan.c
As 'root', test the module by doing "insmod driver.o".
Install the driver module in the proper location for your distribution. This is usually /lib/modules/kernel-version/net/driver.o. The command to do this is
install -m 644 pci-scan.o driver.o /lib/modules/`uname -r`/net/
--------------------------------------------------------------------------------
Building updated drivers into the kernel
Most kernel versions do not natively support the pci-scan.c layer. You will have to explicitly add pci-scan.o to the L_OBJS entry in drivers/net/Makefile.
L_TARGET := net.a
-L_OBJS := auto_irq.o
+L_OBJS := auto_irq.o pci-scan.o
M_OBJS :=
MOD_LIST_NAME := NET_MODULES
--------------------------------------------------------------------------------
Using the driver update with CardBus
The new driver structure is designed for in-kernel support of CardBus and hot-swap-PCI. The in-kernel implementation in the 2.3.* kernel is still unreliable, and few hot-swap PCI implementations exists, so most users will using the PCMCIA package from David Hinds with CardBus adapters. (Ref. ftp://sourceforge.org/pcmcia/)
Using the new drivers with the existing PCMCIA package requires the PCI driver management module, pci-scan.c, and a CardBus-specific shim module named cb_shim.c.
These new modules, along with the drivers, should be compiled using the Makefile and the resulting *.o files installed in /lib/modules/'uname -r'/pcmcia/ with the make install. The following configuration lines should be added to /etc/pcmcia/config.opts and the PCMCIA system restarted with the new configuration.
# An updated list of Tulip-based cards.
device "tulip" class "network" module "cb_enabler", "pci-scan", "cb_shim", "tulip"
card "Accton EN2227 (ADMtek Centaur)" manfid 0x01bf, 0x2227 bind "tulip"
card "Ambicom AMB8100 10/100 Ethernet" manfid 0x9513, 0x0081 bind "tulip"
card "Compex Linkport TX" manfid 0x8a01, 0x0100 bind "tulip"
card "D-Link DFE-660" manfid 0x50c7, 0xcafe bind "tulip"
card "IBM 10/100 EtherJet CardBus" manfid 0x00a4, 0x0113 bind "tulip"
card "Intel EtherExpress PRO/100 CardBus" manfid 0x0089, 0x0102 bind "tulip"
card "Kingston KNE-CB4TX" manfid 0x0186, 0x0101 bind "tulip"
card "Linksys EtherFast 10/100" manfid 0x0149, 0x0231 bind "tulip"
card "Linksys EtherFast 10/100 v2.0" manfid 0x0149, 0xc2ab bind "tulip"
card "Linksys EtherFast PCM200 v2" manfid 0x13d1, 0xab02 bind "tulip"
card "Linksys EtherFast PCM200" manfid 0x13d1, 0xab03 bind "tulip"
card "SMC EZ CardBus 10/100 Ethernet" manfid 0x01bf, 0x2220 bind "tulip"
card "SMC EZ CardBus 10/100 Ethernet" manfid 0x01bf, 0x2225 bind "tulip"
card "TDK CardBus NetworkFlyer 10/100" manfid 0x0105, 0x0500 bind "tulip"
card "UMAX Technologies UMAX250" manfid 0x9513, 0x0081 bind "tulip"
card "Xircom CBE-10/1000" manfid 0x0105, 0x0101 bind "tulip"
# The 3Com Boomerang/Cyclone/Tornado CardBus cards.
device "vortex" class "network"
module "cb_enabler", "pci-scan", "cb_shim" opts "debug=7", "3c59x"
card "3Com 3c575-TX Fast EtherLink XL" manfid 0x0101, 0x5057 bind "vortex"
card "3CCFE575BT" manfid 0x0101, 0x5157 bind "vortex"
card "3CCFE575CT" manfid 0x0101, 0x5257 bind "vortex"
card "3CCFE656BT" manfid 0x0102, 0x6560 bind "vortex" to 0, "serial_cb" to 1
# The 656 cards have a WinModem 
card "3CCFE656BT" manfid 0x0102, 0x6562 bind "vortex"
card "3CCFEM656C" manfid 0x0102, 0x6564 bind "vortex" to 0, "serial_cb" to 1
# SMSC EPIC cards
device "epic100" class "network"
module "cb_enabler", "pci-scan", "cb_shim", "epic100"
card "Trumpcard:7oS Ethernet" manfid 0x0140, 0x0011 bind "epic100"
card "Trumpcard:JoS Ethernet" manfid 0x0140, 0x000F
bind "epic100" to 0, "serial_cb" to 1
card "SMSC LAN EPIC" manfid 0x0108, 0xe104 bind "epic100"
card "SMSC LAN EPIC + Modem" manfid 0x0108, 0xe302
bind "epic100" to 0, "serial_cb" to 1
# The CardBus version of the RealTek rtl8139b.
device "realtek" class "network"
module "cb_enabler", "pci-scan", "cb_shim", "rtl8139"
card "Best Data RTL8139B" manfid 0x0000, 0x021b bind "realtek"
card "RealTek RTL8139B" manfid 0x0000, 0x024c bind "realtek"
card "Ambicom RTL8139B" manfid 0x0101, 0x8139 bind "realtek"
card "Laneed LD-10/100CBA" manfid 0x01bf, 0x2230 bind "realtek"
card "Argosy EN235 RTL8139B" manfid 0x0260, 0x0235 bind "realtek"
# The few Intel eepro100 designs.
device "eepro100" class "network"
module "cb_enabler", "pci-scan", "cb_shim", "eepro100"
card "Intel Pro/100 CardBus II" manfid 0x0089, 0x0103 bind "eepro100"
card "Intel Pro/100 LAN+Modem56 CardBus II" manfid 0x0089, 0x1103 bind "eepro100"
device "firewire" class "ieee1394"
module "cb_enabler", "pci-scan", "cb_shim", "firewire"
# CardBus serial/modem support (generally combo with Ethernet)
device "serial_cb" class "serial" module "cb_enabler", "serial_cb"
Discussion of the new driver structure
From the casual user perspective, the change to the new PCI scan code only adds complexity. Instead of each driver being a single self-contained file, you must now deal with two new header files, kern_compat.h and pci-scan.h, and a support module, pci-scan.c. For CardBus or hot-swap-PCI use an additional shim module, named cb_shim.c for CardBus, is used to enable translate power management and removal events.
The benefits of the new driver generation are subtle
PCI scans, previously duplicated in each driver, are now done by a more sophisticated routine in pci-scan.c. The PCI bus and associated "resource" (IRQ and bus address mapping) management has been the target of frequent interface changes. Especially with the over-engineered and pointlessly complex restructuring in 2.3.13, it was being increasingly difficult to update, test and requalify drivers. This scan code, while primarily intended to extract common code, also removes many of the kernel version dependencies.
The new PCI scan utility is table based, which concentrates the card detection information and makes it trivial to add support for new device IDs. OEM devices that are customized with unique PCI ID numbers require only an additional table entry, with little source and binary size impact.
Drivers now natively support CardBus and hot-swap PCI, rather than having to be compiled explicitly to support either PCI or CardBus.
ACPI (properly called PCI power management) power state utilities are available, with activation to ACPI D0 state by default.
The utility routines in pci-scan.c work with all classes of PCI and CardBus devices, not just network cards.
Driver source code is smaller and more readable by having the kernel version compatibility issues migrated to a header file, kern_compat.h.
For performance reasons most drivers (exceptions: ne2k-pci and via-rhine, which have boards types with no memory space mapping) now use PCI memory space access instead of I/O space. The diagnostic routines continue to use I/O space access.
http://www.scyld.com/diag/index.html
ftp://ftp.scyld.com/pub/diag/ |
|