📄 cs89x0.txt
字号:
NOTE----This document was contributed by Cirrus Logic for kernel 2.2.5. This versionhas been updated for 2.3.48 by Andrew Morton <andrewm@uow.edu.au>Cirrus make a copy of this driver available at their website, asdescribed below. In general, you should use the driver version whichcomes with your Linux distribution.CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERSLinux Network Interface Driver ver. 2.00 <kernel 2.3.48>=============================================================================== TABLE OF CONTENTS1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS 1.1 Product Overview 1.2 Driver Description 1.2.1 Driver Name 1.2.2 File in the Driver Package 1.3 System Requirements 1.4 Licensing Information2.0 ADAPTER INSTALLATION and CONFIGURATION 2.1 CS8900-based Adapter Configuration 2.2 CS8920-based Adapter Configuration 3.0 LOADING THE DRIVER AS A MODULE4.0 COMPILING THE DRIVER 4.1 Compiling the Driver as a Loadable Module 4.2 Compiling the driver to support memory mode 4.3 Compiling the driver to support Rx DMA 4.4 Compiling the Driver into the Kernel5.0 TESTING AND TROUBLESHOOTING 5.1 Known Defects and Limitations 5.2 Testing the Adapter 5.2.1 Diagnostic Self-Test 5.2.2 Diagnostic Network Test 5.3 Using the Adapter's LEDs 5.4 Resolving I/O Conflicts6.0 TECHNICAL SUPPORT 6.1 Contacting Cirrus Logic's Technical Support 6.2 Information Required Before Contacting Technical Support 6.3 Obtaining the Latest Driver Version 6.4 Current maintainer1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS===============================================================================1.1 PRODUCT OVERVIEWThe CS8900-based ISA Ethernet Adapters from Cirrus Logic follow IEEE 802.3 standards and support half or full-duplex operation in ISA bus computers on 10 Mbps Ethernet networks. The adapters are designed for operation in 16-bit ISA or EISA bus expansion slots and are available in 10BaseT-only or 3-media configurations (10BaseT, 10Base2, and AUI for 10Base-5 or fiber networks). CS8920-based adapters are similar to the CS8900-based adapter with additional features for Plug and Play (PnP) support and Wakeup Frame recognition. As such, the configuration procedures differ somewhat between the two types of adapters. Refer to the "Adapter Configuration" section for details on configuring both types of adapters.1.2 DRIVER DESCRIPTIONThe CS8900/CS8920 Ethernet Adapter driver for Linux supports the Linuxv2.3.48 or greater kernel. It can be compiled directly into the kernelor loaded at run-time as a device driver module.1.2.1 Driver Name: cs89x01.2.2 Files in the Driver Archive:The files in the driver at Cirrus' website include: readme.txt - this file build - batch file to compile cs89x0.c. cs89x0.c - driver C code cs89x0.h - driver header file cs89x0.o - pre-compiled module (for v2.2.5 kernel) config/Config.in - sample file to include cs89x0 driver in the kernel. config/Makefile - sample file to include cs89x0 driver in the kernel. config/Space.c - sample file to include cs89x0 driver in the kernel.1.3 SYSTEM REQUIREMENTSThe following hardware is required: * Cirrus Logic LAN (CS8900/20-based) Ethernet ISA Adapter * IBM or IBM-compatible PC with: * An 80386 or higher processor * 16 bytes of contiguous IO space available between 210h - 370h * One available IRQ (5,10,11,or 12 for the CS8900, 3-7,9-15 for CS8920). * Appropriate cable (and connector for AUI, 10BASE-2) for your network topology.The following software is required:* LINUX kernel version 2.3.48 or higher * CS8900/20 Setup Utility (DOS-based) * LINUX kernel sources for your kernel (if compiling into kernel) * GNU Toolkit (gcc and make) v2.6 or above (if compiling into kernel or a module) 1.4 LICENSING INFORMATIONThis program is free software; you can redistribute it and/or modify it underthe terms of the GNU General Public License as published by the Free SoftwareFoundation, version 1.This program is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.For a full copy of the GNU General Public License, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.2.0 ADAPTER INSTALLATION and CONFIGURATION===============================================================================Both the CS8900 and CS8920-based adapters can be configured using parameters stored in an on-board EEPROM. You must use the DOS-based CS8900/20 Setup Utility if you want to change the adapter's configuration in EEPROM. When loading the driver as a module, you can specify many of the adapter's configuration parameters on the command-line to override the EEPROM's settings or for interface configuration when an EEPROM is not used. (CS8920-based adapters must use an EEPROM.) See Section 3.0 LOADING THE DRIVER AS A MODULE.Since the CS8900/20 Setup Utility is a DOS-based application, you must install and configure the adapter in a DOS-based system using the CS8900/20 Setup Utility before installation in the target LINUX system. (Not required if installing a CS8900-based adapter and the default configuration is acceptable.) 2.1 CS8900-BASED ADAPTER CONFIGURATIONCS8900-based adapters shipped from Cirrus Logic have been configured with the following "default" settings: Operation Mode: Memory Mode IRQ: 10 Base I/O Address: 300 Memory Base Address: D0000 Optimization: DOS Client Transmission Mode: Half-duplex BootProm: None Media Type: Autodetect (3-media cards) or 10BASE-T (10BASE-T only adapter)You should only change the default configuration settings if conflicts with another adapter exists. To change the adapter's configuration, run the CS8900/20 Setup Utility. 2.2 CS8920-BASED ADAPTER CONFIGURATIONCS8920-based adapters are shipped from Cirrus Logic configured as Plugand Play (PnP) enabled. However, since the cs89x0 driver does NOTsupport PnP, you must install the CS8920 adapter in a DOS-based PC andrun the CS8900/20 Setup Utility to disable PnP and configure theadapter before installation in the target Linux system. Failure to dothis will leave the adapter inactive and the driver will be unable tocommunicate with the adapter. **************************************************************** * CS8920-BASED ADAPTERS: * * * * CS8920-BASED ADAPTERS ARE PLUG and PLAY ENABLED BY DEFAULT. * * THE CS89X0 DRIVER DOES NOT SUPPORT PnP. THEREFORE, YOU MUST * * RUN THE CS8900/20 SETUP UTILITY TO DISABLE PnP SUPPORT AND * * TO ACTIVATE THE ADAPTER. * ****************************************************************3.0 LOADING THE DRIVER AS A MODULE===============================================================================If the driver is compiled as a loadable module, you can load the driver modulewith the 'modprobe' command. Many of the adapter's configuration parameters can be specified as command-line arguments to the load command. This facility provides a means to override the EEPROM's settings or for interface configuration when an EEPROM is not used.Example: insmod cs89x0.o io=0x200 irq=0xA media=auiThis example loads the module and configures the adapter to use an IO port baseaddress of 200h, interrupt 10, and use the AUI media connection. The followingconfiguration options are available on the command line:* io=### - specify IO address (200h-360h)* irq=## - specify interrupt level* use_dma=1 - Enable DMA* dma=# - specify dma channel (Driver is compiled to support Rx DMA only)* dmasize=# (16 or 64) - DMA size 16K or 64K. Default value is set to 16.* media=rj45 - specify media type or media=bnc or media=aui or medai=auto* duplex=full - specify forced half/full/autonegotiate duplex or duplex=half or duplex=auto* debug=# - debug level (only available if the driver was compiled for debugging)NOTES:a) If an EEPROM is present, any specified command-line parameter will override the corresponding configuration value stored in EEPROM.b) The "io" parameter must be specified on the command-line. c) The driver's hardware probe routine is designed to avoid writing to I/O space until it knows that there is a cs89x0 card at the written addresses. This could cause problems with device probing. To avoid this behaviour, add one to the `io=' module parameter. This doesn't actually change the I/O address, but it is a flag to tell the driver topartially initialise the hardware before trying to identify the card. This could be dangerous if you are not sure that there is a cs89x0 card at the provided address. For example, to scan for an adapter located at IO base 0x300, specify an IO address of 0x301. d) The "duplex=auto" parameter is only supported for the CS8920.e) The minimum command-line configuration required if an EEPROM is not present is: io irq media type (no autodetect)f) The following additional parameters are CS89XX defaults (values used with no EEPROM or command-line argument). * DMA Burst = enabled * IOCHRDY Enabled = enabled * UseSA = enabled * CS8900 defaults to half-duplex if not specified on command-line * CS8920 defaults to autoneg if not specified on command-line * Use reset defaults for other config parameters * dma_mode = 0g) You can use ifconfig to set the adapter's Ethernet address.h) Many Linux distributions use the 'modprobe' command to load modules. This program uses the '/etc/conf.modules' file to determine configuration information which is passed to a driver module when it is loaded. All the configuration options which are described above may be placed within /etc/conf.modules. For example: > cat /etc/conf.modules ... alias eth0 cs89x0 options cs89x0 io=0x0200 dma=5 use_dma=1 ... In this example we are telling the module system that the ethernet driver for this machine should use the cs89x0 driver. We are asking 'modprobe' to pass the 'io', 'dma' and 'use_dma' arguments to the driver when it is loaded.i) Cirrus recommend that the cs89x0 use the ISA DMA channels 5, 6 or 7. You will probably find that other DMA channels will not work.j) The cs89x0 supports DMA for receiving only. DMA mode is significantly more efficient. Flooding a 400 MHz Celeron machine with large ping packets consumes 82% of its CPU capacity in non-DMA mode. With DMA this is reduced to 45%.k) If your Linux kernel was compiled with inbuilt plug-and-play support you will be able to find information about the cs89x0 card with the command cat /proc/isapnpl) If during DMA operation you find erratic behavior or network data corruption you should use your PC's BIOS to slow the EISA bus clock.m) If the cs89x0 driver is compiled directly into the kernel (non-modular) then its I/O address is automatically determined by ISA bus probing. The IRQ number, media options, etc are determined from the card's EEPROM.n) If the cs89x0 driver is compiled directly into the kernel, DMA mode may be selected by providing the kernel with a boot option 'cs89x0_dma=N' where 'N' is the desired DMA channel number (5, 6 or 7). Kernel boot options may be provided on the LILO command line: LILO boot: linux cs89x0_dma=5 or they may be placed in /etc/lilo.conf: image=/boot/bzImage-2.3.48 append="cs89x0_dma=5" label=linux root=/dev/hda5 read-only The DMA Rx buffer size is hardwired to 16 kbytes in this mode. (64k mode is not available).4.0 COMPILING THE DRIVER===============================================================================The cs89x0 driver can be compiled directly into the kernel or compiled intoa loadable device driver module.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -