648 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3================================================4Cirrus Logic LAN CS8900/CS8920 Ethernet Adapters5================================================6 7.. note::8 9 This document was contributed by Cirrus Logic for kernel 2.2.5. This version10 has been updated for 2.3.48 by Andrew Morton.11 12 Still, this is too outdated! A major cleanup is needed here.13 14Cirrus make a copy of this driver available at their website, as15described below. In general, you should use the driver version which16comes with your Linux distribution.17 18 19Linux Network Interface Driver ver. 2.00 <kernel 2.3.48>20 21 22.. TABLE OF CONTENTS23 24 1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS25 1.1 Product Overview26 1.2 Driver Description27 1.2.1 Driver Name28 1.2.2 File in the Driver Package29 1.3 System Requirements30 1.4 Licensing Information31 32 2.0 ADAPTER INSTALLATION and CONFIGURATION33 2.1 CS8900-based Adapter Configuration34 2.2 CS8920-based Adapter Configuration35 36 3.0 LOADING THE DRIVER AS A MODULE37 38 4.0 COMPILING THE DRIVER39 4.1 Compiling the Driver as a Loadable Module40 4.2 Compiling the driver to support memory mode41 4.3 Compiling the driver to support Rx DMA42 43 5.0 TESTING AND TROUBLESHOOTING44 5.1 Known Defects and Limitations45 5.2 Testing the Adapter46 5.2.1 Diagnostic Self-Test47 5.2.2 Diagnostic Network Test48 5.3 Using the Adapter's LEDs49 5.4 Resolving I/O Conflicts50 51 6.0 TECHNICAL SUPPORT52 6.1 Contacting Cirrus Logic's Technical Support53 6.2 Information Required Before Contacting Technical Support54 6.3 Obtaining the Latest Driver Version55 6.4 Current maintainer56 6.5 Kernel boot parameters57 58 591. Cirrus Logic LAN CS8900/CS8920 Ethernet Adapters60===================================================61 62 631.1. Product Overview64=====================65 66The CS8900-based ISA Ethernet Adapters from Cirrus Logic follow67IEEE 802.3 standards and support half or full-duplex operation in ISA bus68computers on 10 Mbps Ethernet networks. The adapters are designed for operation69in 16-bit ISA or EISA bus expansion slots and are available in7010BaseT-only or 3-media configurations (10BaseT, 10Base2, and AUI for 10Base-571or fiber networks).72 73CS8920-based adapters are similar to the CS8900-based adapter with additional74features for Plug and Play (PnP) support and Wakeup Frame recognition. As75such, the configuration procedures differ somewhat between the two types of76adapters. Refer to the "Adapter Configuration" section for details on77configuring both types of adapters.78 79 801.2. Driver Description81=======================82 83The CS8900/CS8920 Ethernet Adapter driver for Linux supports the Linux84v2.3.48 or greater kernel. It can be compiled directly into the kernel85or loaded at run-time as a device driver module.86 871.2.1 Driver Name: cs89x088 891.2.2 Files in the Driver Archive:90 91The files in the driver at Cirrus' website include:92 93 =================== ====================================================94 readme.txt this file95 build batch file to compile cs89x0.c.96 cs89x0.c driver C code97 cs89x0.h driver header file98 cs89x0.o pre-compiled module (for v2.2.5 kernel)99 config/Config.in sample file to include cs89x0 driver in the kernel.100 config/Makefile sample file to include cs89x0 driver in the kernel.101 config/Space.c sample file to include cs89x0 driver in the kernel.102 =================== ====================================================103 104 105 1061.3. System Requirements107------------------------108 109The following hardware is required:110 111 * Cirrus Logic LAN (CS8900/20-based) Ethernet ISA Adapter112 113 * IBM or IBM-compatible PC with:114 * An 80386 or higher processor115 * 16 bytes of contiguous IO space available between 210h - 370h116 * One available IRQ (5,10,11,or 12 for the CS8900, 3-7,9-15 for CS8920).117 118 * Appropriate cable (and connector for AUI, 10BASE-2) for your network119 topology.120 121The following software is required:122 123* LINUX kernel version 2.3.48 or higher124 125 * CS8900/20 Setup Utility (DOS-based)126 127 * LINUX kernel sources for your kernel (if compiling into kernel)128 129 * GNU Toolkit (gcc and make) v2.6 or above (if compiling into kernel130 or a module)131 132 133 1341.4. Licensing Information135--------------------------136 137This program is free software; you can redistribute it and/or modify it under138the terms of the GNU General Public License as published by the Free Software139Foundation, version 1.140 141This program is distributed in the hope that it will be useful, but WITHOUT142ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or143FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for144more details.145 146For a full copy of the GNU General Public License, write to the Free Software147Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.148 149 150 1512. Adapter Installation and Configuration152=========================================153 154Both the CS8900 and CS8920-based adapters can be configured using parameters155stored in an on-board EEPROM. You must use the DOS-based CS8900/20 Setup156Utility if you want to change the adapter's configuration in EEPROM.157 158When loading the driver as a module, you can specify many of the adapter's159configuration parameters on the command-line to override the EEPROM's settings160or for interface configuration when an EEPROM is not used. (CS8920-based161adapters must use an EEPROM.) See Section 3.0 LOADING THE DRIVER AS A MODULE.162 163Since the CS8900/20 Setup Utility is a DOS-based application, you must install164and configure the adapter in a DOS-based system using the CS8900/20 Setup165Utility before installation in the target LINUX system. (Not required if166installing a CS8900-based adapter and the default configuration is acceptable.)167 168 1692.1. CS8900-based Adapter Configuration170---------------------------------------171 172CS8900-based adapters shipped from Cirrus Logic have been configured173with the following "default" settings::174 175 Operation Mode: Memory Mode176 IRQ: 10177 Base I/O Address: 300178 Memory Base Address: D0000179 Optimization: DOS Client180 Transmission Mode: Half-duplex181 BootProm: None182 Media Type: Autodetect (3-media cards) or183 10BASE-T (10BASE-T only adapter)184 185You should only change the default configuration settings if conflicts with186another adapter exists. To change the adapter's configuration, run the187CS8900/20 Setup Utility.188 189 1902.2. CS8920-based Adapter Configuration191---------------------------------------192 193CS8920-based adapters are shipped from Cirrus Logic configured as Plug194and Play (PnP) enabled. However, since the cs89x0 driver does NOT195support PnP, you must install the CS8920 adapter in a DOS-based PC and196run the CS8900/20 Setup Utility to disable PnP and configure the197adapter before installation in the target Linux system. Failure to do198this will leave the adapter inactive and the driver will be unable to199communicate with the adapter.200 201::202 203 ****************************************************************204 * CS8920-BASED ADAPTERS: *205 * *206 * CS8920-BASED ADAPTERS ARE PLUG and PLAY ENABLED BY DEFAULT. *207 * THE CS89X0 DRIVER DOES NOT SUPPORT PnP. THEREFORE, YOU MUST *208 * RUN THE CS8900/20 SETUP UTILITY TO DISABLE PnP SUPPORT AND *209 * TO ACTIVATE THE ADAPTER. *210 ****************************************************************211 212 213 214 2153. Loading the Driver as a Module216=================================217 218If the driver is compiled as a loadable module, you can load the driver module219with the 'modprobe' command. Many of the adapter's configuration parameters can220be specified as command-line arguments to the load command. This facility221provides a means to override the EEPROM's settings or for interface222configuration when an EEPROM is not used.223 224Example::225 226 insmod cs89x0.o io=0x200 irq=0xA media=aui227 228This example loads the module and configures the adapter to use an IO port base229address of 200h, interrupt 10, and use the AUI media connection. The following230configuration options are available on the command line::231 232 io=### - specify IO address (200h-360h)233 irq=## - specify interrupt level234 use_dma=1 - Enable DMA235 dma=# - specify dma channel (Driver is compiled to support236 Rx DMA only)237 dmasize=# (16 or 64) - DMA size 16K or 64K. Default value is set to 16.238 media=rj45 - specify media type239 or media=bnc240 or media=aui241 or media=auto242 duplex=full - specify forced half/full/autonegotiate duplex243 or duplex=half244 or duplex=auto245 debug=# - debug level (only available if the driver was compiled246 for debugging)247 248**Notes:**249 250a) If an EEPROM is present, any specified command-line parameter251 will override the corresponding configuration value stored in252 EEPROM.253 254b) The "io" parameter must be specified on the command-line.255 256c) The driver's hardware probe routine is designed to avoid257 writing to I/O space until it knows that there is a cs89x0258 card at the written addresses. This could cause problems259 with device probing. To avoid this behaviour, add one260 to the ``io=`` module parameter. This doesn't actually change261 the I/O address, but it is a flag to tell the driver262 to partially initialise the hardware before trying to263 identify the card. This could be dangerous if you are264 not sure that there is a cs89x0 card at the provided address.265 266 For example, to scan for an adapter located at IO base 0x300,267 specify an IO address of 0x301.268 269d) The "duplex=auto" parameter is only supported for the CS8920.270 271e) The minimum command-line configuration required if an EEPROM is272 not present is:273 274 io275 irq276 media type (no autodetect)277 278f) The following additional parameters are CS89XX defaults (values279 used with no EEPROM or command-line argument).280 281 * DMA Burst = enabled282 * IOCHRDY Enabled = enabled283 * UseSA = enabled284 * CS8900 defaults to half-duplex if not specified on command-line285 * CS8920 defaults to autoneg if not specified on command-line286 * Use reset defaults for other config parameters287 * dma_mode = 0288 289g) You can use ifconfig to set the adapter's Ethernet address.290 291h) Many Linux distributions use the 'modprobe' command to load292 modules. This program uses the '/etc/conf.modules' file to293 determine configuration information which is passed to a driver294 module when it is loaded. All the configuration options which are295 described above may be placed within /etc/conf.modules.296 297 For example::298 299 > cat /etc/conf.modules300 ...301 alias eth0 cs89x0302 options cs89x0 io=0x0200 dma=5 use_dma=1303 ...304 305 In this example we are telling the module system that the306 ethernet driver for this machine should use the cs89x0 driver. We307 are asking 'modprobe' to pass the 'io', 'dma' and 'use_dma'308 arguments to the driver when it is loaded.309 310i) Cirrus recommend that the cs89x0 use the ISA DMA channels 5, 6 or311 7. You will probably find that other DMA channels will not work.312 313j) The cs89x0 supports DMA for receiving only. DMA mode is314 significantly more efficient. Flooding a 400 MHz Celeron machine315 with large ping packets consumes 82% of its CPU capacity in non-DMA316 mode. With DMA this is reduced to 45%.317 318k) If your Linux kernel was compiled with inbuilt plug-and-play319 support you will be able to find information about the cs89x0 card320 with the command::321 322 cat /proc/isapnp323 324l) If during DMA operation you find erratic behavior or network data325 corruption you should use your PC's BIOS to slow the EISA bus clock.326 327m) If the cs89x0 driver is compiled directly into the kernel328 (non-modular) then its I/O address is automatically determined by329 ISA bus probing. The IRQ number, media options, etc are determined330 from the card's EEPROM.331 332n) If the cs89x0 driver is compiled directly into the kernel, DMA333 mode may be selected by providing the kernel with a boot option334 'cs89x0_dma=N' where 'N' is the desired DMA channel number (5, 6 or 7).335 336 Kernel boot options may be provided on the LILO command line::337 338 LILO boot: linux cs89x0_dma=5339 340 or they may be placed in /etc/lilo.conf::341 342 image=/boot/bzImage-2.3.48343 append="cs89x0_dma=5"344 label=linux345 root=/dev/hda5346 read-only347 348 The DMA Rx buffer size is hardwired to 16 kbytes in this mode.349 (64k mode is not available).350 351 3524. Compiling the Driver353=======================354 355The cs89x0 driver can be compiled directly into the kernel or compiled into356a loadable device driver module.357 358Just use the standard way to configure the driver and compile the Kernel.359 360 3614.1. Compiling the Driver to Support Rx DMA362-------------------------------------------363 364The compile-time optionality for DMA was removed in the 2.3 kernel365series. DMA support is now unconditionally part of the driver. It is366enabled by the 'use_dma=1' module option.367 368 3695. Testing and Troubleshooting370==============================371 3725.1. Known Defects and Limitations373----------------------------------374 375Refer to the RELEASE.TXT file distributed as part of this archive for a list of376known defects, driver limitations, and work arounds.377 378 3795.2. Testing the Adapter380------------------------381 382Once the adapter has been installed and configured, the diagnostic option of383the CS8900/20 Setup Utility can be used to test the functionality of the384adapter and its network connection. Use the diagnostics 'Self Test' option to385test the functionality of the adapter with the hardware configuration you have386assigned. You can use the diagnostics 'Network Test' to test the ability of the387adapter to communicate across the Ethernet with another PC equipped with a388CS8900/20-based adapter card (it must also be running the CS8900/20 Setup389Utility).390 391.. note::392 393 The Setup Utility's diagnostics are designed to run in a394 DOS-only operating system environment. DO NOT run the diagnostics395 from a DOS or command prompt session under Windows 95, Windows NT,396 OS/2, or other operating system.397 398To run the diagnostics tests on the CS8900/20 adapter:399 400 1. Boot DOS on the PC and start the CS8900/20 Setup Utility.401 402 2. The adapter's current configuration is displayed. Hit the ENTER key to403 get to the main menu.404 405 4. Select 'Diagnostics' (ALT-G) from the main menu.406 * Select 'Self-Test' to test the adapter's basic functionality.407 * Select 'Network Test' to test the network connection and cabling.408 409 4105.2.1. Diagnostic Self-test411^^^^^^^^^^^^^^^^^^^^^^^^^^^412 413The diagnostic self-test checks the adapter's basic functionality as well as414its ability to communicate across the ISA bus based on the system resources415assigned during hardware configuration. The following tests are performed:416 417 * IO Register Read/Write Test418 419 The IO Register Read/Write test insures that the CS8900/20 can be420 accessed in IO mode, and that the IO base address is correct.421 422 * Shared Memory Test423 424 The Shared Memory test insures the CS8900/20 can be accessed in memory425 mode and that the range of memory addresses assigned does not conflict426 with other devices in the system.427 428 * Interrupt Test429 430 The Interrupt test insures there are no conflicts with the assigned IRQ431 signal.432 433 * EEPROM Test434 435 The EEPROM test insures the EEPROM can be read.436 437 * Chip RAM Test438 439 The Chip RAM test insures the 4K of memory internal to the CS8900/20 is440 working properly.441 442 * Internal Loop-back Test443 444 The Internal Loop Back test insures the adapter's transmitter and445 receiver are operating properly. If this test fails, make sure the446 adapter's cable is connected to the network (check for LED activity for447 example).448 449 * Boot PROM Test450 451 The Boot PROM test insures the Boot PROM is present, and can be read.452 Failure indicates the Boot PROM was not successfully read due to a453 hardware problem or due to a conflicts on the Boot PROM address454 assignment. (Test only applies if the adapter is configured to use the455 Boot PROM option.)456 457Failure of a test item indicates a possible system resource conflict with458another device on the ISA bus. In this case, you should use the Manual Setup459option to reconfigure the adapter by selecting a different value for the system460resource that failed.461 462 4635.2.2. Diagnostic Network Test464^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^465 466The Diagnostic Network Test verifies a working network connection by467transferring data between two CS8900/20 adapters installed in different PCs468on the same network. (Note: the diagnostic network test should not be run469between two nodes across a router.)470 471This test requires that each of the two PCs have a CS8900/20-based adapter472installed and have the CS8900/20 Setup Utility running. The first PC is473configured as a Responder and the other PC is configured as an Initiator.474Once the Initiator is started, it sends data frames to the Responder which475returns the frames to the Initiator.476 477The total number of frames received and transmitted are displayed on the478Initiator's display, along with a count of the number of frames received and479transmitted OK or in error. The test can be terminated anytime by the user at480either PC.481 482To setup the Diagnostic Network Test:483 484 1. Select a PC with a CS8900/20-based adapter and a known working network485 connection to act as the Responder. Run the CS8900/20 Setup Utility486 and select 'Diagnostics -> Network Test -> Responder' from the main487 menu. Hit ENTER to start the Responder.488 489 2. Return to the PC with the CS8900/20-based adapter you want to test and490 start the CS8900/20 Setup Utility.491 492 3. From the main menu, Select 'Diagnostic -> Network Test -> Initiator'.493 Hit ENTER to start the test.494 495You may stop the test on the Initiator at any time while allowing the Responder496to continue running. In this manner, you can move to additional PCs and test497them by starting the Initiator on another PC without having to stop/start the498Responder.499 500 501 5025.3. Using the Adapter's LEDs503-----------------------------504 505The 2 and 3-media adapters have two LEDs visible on the back end of the board506located near the 10Base-T connector.507 508Link Integrity LED: A "steady" ON of the green LED indicates a valid 10Base-T509connection. (Only applies to 10Base-T. The green LED has no significance for510a 10Base-2 or AUI connection.)511 512TX/RX LED: The yellow LED lights briefly each time the adapter transmits or513receives data. (The yellow LED will appear to "flicker" on a typical network.)514 515 5165.4. Resolving I/O Conflicts517----------------------------518 519An IO conflict occurs when two or more adapter use the same ISA resource (IO520address, memory address or IRQ). You can usually detect an IO conflict in one521of four ways after installing and or configuring the CS8900/20-based adapter:522 523 1. The system does not boot properly (or at all).524 525 2. The driver cannot communicate with the adapter, reporting an "Adapter526 not found" error message.527 528 3. You cannot connect to the network or the driver will not load.529 530 4. If you have configured the adapter to run in memory mode but the driver531 reports it is using IO mode when loading, this is an indication of a532 memory address conflict.533 534If an IO conflict occurs, run the CS8900/20 Setup Utility and perform a535diagnostic self-test. Normally, the ISA resource in conflict will fail the536self-test. If so, reconfigure the adapter selecting another choice for the537resource in conflict. Run the diagnostics again to check for further IO538conflicts.539 540In some cases, such as when the PC will not boot, it may be necessary to remove541the adapter and reconfigure it by installing it in another PC to run the542CS8900/20 Setup Utility. Once reinstalled in the target system, run the543diagnostics self-test to ensure the new configuration is free of conflicts544before loading the driver again.545 546When manually configuring the adapter, keep in mind the typical ISA system547resource usage as indicated in the tables below.548 549::550 551 I/O Address Device IRQ Device552 ----------- -------- --- --------553 200-20F Game I/O adapter 3 COM2, Bus Mouse554 230-23F Bus Mouse 4 COM1555 270-27F LPT3: third parallel port 5 LPT2556 2F0-2FF COM2: second serial port 6 Floppy Disk controller557 320-32F Fixed disk controller 7 LPT1558 8 Real-time Clock559 9 EGA/VGA display adapter560 12 Mouse (PS/2)561 Memory Address Device 13 Math Coprocessor562 -------------- --------------------- 14 Hard Disk controller563 A000-BFFF EGA Graphics Adapter564 A000-C7FF VGA Graphics Adapter565 B000-BFFF Mono Graphics Adapter566 B800-BFFF Color Graphics Adapter567 E000-FFFF AT BIOS568 569 570 571 5726. Technical Support573====================574 5756.1. Contacting Cirrus Logic's Technical Support576------------------------------------------------577 578Cirrus Logic's CS89XX Technical Application Support can be reached at::579 580 Telephone :(800) 888-5016 (from inside U.S. and Canada)581 :(512) 442-7555 (from outside the U.S. and Canada)582 Fax :(512) 912-3871583 Email :ethernet@crystal.cirrus.com584 WWW :http://www.cirrus.com585 586 5876.2. Information Required before Contacting Technical Support588-------------------------------------------------------------589 590Before contacting Cirrus Logic for technical support, be prepared to provide as591Much of the following information as possible.592 5931.) Adapter type (CRD8900, CDB8900, CDB8920, etc.)594 5952.) Adapter configuration596 597 * IO Base, Memory Base, IO or memory mode enabled, IRQ, DMA channel598 * Plug and Play enabled/disabled (CS8920-based adapters only)599 * Configured for media auto-detect or specific media type (which type).600 6013.) PC System's Configuration602 603 * Plug and Play system (yes/no)604 * BIOS (make and version)605 * System make and model606 * CPU (type and speed)607 * System RAM608 * SCSI Adapter609 6104.) Software611 612 * CS89XX driver and version613 * Your network operating system and version614 * Your system's OS version615 * Version of all protocol support files616 6175.) Any Error Message displayed.618 619 620 6216.3 Obtaining the Latest Driver Version622---------------------------------------623 624You can obtain the latest CS89XX drivers and support software from Cirrus Logic's625Web site. You can also contact Cirrus Logic's Technical Support (email:626ethernet@crystal.cirrus.com) and request that you be registered for automatic627software-update notification.628 629Cirrus Logic maintains a web page at http://www.cirrus.com with the630latest drivers and technical publications.631 632 6336.4. Current maintainer634-----------------------635 636In February 2000 the maintenance of this driver was assumed by Andrew637Morton.638 6396.5 Kernel module parameters640----------------------------641 642For use in embedded environments with no cs89x0 EEPROM, the kernel boot643parameter ``cs89x0_media=`` has been implemented. Usage is::644 645 cs89x0_media=rj45 or646 cs89x0_media=aui or647 cs89x0_media=bnc648