/* Written 1997-1998 by Donald Becker. This software may be used and distributed according to the terms of the GNU General Public License, incorporated herein by reference. This driver is for the 3Com ISA EtherLink XL "Corkscrew" 3c515 ethercard. The author may be reached as becker@scyld.com, or C/O Scyld Computing Corporation 410 Severn Ave., Suite 210 Annapolis MD 21403 2000/2/2- Added support for kernel-level ISAPnP by Stephen Frost <sfrost@snowman.net> and Alessandro Zummo Cleaned up for 2.3.x/softnet by Jeff Garzik and Alan Cox. 2001/11/17 - Added ethtool support (jgarzik) 2002/10/28 - Locking updates for 2.5 (alan@redhat.com)*/#define DRV_NAME"3c515"#define DRV_VERSION"0.99t-ac"#define DRV_RELDATE"28-Oct-2002"static char*version =
DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " becker@scyld.com and others\n";#define CORKSCREW 1/* "Knobs" that adjust features and parameters. *//* Set the copy breakpoint for the copy-only-tiny-frames scheme. Setting to > 1512 effectively disables this feature. */static int rx_copybreak =200;/* Allow setting MTU to a larger size, bypassing the normal ethernet setup. */static const int mtu =1500;/* Maximum events (Rx packets, etc.) to handle at each interrupt. */static int max_interrupt_work =20;/* Enable the automatic media selection code -- usually set. */#define AUTOMEDIA 1/* Allow the use of fragment bus master transfers instead of only programmed-I/O for Vortex cards. Full-bus-master transfers are always enabled by default on Boomerang cards. If VORTEX_BUS_MASTER is defined, the feature may be turned on using 'options'. */#define VORTEX_BUS_MASTER/* A few values that may be tweaked. *//* Keep the ring sizes a power of two for efficiency. */#define TX_RING_SIZE 16#define RX_RING_SIZE 16#define PKT_BUF_SZ 1536/* Size of each temporary Rx buffer. */#include <linux/config.h>#include <linux/module.h>#include <linux/isapnp.h>#include <linux/kernel.h>#include <linux/netdevice.h>#include <linux/string.h>#include <linux/errno.h>#include <linux/in.h>#include <linux/ioport.h>#include <linux/slab.h>#include <linux/skbuff.h>#include <linux/etherdevice.h>#include <linux/interrupt.h>#include <linux/timer.h>#include <linux/ethtool.h>#include <linux/bitops.h>#include <asm/uaccess.h>#include <asm/io.h>#include <asm/dma.h>#define NEW_MULTICAST#include <linux/delay.h>#define MAX_UNITS 8MODULE_AUTHOR("Donald Becker <becker@scyld.com>");MODULE_DESCRIPTION("3Com 3c515 Corkscrew driver");MODULE_LICENSE("GPL");