-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
Lucas De Marchi authoredFixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
3c527.c 42.11 KiB
/* 3c527.c: 3Com Etherlink/MC32 driver for Linux 2.4 and 2.6.
*
* (c) Copyright 1998 Red Hat Software Inc
* Written by Alan Cox.
* Further debugging by Carl Drougge.
* Initial SMP support by Felipe W Damasio <felipewd@terra.com.br>
* Heavily modified by Richard Procter <rnp@paradise.net.nz>
*
* Based on skeleton.c written 1993-94 by Donald Becker and ne2.c
* (for the MCA stuff) written by Wim Dumon.
*
* Thanks to 3Com for making this possible by providing me with the
* documentation.
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
#define DRV_NAME "3c527"
#define DRV_VERSION "0.7-SMP"
#define DRV_RELDATE "2003/09/21"
static const char *version =
DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Procter <rnp@paradise.net.nz>\n";
/**
* DOC: Traps for the unwary
*
* The diagram (Figure 1-1) and the POS summary disagree with the
* "Interrupt Level" section in the manual.
*
* The manual contradicts itself when describing the minimum number
* buffers in the 'configure lists' command.
* My card accepts a buffer config of 4/4.
*
* Setting the SAV BP bit does not save bad packets, but
* only enables RX on-card stats collection.
*
* The documentation in places seems to miss things. In actual fact
* I've always eventually found everything is documented, it just
* requires careful study.
*
* DOC: Theory Of Operation
*
* The 3com 3c527 is a 32bit MCA bus mastering adapter with a large
* amount of on board intelligence that housekeeps a somewhat dumber
* Intel NIC. For performance we want to keep the transmit queue deep
* as the card can transmit packets while fetching others from main
* memory by bus master DMA. Transmission and reception are driven by
* circular buffer queues.
*
* The mailboxes can be used for controlling how the card traverses
* its buffer rings, but are used only for initial setup in this
* implementation. The exec mailbox allows a variety of commands to
* be executed. Each command must complete before the next is
* executed. Primarily we use the exec mailbox for controlling the
* multicast lists. We have to do a certain amount of interesting
* hoop jumping as the multicast list changes can occur in interrupt
* state when the card has an exec command pending. We defer such
* events until the command completion interrupt.
*
* A copy break scheme (taken from 3c59x.c) is employed whereby
* received frames exceeding a configurable length are passed
* directly to the higher networking layers without incuring a copy,
* in what amounts to a time/space trade-off.
*
* The card also keeps a large amount of statistical information
* on-board. In a perfect world, these could be used safely at no
* cost. However, lacking information to the contrary, processing