Skip to contentSkip to conversation

Remove a number of ISA and PCMCIA Ethernet drivers

PATCH In review Andrew Lunn 10 participants 30 messages Apr 22 – Apr 30

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v2 cover Remove a number of ISA and PCMCIA Ethernet drivers

These old drivers have not been much of a Maintenance burden until recently. Now there are more newbies using AI and fuzzers finding issues, resulting in more work for Maintainers. Fixing these old drivers make little sense, if it is not clear they have users.

These mostly ISA and PCMCIA Ethernet devices, mostly from the last century, a couple from 2001 or 2002. It seems unlikely they are still used. However, remove them one patch at a time so they can be brought back if somebody still has the hardware, runs modern kernels and wants to take up the roll of driver Maintainer.

---
Changes in v2:
- Drop removal of 3c59x and xirc2ps, MVME147
- Remove some documents which belong to the drivers being removed.
- Link to v1: https://lore.kernel.org/r/20260421-v7-0-0-net-next-driver-removal-v1-v1-0-69517c689d1f@lunn.ch

---
Andrew Lunn (15):
drivers: net: 3com: 3c509: Remove this driver
drivers: net: 3com: 3c515: Remove this driver
drivers: net: 3com: 3c574: Remove this driver
drivers: net: 3com: 3c589: Remove this driver
drivers: net: amd: lance: Remove this driver
drivers: net: amd: nmclan: Remove this driver
drivers: net: smsc: smc9194: Remove this driver
drivers: net: smsc: smc91c92: Remove this driver
drivers: net: cirrus: cs89x0: Remove this driver
drivers: net: cirrus: mac89x0: Remove this driver
drivers: net: fujitsu: fmvj18x: Remove this driver
drivers: net: 8390: AX88190: Remove this driver
drivers: net: 8390: pcnet: Remove this driver
drivers: net: 8390: ultra: Remove this driver
drivers: net: 8390: wd80x3: Remove this driver

 .../device_drivers/ethernet/3com/3c509.rst         |  249 ---
 .../device_drivers/ethernet/cirrus/cs89x0.rst      |  647 ------
 .../device_drivers/ethernet/smsc/smc9.rst          |   48 -
 drivers/net/ethernet/3com/3c509.c                  | 1448 --------------
 drivers/net/ethernet/3com/3c515.c                  | 1566 ---------------
 drivers/net/ethernet/3com/3c574_cs.c               | 1164 -----------
 drivers/net/ethernet/3com/3c589_cs.c               |  974 ---------
 drivers/net/ethernet/3com/Kconfig                  |   45 -
 drivers/net/ethernet/3com/Makefile                 |    4 -
 drivers/net/ethernet/8390/Kconfig                  |   52 -
 drivers/net/ethernet/8390/Makefile                 |    4 -
 drivers/net/ethernet/8390/axnet_cs.c               | 1707 ----------------
 drivers/net/ethernet/8390/pcnet_cs.c               | 1717 ----------------
 drivers/net/ethernet/8390/smc-ultra.c              |  630 ------
 drivers/net/ethernet/8390/wd.c                     |  575 ------
 drivers/net/ethernet/Kconfig                       |    1 -
 drivers/net/ethernet/amd/Kconfig                   |   21 -
 drivers/net/ethernet/amd/Makefile                  |    2 -
 drivers/net/ethernet/amd/lance.c                   | 1317 -------------
 drivers/net/ethernet/amd/nmclan_cs.c               | 1508 --------------
 drivers/net/ethernet/cirrus/Kconfig                |   40 -
 drivers/net/ethernet/cirrus/Makefile               |    2 -
 drivers/net/ethernet/cirrus/cs89x0.c               | 1915 ------------------
 drivers/net/ethernet/cirrus/cs89x0.h               |  461 -----
 drivers/net/ethernet/cirrus/mac89x0.c              |  577 ------
 drivers/net/ethernet/fujitsu/Kconfig               |   30 -
 drivers/net/ethernet/fujitsu/Makefile              |    6 -
 drivers/net/ethernet/fujitsu/fmvj18x_cs.c          | 1176 -----------
 drivers/net/ethernet/smsc/Kconfig                  |   27 -
 drivers/net/ethernet/smsc/Makefile                 |    2 -
 drivers/net/ethernet/smsc/smc9194.c                | 1535 ---------------
 drivers/net/ethernet/smsc/smc91c92_cs.c            | 2059 --------------------
 32 files changed, 21509 deletions(-)

---
base-commit: 1f5ffc672165ff851063a5fd044b727ab2517ae3
change-id: 20260421-v7-0-0-net-next-driver-removal-v1-47c88c987b34

Best regards,

Signature · 1 line
Andrew Lunn <[email protected]>
#1 lore raw

PATCH v2 1/15 drivers: net: 3com: 3c509: Remove this driver

The 3c509 was written by Donald Becker between 1993-2000. It is an ISA device, so unlikely to be used with modern kernels.

---
v2
Delete Documentation as well

---
 .../device_drivers/ethernet/3com/3c509.rst         |  249 ----
 drivers/net/ethernet/3com/3c509.c                  | 1448 --------------------
 drivers/net/ethernet/3com/Kconfig                  |   14 -
 drivers/net/ethernet/3com/Makefile                 |    1 -
 4 files changed, 1712 deletions(-)
Documentation/networking/device_drivers/ethernet/3com/3c509.rst deleted +0 -249
deleted file mode 100644
index 47f706bacdd9..000000000000
@@ -1,249 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0
-
-=============================================================================
-Linux and the 3Com EtherLink III Series Ethercards (driver v1.18c and higher)
-=============================================================================
-
-This file contains the instructions and caveats for v1.18c and higher versions
-of the 3c509 driver. You should not use the driver without reading this file.
-
-release 1.0
-
-28 February 2002
-
-Current maintainer (corrections to):
-  David Ruggiero <[email protected]>
-
-Introduction
-============
-
-The following are notes and information on using the 3Com EtherLink III series
-ethercards in Linux. These cards are commonly known by the most widely-used
-card's 3Com model number, 3c509. They are all 10mb/s ISA-bus cards and shouldn't
-be (but sometimes are) confused with the similarly-numbered PCI-bus "3c905"
-(aka "Vortex" or "Boomerang") series.  Kernel support for the 3c509 family is
-provided by the module 3c509.c, which has code to support all of the following
-models:
-
- - 3c509 (original ISA card)
- - 3c509B (later revision of the ISA card; supports full-duplex)
- - 3c589 (PCMCIA)
- - 3c589B (later revision of the 3c589; supports full-duplex)
- - 3c579 (EISA)
-
-Large portions of this documentation were heavily borrowed from the guide
-written the original author of the 3c509 driver, Donald Becker. The master
-copy of that document, which contains notes on older versions of the driver,
-currently resides on Scyld web server: http://www.scyld.com/.
-
-
-Special Driver Features
-=======================
-
-Overriding card settings
-
-The driver allows boot- or load-time overriding of the card's detected IOADDR,
-IRQ, and transceiver settings, although this capability shouldn't generally be
-needed except to enable full-duplex mode (see below). An example of the syntax
-for LILO parameters for doing this::
-
-    ether=10,0x310,3,0x3c509,eth0
-
-This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and
-transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts
-with other card types when overriding the I/O address. When the driver is
-loaded as a module, only the IRQ may be overridden. For example,
-setting two cards to IRQ10 and IRQ11 is done by using the irq module
-option::
-
-   options 3c509 irq=10,11
-
-
-Full-duplex mode
-================
-
-The v1.18c driver added support for the 3c509B's full-duplex capabilities.
-In order to enable and successfully use full-duplex mode, three conditions
-must be met:
-
-(a) You must have a Etherlink III card model whose hardware supports full-
-duplex operations. Currently, the only members of the 3c509 family that are
-positively known to support full-duplex are the 3c509B (ISA bus) and 3c589B
-(PCMCIA) cards. Cards without the "B" model designation do *not* support
-full-duplex mode; these include the original 3c509 (no "B"), the original
-3c589, the 3c529 (MCA bus), and the 3c579 (EISA bus).
-
-(b) You must be using your card's 10baseT transceiver (i.e., the RJ-45
-connector), not its AUI (thick-net) or 10base2 (thin-net/coax) interfaces.
-AUI and 10base2 network cabling is physically incapable of full-duplex
-operation.
-
-(c) Most importantly, your 3c509B must be connected to a link partner that is
-itself full-duplex capable. This is almost certainly one of two things: a full-
-duplex-capable  Ethernet switch (*not* a hub), or a full-duplex-capable NIC on
-another system that's connected directly to the 3c509B via a crossover cable.
-
-Full-duplex mode can be enabled using 'ethtool'.
-
-.. warning::
-
-  Extremely important caution concerning full-duplex mode
-
-  Understand that the 3c509B's hardware's full-duplex support is much more
-  limited than that provide by more modern network interface cards. Although
-  at the physical layer of the network it fully supports full-duplex operation,
-  the card was designed before the current Ethernet auto-negotiation (N-way)
-  spec was written. This means that the 3c509B family ***cannot and will not
-  auto-negotiate a full-duplex connection with its link partner under any
-  circumstances, no matter how it is initialized***. If the full-duplex mode
-  of the 3c509B is enabled, its link partner will very likely need to be
-  independently _forced_ into full-duplex mode as well; otherwise various nasty
-  failures will occur - at the very least, you'll see massive numbers of packet
-  collisions. This is one of very rare circumstances where disabling auto-
-  negotiation and forcing the duplex mode of a network interface card or switch
-  would ever be necessary or desirable.
-
-
-Available Transceiver Types
-===========================
-
-For versions of the driver v1.18c and above, the available transceiver types are:
-
-== =========================================================================
-0  transceiver type from EEPROM config (normally 10baseT); force half-duplex
-1  AUI (thick-net / DB15 connector)
-2  (undefined)
-3  10base2 (thin-net == coax / BNC connector)
-4  10baseT (RJ-45 connector); force half-duplex mode
-8  transceiver type and duplex mode taken from card's EEPROM config settings
-12 10baseT (RJ-45 connector); force full-duplex mode
-== =========================================================================
-
-Prior to driver version 1.18c, only transceiver codes 0-4 were supported. Note
-that the new transceiver codes 8 and 12 are the *only* ones that will enable
-full-duplex mode, no matter what the card's detected EEPROM settings might be.
-This insured that merely upgrading the driver from an earlier version would
-never automatically enable full-duplex mode in an existing installation;
-it must always be explicitly enabled via one of these code in order to be
-activated.
-
-The transceiver type can be changed using 'ethtool'.
-
-
-Interpretation of error messages and common problems
-----------------------------------------------------
-
-Error Messages
-^^^^^^^^^^^^^^
-
-eth0: Infinite loop in interrupt, status 2011.
-These are "mostly harmless" message indicating that the driver had too much
-work during that interrupt cycle. With a status of 0x2011 you are receiving
-packets faster than they can be removed from the card. This should be rare
-or impossible in normal operation. Possible causes of this error report are:
-
-   - a "green" mode enabled that slows the processor down when there is no
-     keyboard activity.
-
-   - some other device or device driver hogging the bus or disabling interrupts.
-     Check /proc/interrupts for excessive interrupt counts. The timer tick
-     interrupt should always be incrementing faster than the others.
-
-No received packets
-^^^^^^^^^^^^^^^^^^^
-
-If a 3c509, 3c562 or 3c589 can successfully transmit packets, but never
-receives packets (as reported by /proc/net/dev or 'ifconfig') you likely
-have an interrupt line problem. Check /proc/interrupts to verify that the
-card is actually generating interrupts. If the interrupt count is not
-increasing you likely have a physical conflict with two devices trying to
-use the same ISA IRQ line. The common conflict is with a sound card on IRQ10
-or IRQ5, and the easiest solution is to move the 3c509 to a different
-interrupt line. If the device is receiving packets but 'ping' doesn't work,
-you have a routing problem.
-
-Tx Carrier Errors Reported in /proc/net/dev
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-
-If an EtherLink III appears to transmit packets, but the "Tx carrier errors"
-field in /proc/net/dev increments as quickly as the Tx packet count, you
-likely have an unterminated network or the incorrect media transceiver selected.
-
-3c509B card is not detected on machines with an ISA PnP BIOS.
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-While the updated driver works with most PnP BIOS programs, it does not work
-with all. This can be fixed by disabling PnP support using the 3Com-supplied
-setup program.
-
-3c509 card is not detected on overclocked machines
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Increase the delay time in id_read_eeprom() from the current value, 500,
-to an absurdly high value, such as 5000.
-
-
-Decoding Status and Error Messages
-----------------------------------
-
-
-The bits in the main status register are:
-
-=====	======================================
-value 	description
-=====	======================================
-0x01 	Interrupt latch
-0x02 	Tx overrun, or Rx underrun
-0x04 	Tx complete
-0x08 	Tx FIFO room available
-0x10 	A complete Rx packet has arrived
-0x20 	A Rx packet has started to arrive
-0x40 	The driver has requested an interrupt
-0x80 	Statistics counter nearly full
-=====	======================================
-
-The bits in the transmit (Tx) status word are:
-
-=====	============================================
-value	description
-=====	============================================
-0x02	Out-of-window collision.
-0x04	Status stack overflow (normally impossible).
-0x08	16 collisions.
-0x10	Tx underrun (not enough PCI bus bandwidth).
-0x20	Tx jabber.
-0x40	Tx interrupt requested.
-0x80	Status is valid (this should always be set).
-=====	============================================
-
-
-When a transmit error occurs the driver produces a status message such as::
-
-   eth0: Transmit error, Tx status register 82
-
-The two values typically seen here are:
-
-0x82
-^^^^
-
-Out of window collision. This typically occurs when some other Ethernet
-host is incorrectly set to full duplex on a half duplex network.
-
-0x88
-^^^^
-
-16 collisions. This typically occurs when the network is exceptionally busy
-or when another host doesn't correctly back off after a collision. If this
-error is mixed with 0x82 errors it is the result of a host incorrectly set
-to full duplex (see above).
-
-Both of these errors are the result of network problems that should be
-corrected. They do not represent driver malfunction.
-
-
-Revision history (this file)
-============================
-
-28Feb02 v1.0  DR   New; major portions based on Becker original 3c509 docs
-
drivers/net/ethernet/3com/3c509.c deleted +0 -1448

1,448 lines not on this page · raw message

drivers/net/ethernet/3com/Kconfig +0 -14
index 1fbab79e2be4..c05a1b63c1c9 100644
@@ -17,20 +17,6 @@ config NET_VENDOR_3COM
 
 if NET_VENDOR_3COM
 
-config EL3
-	tristate "3c509/3c579 \"EtherLink III\" support"
-	depends on (ISA || EISA)
-	help
-	  If you have a network (Ethernet) card belonging to the 3Com
-	  EtherLinkIII series, say Y here.
-
-	  If your card is not working you may need to use the DOS
-	  setup disk to disable Plug & Play mode, and to select the default
-	  media type.
-
-	  To compile this driver as a module, choose M here. The module
-	  will be called 3c509.
-
 config 3C515
 	tristate "3c515 ISA \"Fast EtherLink\""
 	depends on ISA && ISA_DMA_API && !PPC32
drivers/net/ethernet/3com/Makefile +0 -1
index f8b73babc510..f7623fa2d441 100644
@@ -3,7 +3,6 @@
 # Makefile for the 3Com Ethernet device drivers
 #
 
-obj-$(CONFIG_EL3) += 3c509.o
 obj-$(CONFIG_3C515) += 3c515.o
 obj-$(CONFIG_PCMCIA_3C589) += 3c589_cs.o
 obj-$(CONFIG_PCMCIA_3C574) += 3c574_cs.o
Signature · 1 line
2.53.0
#2 lore raw

PATCH v2 2/15 drivers: net: 3com: 3c515: Remove this driver

In reply to Andrew Lunn

The 3c515 was written by Donald Becker between 1997-1998. It is an ISA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/3com/3c515.c  | 1566 ------------------------------------
 drivers/net/ethernet/3com/Kconfig  |   11 -
 drivers/net/ethernet/3com/Makefile |    1 -
 3 files changed, 1578 deletions(-)
drivers/net/ethernet/3com/3c515.c deleted +0 -1566
deleted file mode 100644
index 2227c83a4862..000000000000
@@ -1,1566 +0,0 @@
-/*
-	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 [email protected], 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 <[email protected]> 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 ([email protected])
-
-*/
-
-#define DRV_NAME		"3c515"
-
-#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;
-
-/* 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/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/skbuff.h>
-#include <linux/etherdevice.h>
-#include <linux/interrupt.h>
-#include <linux/timer.h>
-#include <linux/ethtool.h>
-#include <linux/bitops.h>
-#include <linux/uaccess.h>
-
-#include <net/Space.h>
-
-#include <asm/io.h>
-#include <asm/dma.h>
-
-#define NEW_MULTICAST
-#include <linux/delay.h>
-
-#define MAX_UNITS 8
-
-MODULE_AUTHOR("Donald Becker <[email protected]>");
-MODULE_DESCRIPTION("3Com 3c515 Corkscrew driver");
-MODULE_LICENSE("GPL");
-
-/* "Knobs" for adjusting internal parameters. */
-/* Put out somewhat more debugging messages. (0 - no msg, 1 minimal msgs). */
-#define DRIVER_DEBUG 1
-/* Some values here only for performance evaluation and path-coverage
-   debugging. */
-static int rx_nocopy, rx_copy, queued_packet;
-
-/* Number of times to check to see if the Tx FIFO has space, used in some
-   limited cases. */
-#define WAIT_TX_AVAIL 200
-
-/* Operational parameter that usually are not changed. */
-#define TX_TIMEOUT  ((4*HZ)/10)	/* Time in jiffies before concluding Tx hung */
-
-/* The size here is somewhat misleading: the Corkscrew also uses the ISA
-   aliased registers at <base>+0x400.
-   */
-#define CORKSCREW_TOTAL_SIZE 0x20
-
-#ifdef DRIVER_DEBUG
-static int corkscrew_debug = DRIVER_DEBUG;
-#else
-static int corkscrew_debug = 1;
-#endif
-
-#define CORKSCREW_ID 10
-
-/*
-				Theory of Operation
-
-I. Board Compatibility
-
-This device driver is designed for the 3Com 3c515 ISA Fast EtherLink XL,
-3Com's ISA bus adapter for Fast Ethernet.  Due to the unique I/O port layout,
-it's not practical to integrate this driver with the other EtherLink drivers.
-
-II. Board-specific settings
-
-The Corkscrew has an EEPROM for configuration, but no special settings are
-needed for Linux.
-
-III. Driver operation
-
-The 3c515 series use an interface that's very similar to the 3c900 "Boomerang"
-PCI cards, with the bus master interface extensively modified to work with
-the ISA bus.
-
-The card is capable of full-bus-master transfers with separate
-lists of transmit and receive descriptors, similar to the AMD LANCE/PCnet,
-DEC Tulip and Intel Speedo3.
-
-This driver uses a "RX_COPYBREAK" scheme rather than a fixed intermediate
-receive buffer.  This scheme allocates full-sized skbuffs as receive
-buffers.  The value RX_COPYBREAK is used as the copying breakpoint: it is
-chosen to trade-off the memory wasted by passing the full-sized skbuff to
-the queue layer for all frames vs. the copying cost of copying a frame to a
-correctly-sized skbuff.
-
-
-IIIC. Synchronization
-The driver runs as two independent, single-threaded flows of control.  One
-is the send-packet routine, which enforces single-threaded use by the netif
-layer.  The other thread is the interrupt handler, which is single
-threaded by the hardware and other software.
-
-IV. Notes
-
-Thanks to Terry Murphy of 3Com for providing documentation and a development
-board.
-
-The names "Vortex", "Boomerang" and "Corkscrew" are the internal 3Com
-project names.  I use these names to eliminate confusion -- 3Com product
-numbers and names are very similar and often confused.
-
-The new chips support both ethernet (1.5K) and FDDI (4.5K) frame sizes!
-This driver only supports ethernet frames because of the recent MTU limit
-of 1.5K, but the changes to support 4.5K are minimal.
-*/
-
-/* Operational definitions.
-   These are not used by other compilation units and thus are not
-   exported in a ".h" file.
-
-   First the windows.  There are eight register windows, with the command
-   and status registers available in each.
-   */
-#define EL3WINDOW(win_num) outw(SelectWindow + (win_num), ioaddr + EL3_CMD)
-#define EL3_CMD 0x0e
-#define EL3_STATUS 0x0e
-
-/* The top five bits written to EL3_CMD are a command, the lower
-   11 bits are the parameter, if applicable.
-   Note that 11 parameters bits was fine for ethernet, but the new chips
-   can handle FDDI length frames (~4500 octets) and now parameters count
-   32-bit 'Dwords' rather than octets. */
-
-enum corkscrew_cmd {
-	TotalReset = 0 << 11, SelectWindow = 1 << 11, StartCoax = 2 << 11,
-	RxDisable = 3 << 11, RxEnable = 4 << 11, RxReset = 5 << 11,
-	UpStall = 6 << 11, UpUnstall = (6 << 11) + 1, DownStall = (6 << 11) + 2,
-	DownUnstall = (6 << 11) + 3, RxDiscard = 8 << 11, TxEnable = 9 << 11,
-	TxDisable = 10 << 11, TxReset = 11 << 11, FakeIntr = 12 << 11,
-	AckIntr = 13 << 11, SetIntrEnb = 14 << 11, SetStatusEnb = 15 << 11,
-	SetRxFilter = 16 << 11, SetRxThreshold = 17 << 11,
-	SetTxThreshold = 18 << 11, SetTxStart = 19 << 11, StartDMAUp = 20 << 11,
-	StartDMADown = (20 << 11) + 1, StatsEnable = 21 << 11,
-	StatsDisable = 22 << 11, StopCoax = 23 << 11,
-};
-
-/* The SetRxFilter command accepts the following classes: */
-enum RxFilter {
-	RxStation = 1, RxMulticast = 2, RxBroadcast = 4, RxProm = 8
-};
-
-/* Bits in the general status register. */
-enum corkscrew_status {
-	IntLatch = 0x0001, AdapterFailure = 0x0002, TxComplete = 0x0004,
-	TxAvailable = 0x0008, RxComplete = 0x0010, RxEarly = 0x0020,
-	IntReq = 0x0040, StatsFull = 0x0080,
-	DMADone = 1 << 8, DownComplete = 1 << 9, UpComplete = 1 << 10,
-	DMAInProgress = 1 << 11,	/* DMA controller is still busy. */
-	CmdInProgress = 1 << 12,	/* EL3_CMD is still busy. */
-};
-
-/* Register window 1 offsets, the window used in normal operation.
-   On the Corkscrew this window is always mapped at offsets 0x10-0x1f. */
-enum Window1 {
-	TX_FIFO = 0x10, RX_FIFO = 0x10, RxErrors = 0x14,
-	RxStatus = 0x18, Timer = 0x1A, TxStatus = 0x1B,
-	TxFree = 0x1C,		/* Remaining free bytes in Tx buffer. */
-};
-enum Window0 {
-	Wn0IRQ = 0x08,
-#if defined(CORKSCREW)
-	Wn0EepromCmd = 0x200A,	/* Corkscrew EEPROM command register. */
-	Wn0EepromData = 0x200C,	/* Corkscrew EEPROM results register. */
-#else
-	Wn0EepromCmd = 10,	/* Window 0: EEPROM command register. */
-	Wn0EepromData = 12,	/* Window 0: EEPROM results register. */
-#endif
-};
-enum Win0_EEPROM_bits {
-	EEPROM_Read = 0x80, EEPROM_WRITE = 0x40, EEPROM_ERASE = 0xC0,
-	EEPROM_EWENB = 0x30,	/* Enable erasing/writing for 10 msec. */
-	EEPROM_EWDIS = 0x00,	/* Disable EWENB before 10 msec timeout. */
-};
-
-/* EEPROM locations. */
-enum eeprom_offset {
-	PhysAddr01 = 0, PhysAddr23 = 1, PhysAddr45 = 2, ModelID = 3,
-	EtherLink3ID = 7,
-};
-
-enum Window3 {			/* Window 3: MAC/config bits. */
-	Wn3_Config = 0, Wn3_MAC_Ctrl = 6, Wn3_Options = 8,
-};
-enum wn3_config {
-	Ram_size = 7,
-	Ram_width = 8,
-	Ram_speed = 0x30,
-	Rom_size = 0xc0,
-	Ram_split_shift = 16,
-	Ram_split = 3 << Ram_split_shift,
-	Xcvr_shift = 20,
-	Xcvr = 7 << Xcvr_shift,
-	Autoselect = 0x1000000,
-};
-
-enum Window4 {
-	Wn4_NetDiag = 6, Wn4_Media = 10,	/* Window 4: Xcvr/media bits. */
-};
-enum Win4_Media_bits {
-	Media_SQE = 0x0008,	/* Enable SQE error counting for AUI. */
-	Media_10TP = 0x00C0,	/* Enable link beat and jabber for 10baseT. */
-	Media_Lnk = 0x0080,	/* Enable just link beat for 100TX/100FX. */
-	Media_LnkBeat = 0x0800,
-};
-enum Window7 {			/* Window 7: Bus Master control. */
-	Wn7_MasterAddr = 0, Wn7_MasterLen = 6, Wn7_MasterStatus = 12,
-};
-
-/* Boomerang-style bus master control registers.  Note ISA aliases! */
-enum MasterCtrl {
-	PktStatus = 0x400, DownListPtr = 0x404, FragAddr = 0x408, FragLen =
-	    0x40c,
-	TxFreeThreshold = 0x40f, UpPktStatus = 0x410, UpListPtr = 0x418,
-};
-
-/* The Rx and Tx descriptor lists.
-   Caution Alpha hackers: these types are 32 bits!  Note also the 8 byte
-   alignment contraint on tx_ring[] and rx_ring[]. */
-struct boom_rx_desc {
-	u32 next;
-	s32 status;
-	u32 addr;
-	s32 length;
-};
-
-/* Values for the Rx status entry. */
-enum rx_desc_status {
-	RxDComplete = 0x00008000, RxDError = 0x4000,
-	/* See boomerang_rx() for actual error bits */
-};
-
-struct boom_tx_desc {
-	u32 next;
-	s32 status;
-	u32 addr;
-	s32 length;
-};
-
-struct corkscrew_private {
-	const char *product_name;
-	struct list_head list;
-	struct net_device *our_dev;
-	/* The Rx and Tx rings are here to keep them quad-word-aligned. */
-	struct boom_rx_desc rx_ring[RX_RING_SIZE];
-	struct boom_tx_desc tx_ring[TX_RING_SIZE];
-	/* The addresses of transmit- and receive-in-place skbuffs. */
-	struct sk_buff *rx_skbuff[RX_RING_SIZE];
-	struct sk_buff *tx_skbuff[TX_RING_SIZE];
-	unsigned int cur_rx, cur_tx;	/* The next free ring entry */
-	unsigned int dirty_rx, dirty_tx;/* The ring entries to be free()ed. */
-	struct sk_buff *tx_skb;	/* Packet being eaten by bus master ctrl.  */
-	struct timer_list timer;	/* Media selection timer. */
-	int capabilities	;	/* Adapter capabilities word. */
-	int options;			/* User-settable misc. driver options. */
-	int last_rx_packets;		/* For media autoselection. */
-	unsigned int available_media:8,	/* From Wn3_Options */
-		media_override:3,	/* Passed-in media type. */
-		default_media:3,	/* Read from the EEPROM. */
-		full_duplex:1, autoselect:1, bus_master:1,	/* Vortex can only do a fragment bus-m. */
-		full_bus_master_tx:1, full_bus_master_rx:1,	/* Boomerang  */
-		tx_full:1;
-	spinlock_t lock;
-	struct device *dev;
-};
-
-/* The action to take with a media selection timer tick.
-   Note that we deviate from the 3Com order by checking 10base2 before AUI.
- */
-enum xcvr_types {
-	XCVR_10baseT = 0, XCVR_AUI, XCVR_10baseTOnly, XCVR_10base2, XCVR_100baseTx,
-	XCVR_100baseFx, XCVR_MII = 6, XCVR_Default = 8,
-};
-
-static struct media_table {
-	char *name;
-	unsigned int media_bits:16,	/* Bits to set in Wn4_Media register. */
-		mask:8,			/* The transceiver-present bit in Wn3_Config. */
-		next:8;			/* The media type to try next. */
-	short wait;			/* Time before we check media status. */
-} media_tbl[] = {
-	{ "10baseT", Media_10TP, 0x08, XCVR_10base2, (14 * HZ) / 10 },
-	{ "10Mbs AUI", Media_SQE, 0x20, XCVR_Default, (1 * HZ) / 10},
-	{ "undefined", 0, 0x80, XCVR_10baseT, 10000},
-	{ "10base2", 0, 0x10, XCVR_AUI, (1 * HZ) / 10},
-	{ "100baseTX", Media_Lnk, 0x02, XCVR_100baseFx, (14 * HZ) / 10},
-	{ "100baseFX", Media_Lnk, 0x04, XCVR_MII, (14 * HZ) / 10},
-	{ "MII", 0, 0x40, XCVR_10baseT, 3 * HZ},
-	{ "undefined", 0, 0x01, XCVR_10baseT, 10000},
-	{ "Default", 0, 0xFF, XCVR_10baseT, 10000},
-};
-
-#ifdef __ISAPNP__
-static struct isapnp_device_id corkscrew_isapnp_adapters[] = {
-	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5051),
-		(long) "3Com Fast EtherLink ISA" },
-	{ }	/* terminate list */
-};
-
-MODULE_DEVICE_TABLE(isapnp, corkscrew_isapnp_adapters);
-
-static int nopnp;
-#endif /* __ISAPNP__ */
-
-static struct net_device *corkscrew_scan(int unit);
-static int corkscrew_setup(struct net_device *dev, int ioaddr,
-			    struct pnp_dev *idev, int card_number);
-static int corkscrew_open(struct net_device *dev);
-static void corkscrew_timer(struct timer_list *t);
-static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb,
-					struct net_device *dev);
-static int corkscrew_rx(struct net_device *dev);
-static void corkscrew_timeout(struct net_device *dev, unsigned int txqueue);
-static int boomerang_rx(struct net_device *dev);
-static irqreturn_t corkscrew_interrupt(int irq, void *dev_id);
-static int corkscrew_close(struct net_device *dev);
-static void update_stats(int addr, struct net_device *dev);
-static struct net_device_stats *corkscrew_get_stats(struct net_device *dev);
-static void set_rx_mode(struct net_device *dev);
-static const struct ethtool_ops netdev_ethtool_ops;
-
-
-/*
-   Unfortunately maximizing the shared code between the integrated and
-   module version of the driver results in a complicated set of initialization
-   procedures.
-   init_module() -- modules /  tc59x_init()  -- built-in
-		The wrappers for corkscrew_scan()
-   corkscrew_scan()  		 The common routine that scans for PCI and EISA cards
-   corkscrew_found_device() Allocate a device structure when we find a card.
-					Different versions exist for modules and built-in.
-   corkscrew_probe1()		Fill in the device structure -- this is separated
-					so that the modules code can put it in dev->init.
-*/
-/* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
-/* Note: this is the only limit on the number of cards supported!! */
-static int options[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1, };
-
-#ifdef MODULE
-static int debug = -1;
-
-module_param(debug, int, 0);
-module_param_array(options, int, NULL, 0);
-module_param(rx_copybreak, int, 0);
-module_param(max_interrupt_work, int, 0);
-MODULE_PARM_DESC(debug, "3c515 debug level (0-6)");
-MODULE_PARM_DESC(options, "3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: bus mastering");
-MODULE_PARM_DESC(rx_copybreak, "3c515 copy breakpoint for copy-only-tiny-frames");
-MODULE_PARM_DESC(max_interrupt_work, "3c515 maximum events handled per interrupt");
-
-/* A list of all installed Vortex devices, for removing the driver module. */
-/* we will need locking (and refcounting) if we ever use it for more */
-static LIST_HEAD(root_corkscrew_dev);
-
-static int corkscrew_init_module(void)
-{
-	int found = 0;
-	if (debug >= 0)
-		corkscrew_debug = debug;
-	while (corkscrew_scan(-1))
-		found++;
-	return found ? 0 : -ENODEV;
-}
-module_init(corkscrew_init_module);
-
-#else
-struct net_device *tc515_probe(int unit)
-{
-	struct net_device *dev = corkscrew_scan(unit);
-
-	if (!dev)
-		return ERR_PTR(-ENODEV);
-
-	return dev;
-}
-#endif				/* not MODULE */
-
-static int check_device(unsigned ioaddr)
-{
-	int timer;
-
-	if (!request_region(ioaddr, CORKSCREW_TOTAL_SIZE, "3c515"))
-		return 0;
-	/* Check the resource configuration for a matching ioaddr. */
-	if ((inw(ioaddr + 0x2002) & 0x1f0) != (ioaddr & 0x1f0)) {
-		release_region(ioaddr, CORKSCREW_TOTAL_SIZE);
-		return 0;
-	}
-	/* Verify by reading the device ID from the EEPROM. */
-	outw(EEPROM_Read + 7, ioaddr + Wn0EepromCmd);
-	/* Pause for at least 162 us. for the read to take place. */
-	for (timer = 4; timer >= 0; timer--) {
-		udelay(162);
-		if ((inw(ioaddr + Wn0EepromCmd) & 0x0200) == 0)
-			break;
-	}
-	if (inw(ioaddr + Wn0EepromData) != 0x6d50) {
-		release_region(ioaddr, CORKSCREW_TOTAL_SIZE);
-		return 0;
-	}
-	return 1;
-}
-
-static void cleanup_card(struct net_device *dev)
-{
-	struct corkscrew_private *vp = netdev_priv(dev);
-	list_del_init(&vp->list);
-	if (dev->dma)
-		free_dma(dev->dma);
-	outw(TotalReset, dev->base_addr + EL3_CMD);
-	release_region(dev->base_addr, CORKSCREW_TOTAL_SIZE);
-	if (vp->dev)
-		pnp_device_detach(to_pnp_dev(vp->dev));
-}
-
-static struct net_device *corkscrew_scan(int unit)
-{
-	struct net_device *dev;
-	static int cards_found = 0;
-	static int ioaddr;
-	int err;
-#ifdef __ISAPNP__
-	short i;
-	static int pnp_cards;
-#endif
-
-	dev = alloc_etherdev(sizeof(struct corkscrew_private));
-	if (!dev)
-		return ERR_PTR(-ENOMEM);
-
-	if (unit >= 0) {
-		sprintf(dev->name, "eth%d", unit);
-		netdev_boot_setup_check(dev);
-	}
-
-#ifdef __ISAPNP__
-	if(nopnp == 1)
-		goto no_pnp;
-	for(i=0; corkscrew_isapnp_adapters[i].vendor != 0; i++) {
-		struct pnp_dev *idev = NULL;
-		int irq;
-		while((idev = pnp_find_dev(NULL,
-					   corkscrew_isapnp_adapters[i].vendor,
-					   corkscrew_isapnp_adapters[i].function,
-					   idev))) {
-
-			if (pnp_device_attach(idev) < 0)
-				continue;
-			if (pnp_activate_dev(idev) < 0) {
-				pr_warn("pnp activate failed (out of resources?)\n");
-				pnp_device_detach(idev);
-				continue;
-			}
-			if (!pnp_port_valid(idev, 0) || !pnp_irq_valid(idev, 0)) {
-				pnp_device_detach(idev);
-				continue;
-			}
-			ioaddr = pnp_port_start(idev, 0);
-			irq = pnp_irq(idev, 0);
-			if (!check_device(ioaddr)) {
-				pnp_device_detach(idev);
-				continue;
-			}
-			if(corkscrew_debug)
-				pr_debug("ISAPNP reports %s at i/o 0x%x, irq %d\n",
-					(char*) corkscrew_isapnp_adapters[i].driver_data, ioaddr, irq);
-			pr_info("3c515 Resource configuration register %#4.4x, DCR %4.4x.\n",
-		     		inl(ioaddr + 0x2002), inw(ioaddr + 0x2000));
-			/* irq = inw(ioaddr + 0x2002) & 15; */ /* Use the irq from isapnp */
-			SET_NETDEV_DEV(dev, &idev->dev);
-			pnp_cards++;
-			err = corkscrew_setup(dev, ioaddr, idev, cards_found++);
-			if (!err)
-				return dev;
-			cleanup_card(dev);
-		}
-	}
-no_pnp:
-#endif /* __ISAPNP__ */
-
-	/* Check all locations on the ISA bus -- evil! */
-	for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x20) {
-		if (!check_device(ioaddr))
-			continue;
-
-		pr_info("3c515 Resource configuration register %#4.4x, DCR %4.4x.\n",
-		     inl(ioaddr + 0x2002), inw(ioaddr + 0x2000));
-		err = corkscrew_setup(dev, ioaddr, NULL, cards_found++);
-		if (!err)
-			return dev;
-		cleanup_card(dev);
-	}
-	free_netdev(dev);
-	return NULL;
-}
-
-
-static const struct net_device_ops netdev_ops = {
-	.ndo_open		= corkscrew_open,
-	.ndo_stop		= corkscrew_close,
-	.ndo_start_xmit		= corkscrew_start_xmit,
-	.ndo_tx_timeout		= corkscrew_timeout,
-	.ndo_get_stats		= corkscrew_get_stats,
-	.ndo_set_rx_mode	= set_rx_mode,
-	.ndo_set_mac_address 	= eth_mac_addr,
-	.ndo_validate_addr	= eth_validate_addr,
-};
-
-
-static int corkscrew_setup(struct net_device *dev, int ioaddr,
-			    struct pnp_dev *idev, int card_number)
-{
-	struct corkscrew_private *vp = netdev_priv(dev);
-	unsigned int eeprom[0x40], checksum = 0;	/* EEPROM contents */
-	__be16 addr[ETH_ALEN / 2];
-	int i;
-	int irq;
-
-#ifdef __ISAPNP__
-	if (idev) {
-		irq = pnp_irq(idev, 0);
-		vp->dev = &idev->dev;
-	} else {
-		irq = inw(ioaddr + 0x2002) & 15;
-	}
-#else
-	irq = inw(ioaddr + 0x2002) & 15;
-#endif
-
-	dev->base_addr = ioaddr;
-	dev->irq = irq;
-	dev->dma = inw(ioaddr + 0x2000) & 7;
-	vp->product_name = "3c515";
-	vp->options = dev->mem_start;
-	vp->our_dev = dev;
-
-	if (!vp->options) {
-		 if (card_number >= MAX_UNITS)
-			vp->options = -1;
-		else
-			vp->options = options[card_number];
-	}
-
-	if (vp->options >= 0) {
-		vp->media_override = vp->options & 7;
-		if (vp->media_override == 2)
-			vp->media_override = 0;
-		vp->full_duplex = (vp->options & 8) ? 1 : 0;
-		vp->bus_master = (vp->options & 16) ? 1 : 0;
-	} else {
-		vp->media_override = 7;
-		vp->full_duplex = 0;
-		vp->bus_master = 0;
-	}
-#ifdef MODULE
-	list_add(&vp->list, &root_corkscrew_dev);
-#endif
-
-	pr_info("%s: 3Com %s at %#3x,", dev->name, vp->product_name, ioaddr);
-
-	spin_lock_init(&vp->lock);
-
-	timer_setup(&vp->timer, corkscrew_timer, 0);
-
-	/* Read the station address from the EEPROM. */
-	EL3WINDOW(0);
-	for (i = 0; i < 0x18; i++) {
-		int timer;
-		outw(EEPROM_Read + i, ioaddr + Wn0EepromCmd);
-		/* Pause for at least 162 us. for the read to take place. */
-		for (timer = 4; timer >= 0; timer--) {
-			udelay(162);
-			if ((inw(ioaddr + Wn0EepromCmd) & 0x0200) == 0)
-				break;
-		}
-		eeprom[i] = inw(ioaddr + Wn0EepromData);
-		checksum ^= eeprom[i];
-		if (i < 3)
-			addr[i] = htons(eeprom[i]);
-	}
-	eth_hw_addr_set(dev, (u8 *)addr);
-	checksum = (checksum ^ (checksum >> 8)) & 0xff;
-	if (checksum != 0x00)
-		pr_cont(" ***INVALID CHECKSUM %4.4x*** ", checksum);
-	pr_cont(" %pM", dev->dev_addr);
-	if (eeprom[16] == 0x11c7) {	/* Corkscrew */
-		if (request_dma(dev->dma, "3c515")) {
-			pr_cont(", DMA %d allocation failed", dev->dma);
-			dev->dma = 0;
-		} else
-			pr_cont(", DMA %d", dev->dma);
-	}
-	pr_cont(", IRQ %d\n", dev->irq);
-	/* Tell them about an invalid IRQ. */
-	if (corkscrew_debug && (dev->irq <= 0 || dev->irq > 15))
-		pr_warn(" *** Warning: this IRQ is unlikely to work! ***\n");
-
-	{
-		static const char * const ram_split[] = {
-			"5:3", "3:1", "1:1", "3:5"
-		};
-		__u32 config;
-		EL3WINDOW(3);
-		vp->available_media = inw(ioaddr + Wn3_Options);
-		config = inl(ioaddr + Wn3_Config);
-		if (corkscrew_debug > 1)
-			pr_info("  Internal config register is %4.4x, transceivers %#x.\n",
-				config, inw(ioaddr + Wn3_Options));
-		pr_info("  %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n",
-			8 << config & Ram_size,
-			config & Ram_width ? "word" : "byte",
-			ram_split[(config & Ram_split) >> Ram_split_shift],
-			config & Autoselect ? "autoselect/" : "",
-			media_tbl[(config & Xcvr) >> Xcvr_shift].name);
-		vp->default_media = (config & Xcvr) >> Xcvr_shift;
-		vp->autoselect = config & Autoselect ? 1 : 0;
-		dev->if_port = vp->default_media;
-	}
-	if (vp->media_override != 7) {
-		pr_info("  Media override to transceiver type %d (%s).\n",
-		       vp->media_override,
-		       media_tbl[vp->media_override].name);
-		dev->if_port = vp->media_override;
-	}
-
-	vp->capabilities = eeprom[16];
-	vp->full_bus_master_tx = (vp->capabilities & 0x20) ? 1 : 0;
-	/* Rx is broken at 10mbps, so we always disable it. */
-	/* vp->full_bus_master_rx = 0; */
-	vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0;
-
-	/* The 3c51x-specific entries in the device structure. */
-	dev->netdev_ops = &netdev_ops;
-	dev->watchdog_timeo = (400 * HZ) / 1000;
-	dev->ethtool_ops = &netdev_ethtool_ops;
-
-	return register_netdev(dev);
-}
-
-
-static int corkscrew_open(struct net_device *dev)
-{
-	int ioaddr = dev->base_addr;
-	struct corkscrew_private *vp = netdev_priv(dev);
-	bool armtimer = false;
-	__u32 config;
-	int i;
-
-	/* Before initializing select the active media port. */
-	EL3WINDOW(3);
-	if (vp->full_duplex)
-		outb(0x20, ioaddr + Wn3_MAC_Ctrl);	/* Set the full-duplex bit. */
-	config = inl(ioaddr + Wn3_Config);
-
-	if (vp->media_override != 7) {
-		if (corkscrew_debug > 1)
-			pr_info("%s: Media override to transceiver %d (%s).\n",
-				dev->name, vp->media_override,
-				media_tbl[vp->media_override].name);
-		dev->if_port = vp->media_override;
-	} else if (vp->autoselect) {
-		/* Find first available media type, starting with 100baseTx. */
-		dev->if_port = 4;
-		while (!(vp->available_media & media_tbl[dev->if_port].mask))
-			dev->if_port = media_tbl[dev->if_port].next;
-
-		if (corkscrew_debug > 1)
-			pr_debug("%s: Initial media type %s.\n",
-			       dev->name, media_tbl[dev->if_port].name);
-		armtimer = true;
-	} else
-		dev->if_port = vp->default_media;
-
-	config = (config & ~Xcvr) | (dev->if_port << Xcvr_shift);
-	outl(config, ioaddr + Wn3_Config);
-
-	if (corkscrew_debug > 1) {
-		pr_debug("%s: corkscrew_open() InternalConfig %8.8x.\n",
-		       dev->name, config);
-	}
-
-	outw(TxReset, ioaddr + EL3_CMD);
-	for (i = 20; i >= 0; i--)
-		if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress))
-			break;
-
-	outw(RxReset, ioaddr + EL3_CMD);
-	/* Wait a few ticks for the RxReset command to complete. */
-	for (i = 20; i >= 0; i--)
-		if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress))
-			break;
-
-	outw(SetStatusEnb | 0x00, ioaddr + EL3_CMD);
-
-	/* Use the now-standard shared IRQ implementation. */
-	if (vp->capabilities == 0x11c7) {
-		/* Corkscrew: Cannot share ISA resources. */
-		if (dev->irq == 0 ||
-		    dev->dma == 0 ||
-		    request_irq(dev->irq, corkscrew_interrupt, 0,
-				vp->product_name, dev))
-			return -EAGAIN;
-		enable_dma(dev->dma);
-		set_dma_mode(dev->dma, DMA_MODE_CASCADE);
-	} else if (request_irq(dev->irq, corkscrew_interrupt, IRQF_SHARED,
-			       vp->product_name, dev)) {
-		return -EAGAIN;
-	}
-
-	if (armtimer)
-		mod_timer(&vp->timer, jiffies + media_tbl[dev->if_port].wait);
-
-	if (corkscrew_debug > 1) {
-		EL3WINDOW(4);
-		pr_debug("%s: corkscrew_open() irq %d media status %4.4x.\n",
-		       dev->name, dev->irq, inw(ioaddr + Wn4_Media));
-	}
-
-	/* Set the station address and mask in window 2 each time opened. */
-	EL3WINDOW(2);
-	for (i = 0; i < 6; i++)
-		outb(dev->dev_addr[i], ioaddr + i);
-	for (; i < 12; i += 2)
-		outw(0, ioaddr + i);
-
-	if (dev->if_port == 3)
-		/* Start the thinnet transceiver. We should really wait 50ms... */
-		outw(StartCoax, ioaddr + EL3_CMD);
-	EL3WINDOW(4);
-	outw((inw(ioaddr + Wn4_Media) & ~(Media_10TP | Media_SQE)) |
-	     media_tbl[dev->if_port].media_bits, ioaddr + Wn4_Media);
-
-	/* Switch to the stats window, and clear all stats by reading. */
-	outw(StatsDisable, ioaddr + EL3_CMD);
-	EL3WINDOW(6);
-	for (i = 0; i < 10; i++)
-		inb(ioaddr + i);
-	inw(ioaddr + 10);
-	inw(ioaddr + 12);
-	/* New: On the Vortex we must also clear the BadSSD counter. */
-	EL3WINDOW(4);
-	inb(ioaddr + 12);
-	/* ..and on the Boomerang we enable the extra statistics bits. */
-	outw(0x0040, ioaddr + Wn4_NetDiag);
-
-	/* Switch to register set 7 for normal use. */
-	EL3WINDOW(7);
-
-	if (vp->full_bus_master_rx) {	/* Boomerang bus master. */
-		vp->cur_rx = vp->dirty_rx = 0;
-		if (corkscrew_debug > 2)
-			pr_debug("%s:  Filling in the Rx ring.\n", dev->name);
-		for (i = 0; i < RX_RING_SIZE; i++) {
-			struct sk_buff *skb;
-			if (i < (RX_RING_SIZE - 1))
-				vp->rx_ring[i].next =
-				    isa_virt_to_bus(&vp->rx_ring[i + 1]);
-			else
-				vp->rx_ring[i].next = 0;
-			vp->rx_ring[i].status = 0;	/* Clear complete bit. */
-			vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000;
-			skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
-			vp->rx_skbuff[i] = skb;
-			if (skb == NULL)
-				break;	/* Bad news!  */
-			skb_reserve(skb, 2);	/* Align IP on 16 byte boundaries */
-			vp->rx_ring[i].addr = isa_virt_to_bus(skb->data);
-		}
-		if (i != 0)
-			vp->rx_ring[i - 1].next =
-				isa_virt_to_bus(&vp->rx_ring[0]);	/* Wrap the ring. */
-		outl(isa_virt_to_bus(&vp->rx_ring[0]), ioaddr + UpListPtr);
-	}
-	if (vp->full_bus_master_tx) {	/* Boomerang bus master Tx. */
-		vp->cur_tx = vp->dirty_tx = 0;
-		outb(PKT_BUF_SZ >> 8, ioaddr + TxFreeThreshold);	/* Room for a packet. */
-		/* Clear the Tx ring. */
-		for (i = 0; i < TX_RING_SIZE; i++)
-			vp->tx_skbuff[i] = NULL;
-		outl(0, ioaddr + DownListPtr);
-	}
-	/* Set receiver mode: presumably accept b-case and phys addr only. */
-	set_rx_mode(dev);
-	outw(StatsEnable, ioaddr + EL3_CMD);	/* Turn on statistics. */
-
-	netif_start_queue(dev);
-
-	outw(RxEnable, ioaddr + EL3_CMD);	/* Enable the receiver. */
-	outw(TxEnable, ioaddr + EL3_CMD);	/* Enable transmitter. */
-	/* Allow status bits to be seen. */
-	outw(SetStatusEnb | AdapterFailure | IntReq | StatsFull |
-	     (vp->full_bus_master_tx ? DownComplete : TxAvailable) |
-	     (vp->full_bus_master_rx ? UpComplete : RxComplete) |
-	     (vp->bus_master ? DMADone : 0), ioaddr + EL3_CMD);
-	/* Ack all pending events, and set active indicator mask. */
-	outw(AckIntr | IntLatch | TxAvailable | RxEarly | IntReq,
-	     ioaddr + EL3_CMD);
-	outw(SetIntrEnb | IntLatch | TxAvailable | RxComplete | StatsFull
-	     | (vp->bus_master ? DMADone : 0) | UpComplete | DownComplete,
-	     ioaddr + EL3_CMD);
-
-	return 0;
-}
-
-static void corkscrew_timer(struct timer_list *t)
-{
-#ifdef AUTOMEDIA
-	struct corkscrew_private *vp = timer_container_of(vp, t, timer);
-	struct net_device *dev = vp->our_dev;
-	int ioaddr = dev->base_addr;
-	unsigned long flags;
-	int ok = 0;
-
-	if (corkscrew_debug > 1)
-		pr_debug("%s: Media selection timer tick happened, %s.\n",
-		       dev->name, media_tbl[dev->if_port].name);
-
-	spin_lock_irqsave(&vp->lock, flags);
-
-	{
-		int old_window = inw(ioaddr + EL3_CMD) >> 13;
-		int media_status;
-		EL3WINDOW(4);
-		media_status = inw(ioaddr + Wn4_Media);
-		switch (dev->if_port) {
-		case 0:
-		case 4:
-		case 5:	/* 10baseT, 100baseTX, 100baseFX  */
-			if (media_status & Media_LnkBeat) {
-				ok = 1;
-				if (corkscrew_debug > 1)
-					pr_debug("%s: Media %s has link beat, %x.\n",
-						dev->name,
-						media_tbl[dev->if_port].name,
-						media_status);
-			} else if (corkscrew_debug > 1)
-				pr_debug("%s: Media %s is has no link beat, %x.\n",
-					dev->name,
-					media_tbl[dev->if_port].name,
-					media_status);
-
-			break;
-		default:	/* Other media types handled by Tx timeouts. */
-			if (corkscrew_debug > 1)
-				pr_debug("%s: Media %s is has no indication, %x.\n",
-					dev->name,
-					media_tbl[dev->if_port].name,
-					media_status);
-			ok = 1;
-		}
-		if (!ok) {
-			__u32 config;
-
-			do {
-				dev->if_port =
-				    media_tbl[dev->if_port].next;
-			}
-			while (!(vp->available_media & media_tbl[dev->if_port].mask));
-
-			if (dev->if_port == 8) {	/* Go back to default. */
-				dev->if_port = vp->default_media;
-				if (corkscrew_debug > 1)
-					pr_debug("%s: Media selection failing, using default %s port.\n",
-						dev->name,
-						media_tbl[dev->if_port].name);
-			} else {
-				if (corkscrew_debug > 1)
-					pr_debug("%s: Media selection failed, now trying %s port.\n",
-						dev->name,
-						media_tbl[dev->if_port].name);
-				vp->timer.expires = jiffies + media_tbl[dev->if_port].wait;
-				add_timer(&vp->timer);
-			}
-			outw((media_status & ~(Media_10TP | Media_SQE)) |
-			     media_tbl[dev->if_port].media_bits,
-			     ioaddr + Wn4_Media);
-
-			EL3WINDOW(3);
-			config = inl(ioaddr + Wn3_Config);
-			config = (config & ~Xcvr) | (dev->if_port << Xcvr_shift);
-			outl(config, ioaddr + Wn3_Config);
-
-			outw(dev->if_port == 3 ? StartCoax : StopCoax,
-			     ioaddr + EL3_CMD);
-		}
-		EL3WINDOW(old_window);
-	}
-
-	spin_unlock_irqrestore(&vp->lock, flags);
-	if (corkscrew_debug > 1)
-		pr_debug("%s: Media selection timer finished, %s.\n",
-		       dev->name, media_tbl[dev->if_port].name);
-
-#endif				/* AUTOMEDIA */
-}
-
-static void corkscrew_timeout(struct net_device *dev, unsigned int txqueue)
-{
-	int i;
-	struct corkscrew_private *vp = netdev_priv(dev);
-	int ioaddr = dev->base_addr;
-
-	pr_warn("%s: transmit timed out, tx_status %2.2x status %4.4x\n",
-		dev->name, inb(ioaddr + TxStatus),
-		inw(ioaddr + EL3_STATUS));
-	/* Slight code bloat to be user friendly. */
-	if ((inb(ioaddr + TxStatus) & 0x88) == 0x88)
-		pr_warn("%s: Transmitter encountered 16 collisions -- network cable problem?\n",
-			dev->name);
-#ifndef final_version
-	pr_debug("  Flags; bus-master %d, full %d; dirty %d current %d.\n",
-	       vp->full_bus_master_tx, vp->tx_full, vp->dirty_tx,
-	       vp->cur_tx);
-	pr_debug("  Down list %8.8x vs. %p.\n", inl(ioaddr + DownListPtr),
-	       &vp->tx_ring[0]);
-	for (i = 0; i < TX_RING_SIZE; i++) {
-		pr_debug("  %d: %p  length %8.8x status %8.8x\n", i,
-		       &vp->tx_ring[i],
-		       vp->tx_ring[i].length, vp->tx_ring[i].status);
-	}
-#endif
-	/* Issue TX_RESET and TX_START commands. */
-	outw(TxReset, ioaddr + EL3_CMD);
-	for (i = 20; i >= 0; i--)
-		if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress))
-			break;
-	outw(TxEnable, ioaddr + EL3_CMD);
-	netif_trans_update(dev); /* prevent tx timeout */
-	dev->stats.tx_errors++;
-	dev->stats.tx_dropped++;
-	netif_wake_queue(dev);
-}
-
-static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb,
-					struct net_device *dev)
-{
-	struct corkscrew_private *vp = netdev_priv(dev);
-	int ioaddr = dev->base_addr;
-
-	/* Block a timer-based transmit from overlapping. */
-
-	netif_stop_queue(dev);
-
-	if (vp->full_bus_master_tx) {	/* BOOMERANG bus-master */
-		/* Calculate the next Tx descriptor entry. */
-		int entry = vp->cur_tx % TX_RING_SIZE;
-		struct boom_tx_desc *prev_entry;
-		unsigned long flags;
-		int i;
-
-		if (vp->tx_full)	/* No room to transmit with */
-			return NETDEV_TX_BUSY;
-		if (vp->cur_tx != 0)
-			prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE];
-		else
-			prev_entry = NULL;
-		if (corkscrew_debug > 3)
-			pr_debug("%s: Trying to send a packet, Tx index %d.\n",
-				dev->name, vp->cur_tx);
-		/* vp->tx_full = 1; */
-		vp->tx_skbuff[entry] = skb;
-		vp->tx_ring[entry].next = 0;
-		vp->tx_ring[entry].addr = isa_virt_to_bus(skb->data);
-		vp->tx_ring[entry].length = skb->len | 0x80000000;
-		vp->tx_ring[entry].status = skb->len | 0x80000000;
-
-		spin_lock_irqsave(&vp->lock, flags);
-		outw(DownStall, ioaddr + EL3_CMD);
-		/* Wait for the stall to complete. */
-		for (i = 20; i >= 0; i--)
-			if ((inw(ioaddr + EL3_STATUS) & CmdInProgress) == 0)
-				break;
-		if (prev_entry)
-			prev_entry->next = isa_virt_to_bus(&vp->tx_ring[entry]);
-		if (inl(ioaddr + DownListPtr) == 0) {
-			outl(isa_virt_to_bus(&vp->tx_ring[entry]),
-			     ioaddr + DownListPtr);
-			queued_packet++;
-		}
-		outw(DownUnstall, ioaddr + EL3_CMD);
-		spin_unlock_irqrestore(&vp->lock, flags);
-
-		vp->cur_tx++;
-		if (vp->cur_tx - vp->dirty_tx > TX_RING_SIZE - 1)
-			vp->tx_full = 1;
-		else {		/* Clear previous interrupt enable. */
-			if (prev_entry)
-				prev_entry->status &= ~0x80000000;
-			netif_wake_queue(dev);
-		}
-		return NETDEV_TX_OK;
-	}
-	/* Put out the doubleword header... */
-	outl(skb->len, ioaddr + TX_FIFO);
-	dev->stats.tx_bytes += skb->len;
-#ifdef VORTEX_BUS_MASTER
-	if (vp->bus_master) {
-		/* Set the bus-master controller to transfer the packet. */
-		outl(isa_virt_to_bus(skb->data), ioaddr + Wn7_MasterAddr);
-		outw((skb->len + 3) & ~3, ioaddr + Wn7_MasterLen);
-		vp->tx_skb = skb;
-		outw(StartDMADown, ioaddr + EL3_CMD);
-		/* queue will be woken at the DMADone interrupt. */
-	} else {
-		/* ... and the packet rounded to a doubleword. */
-		outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-		dev_kfree_skb(skb);
-		if (inw(ioaddr + TxFree) > 1536) {
-			netif_wake_queue(dev);
-		} else
-			/* Interrupt us when the FIFO has room for max-sized packet. */
-			outw(SetTxThreshold + (1536 >> 2),
-			     ioaddr + EL3_CMD);
-	}
-#else
-	/* ... and the packet rounded to a doubleword. */
-	outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-	dev_kfree_skb(skb);
-	if (inw(ioaddr + TxFree) > 1536) {
-		netif_wake_queue(dev);
-	} else
-		/* Interrupt us when the FIFO has room for max-sized packet. */
-		outw(SetTxThreshold + (1536 >> 2), ioaddr + EL3_CMD);
-#endif				/* bus master */
-
-
-	/* Clear the Tx status stack. */
-	{
-		short tx_status;
-		int i = 4;
-
-		while (--i > 0 && (tx_status = inb(ioaddr + TxStatus)) > 0) {
-			if (tx_status & 0x3C) {	/* A Tx-disabling error occurred.  */
-				if (corkscrew_debug > 2)
-					pr_debug("%s: Tx error, status %2.2x.\n",
-						dev->name, tx_status);
-				if (tx_status & 0x04)
-					dev->stats.tx_fifo_errors++;
-				if (tx_status & 0x38)
-					dev->stats.tx_aborted_errors++;
-				if (tx_status & 0x30) {
-					int j;
-					outw(TxReset, ioaddr + EL3_CMD);
-					for (j = 20; j >= 0; j--)
-						if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress))
-							break;
-				}
-				outw(TxEnable, ioaddr + EL3_CMD);
-			}
-			outb(0x00, ioaddr + TxStatus);	/* Pop the status stack. */
-		}
-	}
-	return NETDEV_TX_OK;
-}
-
-/* The interrupt handler does all of the Rx thread work and cleans up
-   after the Tx thread. */
-
-static irqreturn_t corkscrew_interrupt(int irq, void *dev_id)
-{
-	/* Use the now-standard shared IRQ implementation. */
-	struct net_device *dev = dev_id;
-	struct corkscrew_private *lp = netdev_priv(dev);
-	int ioaddr, status;
-	int latency;
-	int i = max_interrupt_work;
-
-	ioaddr = dev->base_addr;
-	latency = inb(ioaddr + Timer);
-
-	spin_lock(&lp->lock);
-
-	status = inw(ioaddr + EL3_STATUS);
-
-	if (corkscrew_debug > 4)
-		pr_debug("%s: interrupt, status %4.4x, timer %d.\n",
-			dev->name, status, latency);
-	if ((status & 0xE000) != 0xE000) {
-		static int donedidthis;
-		/* Some interrupt controllers store a bogus interrupt from boot-time.
-		   Ignore a single early interrupt, but don't hang the machine for
-		   other interrupt problems. */
-		if (donedidthis++ > 100) {
-			pr_err("%s: Bogus interrupt, bailing. Status %4.4x, start=%d.\n",
-				   dev->name, status, netif_running(dev));
-			free_irq(dev->irq, dev);
-			dev->irq = -1;
-		}
-	}
-
-	do {
-		if (corkscrew_debug > 5)
-			pr_debug("%s: In interrupt loop, status %4.4x.\n",
-			       dev->name, status);
-		if (status & RxComplete)
-			corkscrew_rx(dev);
-
-		if (status & TxAvailable) {
-			if (corkscrew_debug > 5)
-				pr_debug("	TX room bit was handled.\n");
-			/* There's room in the FIFO for a full-sized packet. */
-			outw(AckIntr | TxAvailable, ioaddr + EL3_CMD);
-			netif_wake_queue(dev);
-		}
-		if (status & DownComplete) {
-			unsigned int dirty_tx = lp->dirty_tx;
-
-			while (lp->cur_tx - dirty_tx > 0) {
-				int entry = dirty_tx % TX_RING_SIZE;
-				if (inl(ioaddr + DownListPtr) == isa_virt_to_bus(&lp->tx_ring[entry]))
-					break;	/* It still hasn't been processed. */
-				if (lp->tx_skbuff[entry]) {
-					dev_consume_skb_irq(lp->tx_skbuff[entry]);
-					lp->tx_skbuff[entry] = NULL;
-				}
-				dirty_tx++;
-			}
-			lp->dirty_tx = dirty_tx;
-			outw(AckIntr | DownComplete, ioaddr + EL3_CMD);
-			if (lp->tx_full && (lp->cur_tx - dirty_tx <= TX_RING_SIZE - 1)) {
-				lp->tx_full = 0;
-				netif_wake_queue(dev);
-			}
-		}
-#ifdef VORTEX_BUS_MASTER
-		if (status & DMADone) {
-			outw(0x1000, ioaddr + Wn7_MasterStatus);	/* Ack the event. */
-			dev_consume_skb_irq(lp->tx_skb);	/* Release the transferred buffer */
-			netif_wake_queue(dev);
-		}
-#endif
-		if (status & UpComplete) {
-			boomerang_rx(dev);
-			outw(AckIntr | UpComplete, ioaddr + EL3_CMD);
-		}
-		if (status & (AdapterFailure | RxEarly | StatsFull)) {
-			/* Handle all uncommon interrupts at once. */
-			if (status & RxEarly) {	/* Rx early is unused. */
-				corkscrew_rx(dev);
-				outw(AckIntr | RxEarly, ioaddr + EL3_CMD);
-			}
-			if (status & StatsFull) {	/* Empty statistics. */
-				static int DoneDidThat;
-				if (corkscrew_debug > 4)
-					pr_debug("%s: Updating stats.\n", dev->name);
-				update_stats(ioaddr, dev);
-				/* DEBUG HACK: Disable statistics as an interrupt source. */
-				/* This occurs when we have the wrong media type! */
-				if (DoneDidThat == 0 && inw(ioaddr + EL3_STATUS) & StatsFull) {
-					int win, reg;
-					pr_notice("%s: Updating stats failed, disabling stats as an interrupt source.\n",
-						dev->name);
-					for (win = 0; win < 8; win++) {
-						EL3WINDOW(win);
-						pr_notice("Vortex window %d:", win);
-						for (reg = 0; reg < 16; reg++)
-							pr_cont(" %2.2x", inb(ioaddr + reg));
-						pr_cont("\n");
-					}
-					EL3WINDOW(7);
-					outw(SetIntrEnb | TxAvailable |
-					     RxComplete | AdapterFailure |
-					     UpComplete | DownComplete |
-					     TxComplete, ioaddr + EL3_CMD);
-					DoneDidThat++;
-				}
-			}
-			if (status & AdapterFailure) {
-				/* Adapter failure requires Rx reset and reinit. */
-				outw(RxReset, ioaddr + EL3_CMD);
-				/* Set the Rx filter to the current state. */
-				set_rx_mode(dev);
-				outw(RxEnable, ioaddr + EL3_CMD);	/* Re-enable the receiver. */
-				outw(AckIntr | AdapterFailure,
-				     ioaddr + EL3_CMD);
-			}
-		}
-
-		if (--i < 0) {
-			pr_err("%s: Too much work in interrupt, status %4.4x. Disabling functions (%4.4x).\n",
-				dev->name, status, SetStatusEnb | ((~status) & 0x7FE));
-			/* Disable all pending interrupts. */
-			outw(SetStatusEnb | ((~status) & 0x7FE), ioaddr + EL3_CMD);
-			outw(AckIntr | 0x7FF, ioaddr + EL3_CMD);
-			break;
-		}
-		/* Acknowledge the IRQ. */
-		outw(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD);
-
-	} while ((status = inw(ioaddr + EL3_STATUS)) & (IntLatch | RxComplete));
-
-	spin_unlock(&lp->lock);
-
-	if (corkscrew_debug > 4)
-		pr_debug("%s: exiting interrupt, status %4.4x.\n", dev->name, status);
-	return IRQ_HANDLED;
-}
-
-static int corkscrew_rx(struct net_device *dev)
-{
-	int ioaddr = dev->base_addr;
-	int i;
-	short rx_status;
-
-	if (corkscrew_debug > 5)
-		pr_debug("   In rx_packet(), status %4.4x, rx_status %4.4x.\n",
-		     inw(ioaddr + EL3_STATUS), inw(ioaddr + RxStatus));
-	while ((rx_status = inw(ioaddr + RxStatus)) > 0) {
-		if (rx_status & 0x4000) {	/* Error, update stats. */
-			unsigned char rx_error = inb(ioaddr + RxErrors);
-			if (corkscrew_debug > 2)
-				pr_debug(" Rx error: status %2.2x.\n",
-				       rx_error);
-			dev->stats.rx_errors++;
-			if (rx_error & 0x01)
-				dev->stats.rx_over_errors++;
-			if (rx_error & 0x02)
-				dev->stats.rx_length_errors++;
-			if (rx_error & 0x04)
-				dev->stats.rx_frame_errors++;
-			if (rx_error & 0x08)
-				dev->stats.rx_crc_errors++;
-			if (rx_error & 0x10)
-				dev->stats.rx_length_errors++;
-		} else {
-			/* The packet length: up to 4.5K!. */
-			short pkt_len = rx_status & 0x1fff;
-			struct sk_buff *skb;
-
-			skb = netdev_alloc_skb(dev, pkt_len + 5 + 2);
-			if (corkscrew_debug > 4)
-				pr_debug("Receiving packet size %d status %4.4x.\n",
-				     pkt_len, rx_status);
-			if (skb != NULL) {
-				skb_reserve(skb, 2);	/* Align IP on 16 byte boundaries */
-				/* 'skb_put()' points to the start of sk_buff data area. */
-				insl(ioaddr + RX_FIFO,
-				     skb_put(skb, pkt_len),
-				     (pkt_len + 3) >> 2);
-				outw(RxDiscard, ioaddr + EL3_CMD);	/* Pop top Rx packet. */
-				skb->protocol = eth_type_trans(skb, dev);
-				netif_rx(skb);
-				dev->stats.rx_packets++;
-				dev->stats.rx_bytes += pkt_len;
-				/* Wait a limited time to go to next packet. */
-				for (i = 200; i >= 0; i--)
-					if (! (inw(ioaddr + EL3_STATUS) & CmdInProgress))
-						break;
-				continue;
-			} else if (corkscrew_debug)
-				pr_debug("%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, pkt_len);
-		}
-		outw(RxDiscard, ioaddr + EL3_CMD);
-		dev->stats.rx_dropped++;
-		/* Wait a limited time to skip this packet. */
-		for (i = 200; i >= 0; i--)
-			if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress))
-				break;
-	}
-	return 0;
-}
-
-static int boomerang_rx(struct net_device *dev)
-{
-	struct corkscrew_private *vp = netdev_priv(dev);
-	int entry = vp->cur_rx % RX_RING_SIZE;
-	int ioaddr = dev->base_addr;
-	int rx_status;
-
-	if (corkscrew_debug > 5)
-		pr_debug("   In boomerang_rx(), status %4.4x, rx_status %4.4x.\n",
-			inw(ioaddr + EL3_STATUS), inw(ioaddr + RxStatus));
-	while ((rx_status = vp->rx_ring[entry].status) & RxDComplete) {
-		if (rx_status & RxDError) {	/* Error, update stats. */
-			unsigned char rx_error = rx_status >> 16;
-			if (corkscrew_debug > 2)
-				pr_debug(" Rx error: status %2.2x.\n",
-				       rx_error);
-			dev->stats.rx_errors++;
-			if (rx_error & 0x01)
-				dev->stats.rx_over_errors++;
-			if (rx_error & 0x02)
-				dev->stats.rx_length_errors++;
-			if (rx_error & 0x04)
-				dev->stats.rx_frame_errors++;
-			if (rx_error & 0x08)
-				dev->stats.rx_crc_errors++;
-			if (rx_error & 0x10)
-				dev->stats.rx_length_errors++;
-		} else {
-			/* The packet length: up to 4.5K!. */
-			short pkt_len = rx_status & 0x1fff;
-			struct sk_buff *skb;
-
-			dev->stats.rx_bytes += pkt_len;
-			if (corkscrew_debug > 4)
-				pr_debug("Receiving packet size %d status %4.4x.\n",
-				     pkt_len, rx_status);
-
-			/* Check if the packet is long enough to just accept without
-			   copying to a properly sized skbuff. */
-			if (pkt_len < rx_copybreak &&
-			    (skb = netdev_alloc_skb(dev, pkt_len + 4)) != NULL) {
-				skb_reserve(skb, 2);	/* Align IP on 16 byte boundaries */
-				/* 'skb_put()' points to the start of sk_buff data area. */
-				skb_put_data(skb,
-					     isa_bus_to_virt(vp->rx_ring[entry].addr),
-					     pkt_len);
-				rx_copy++;
-			} else {
-				void *temp;
-				/* Pass up the skbuff already on the Rx ring. */
-				skb = vp->rx_skbuff[entry];
-				vp->rx_skbuff[entry] = NULL;
-				temp = skb_put(skb, pkt_len);
-				/* Remove this checking code for final release. */
-				if (isa_bus_to_virt(vp->rx_ring[entry].addr) != temp)
-					pr_warn("%s: Warning -- the skbuff addresses do not match in boomerang_rx: %p vs. %p / %p\n",
-						dev->name,
-						isa_bus_to_virt(vp->rx_ring[entry].addr),
-						skb->head, temp);
-				rx_nocopy++;
-			}
-			skb->protocol = eth_type_trans(skb, dev);
-			netif_rx(skb);
-			dev->stats.rx_packets++;
-		}
-		entry = (++vp->cur_rx) % RX_RING_SIZE;
-	}
-	/* Refill the Rx ring buffers. */
-	for (; vp->cur_rx - vp->dirty_rx > 0; vp->dirty_rx++) {
-		struct sk_buff *skb;
-		entry = vp->dirty_rx % RX_RING_SIZE;
-		if (vp->rx_skbuff[entry] == NULL) {
-			skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
-			if (skb == NULL)
-				break;	/* Bad news!  */
-			skb_reserve(skb, 2);	/* Align IP on 16 byte boundaries */
-			vp->rx_ring[entry].addr = isa_virt_to_bus(skb->data);
-			vp->rx_skbuff[entry] = skb;
-		}
-		vp->rx_ring[entry].status = 0;	/* Clear complete bit. */
-	}
-	return 0;
-}
-
-static int corkscrew_close(struct net_device *dev)
-{
-	struct corkscrew_private *vp = netdev_priv(dev);
-	int ioaddr = dev->base_addr;
-	int i;
-
-	netif_stop_queue(dev);
-
-	if (corkscrew_debug > 1) {
-		pr_debug("%s: corkscrew_close() status %4.4x, Tx status %2.2x.\n",
-		     dev->name, inw(ioaddr + EL3_STATUS),
-		     inb(ioaddr + TxStatus));
-		pr_debug("%s: corkscrew close stats: rx_nocopy %d rx_copy %d tx_queued %d.\n",
-			dev->name, rx_nocopy, rx_copy, queued_packet);
-	}
-
-	timer_delete_sync(&vp->timer);
-
-	/* Turn off statistics ASAP.  We update lp->stats below. */
-	outw(StatsDisable, ioaddr + EL3_CMD);
-
-	/* Disable the receiver and transmitter. */
-	outw(RxDisable, ioaddr + EL3_CMD);
-	outw(TxDisable, ioaddr + EL3_CMD);
-
-	if (dev->if_port == XCVR_10base2)
-		/* Turn off thinnet power.  Green! */
-		outw(StopCoax, ioaddr + EL3_CMD);
-
-	free_irq(dev->irq, dev);
-
-	outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD);
-
-	update_stats(ioaddr, dev);
-	if (vp->full_bus_master_rx) {	/* Free Boomerang bus master Rx buffers. */
-		outl(0, ioaddr + UpListPtr);
-		for (i = 0; i < RX_RING_SIZE; i++)
-			if (vp->rx_skbuff[i]) {
-				dev_kfree_skb(vp->rx_skbuff[i]);
-				vp->rx_skbuff[i] = NULL;
-			}
-	}
-	if (vp->full_bus_master_tx) {	/* Free Boomerang bus master Tx buffers. */
-		outl(0, ioaddr + DownListPtr);
-		for (i = 0; i < TX_RING_SIZE; i++)
-			if (vp->tx_skbuff[i]) {
-				dev_kfree_skb(vp->tx_skbuff[i]);
-				vp->tx_skbuff[i] = NULL;
-			}
-	}
-
-	return 0;
-}
-
-static struct net_device_stats *corkscrew_get_stats(struct net_device *dev)
-{
-	struct corkscrew_private *vp = netdev_priv(dev);
-	unsigned long flags;
-
-	if (netif_running(dev)) {
-		spin_lock_irqsave(&vp->lock, flags);
-		update_stats(dev->base_addr, dev);
-		spin_unlock_irqrestore(&vp->lock, flags);
-	}
-	return &dev->stats;
-}
-
-/*  Update statistics.
-	Unlike with the EL3 we need not worry about interrupts changing
-	the window setting from underneath us, but we must still guard
-	against a race condition with a StatsUpdate interrupt updating the
-	table.  This is done by checking that the ASM (!) code generated uses
-	atomic updates with '+='.
-	*/
-static void update_stats(int ioaddr, struct net_device *dev)
-{
-	/* Unlike the 3c5x9 we need not turn off stats updates while reading. */
-	/* Switch to the stats window, and read everything. */
-	EL3WINDOW(6);
-	dev->stats.tx_carrier_errors += inb(ioaddr + 0);
-	dev->stats.tx_heartbeat_errors += inb(ioaddr + 1);
-	/* Multiple collisions. */ inb(ioaddr + 2);
-	dev->stats.collisions += inb(ioaddr + 3);
-	dev->stats.tx_window_errors += inb(ioaddr + 4);
-	dev->stats.rx_fifo_errors += inb(ioaddr + 5);
-	dev->stats.tx_packets += inb(ioaddr + 6);
-	dev->stats.tx_packets += (inb(ioaddr + 9) & 0x30) << 4;
-						/* Rx packets   */ inb(ioaddr + 7);
-						/* Must read to clear */
-	/* Tx deferrals */ inb(ioaddr + 8);
-	/* Don't bother with register 9, an extension of registers 6&7.
-	   If we do use the 6&7 values the atomic update assumption above
-	   is invalid. */
-	inw(ioaddr + 10);	/* Total Rx and Tx octets. */
-	inw(ioaddr + 12);
-	/* New: On the Vortex we must also clear the BadSSD counter. */
-	EL3WINDOW(4);
-	inb(ioaddr + 12);
-
-	/* We change back to window 7 (not 1) with the Vortex. */
-	EL3WINDOW(7);
-}
-
-/* This new version of set_rx_mode() supports v1.4 kernels.
-   The Vortex chip has no documented multicast filter, so the only
-   multicast setting is to receive all multicast frames.  At least
-   the chip has a very clean way to set the mode, unlike many others. */
-static void set_rx_mode(struct net_device *dev)
-{
-	int ioaddr = dev->base_addr;
-	unsigned short new_mode;
-
-	if (dev->flags & IFF_PROMISC) {
-		if (corkscrew_debug > 3)
-			pr_debug("%s: Setting promiscuous mode.\n",
-			       dev->name);
-		new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm;
-	} else if (!netdev_mc_empty(dev) || dev->flags & IFF_ALLMULTI) {
-		new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast;
-	} else
-		new_mode = SetRxFilter | RxStation | RxBroadcast;
-
-	outw(new_mode, ioaddr + EL3_CMD);
-}
-
-static void netdev_get_drvinfo(struct net_device *dev,
-			       struct ethtool_drvinfo *info)
-{
-	strscpy(info->driver, DRV_NAME, sizeof(info->driver));
-	snprintf(info->bus_info, sizeof(info->bus_info), "ISA 0x%lx",
-		 dev->base_addr);
-}
-
-static u32 netdev_get_msglevel(struct net_device *dev)
-{
-	return corkscrew_debug;
-}
-
-static void netdev_set_msglevel(struct net_device *dev, u32 level)
-{
-	corkscrew_debug = level;
-}
-
-static const struct ethtool_ops netdev_ethtool_ops = {
-	.get_drvinfo		= netdev_get_drvinfo,
-	.get_msglevel		= netdev_get_msglevel,
-	.set_msglevel		= netdev_set_msglevel,
-};
-
-#ifdef MODULE
-static void __exit corkscrew_exit_module(void)
-{
-	while (!list_empty(&root_corkscrew_dev)) {
-		struct net_device *dev;
-		struct corkscrew_private *vp;
-
-		vp = list_entry(root_corkscrew_dev.next,
-				struct corkscrew_private, list);
-		dev = vp->our_dev;
-		unregister_netdev(dev);
-		cleanup_card(dev);
-		free_netdev(dev);
-	}
-}
-module_exit(corkscrew_exit_module);
-#endif				/* MODULE */
drivers/net/ethernet/3com/Kconfig +0 -11
index c05a1b63c1c9..3fd3202d9776 100644
@@ -17,17 +17,6 @@ config NET_VENDOR_3COM
 
 if NET_VENDOR_3COM
 
-config 3C515
-	tristate "3c515 ISA \"Fast EtherLink\""
-	depends on ISA && ISA_DMA_API && !PPC32
-	select NETDEV_LEGACY_INIT
-	help
-	  If you have a 3Com ISA EtherLink XL "Corkscrew" 3c515 Fast Ethernet
-	  network card, say Y here.
-
-	  To compile this driver as a module, choose M here. The module
-	  will be called 3c515.
-
 config PCMCIA_3C574
 	tristate "3Com 3c574 PCMCIA support"
 	depends on PCMCIA && HAS_IOPORT
drivers/net/ethernet/3com/Makefile +0 -1
index f7623fa2d441..babfd93d5d53 100644
@@ -3,7 +3,6 @@
 # Makefile for the 3Com Ethernet device drivers
 #
 
-obj-$(CONFIG_3C515) += 3c515.o
 obj-$(CONFIG_PCMCIA_3C589) += 3c589_cs.o
 obj-$(CONFIG_PCMCIA_3C574) += 3c574_cs.o
 obj-$(CONFIG_VORTEX) += 3c59x.o
Signature · 1 line
2.53.0
#3 lore raw

PATCH v2 3/15 drivers: net: 3com: 3c574: Remove this driver

In reply to Andrew Lunn

The 3c574 was written by Donald Becker between 19973-1998. It is an PCMCIA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/3com/3c574_cs.c | 1164 ----------------------------------
 drivers/net/ethernet/3com/Kconfig    |   10 -
 drivers/net/ethernet/3com/Makefile   |    1 -
 3 files changed, 1175 deletions(-)
drivers/net/ethernet/3com/3c574_cs.c deleted +0 -1164
deleted file mode 100644
index 1f2070497a75..000000000000
@@ -1,1164 +0,0 @@
-/* 3c574.c: A PCMCIA ethernet driver for the 3com 3c574 "RoadRunner".
-
-	Written 1993-1998 by
-	Donald Becker, [email protected], (driver core) and
-	David Hinds, [email protected] (from his PC card code).
-	Locking fixes (C) Copyright 2003 Red Hat Inc
-
-	This software may be used and distributed according to the terms of
-	the GNU General Public License, incorporated herein by reference.
-
-	This driver derives from Donald Becker's 3c509 core, which has the
-	following copyright:
-	Copyright 1993 United States Government as represented by the
-	Director, National Security Agency.
-	
-
-*/
-
-/*
-				Theory of Operation
-
-I. Board Compatibility
-
-This device driver is designed for the 3Com 3c574 PC card Fast Ethernet
-Adapter.
-
-II. Board-specific settings
-
-None -- PC cards are autoconfigured.
-
-III. Driver operation
-
-The 3c574 uses a Boomerang-style interface, without the bus-master capability.
-See the Boomerang driver and documentation for most details.
-
-IV. Notes and chip documentation.
-
-Two added registers are used to enhance PIO performance, RunnerRdCtrl and
-RunnerWrCtrl.  These are 11 bit down-counters that are preloaded with the
-count of word (16 bits) reads or writes the driver is about to do to the Rx
-or Tx FIFO.  The chip is then able to hide the internal-PCI-bus to PC-card
-translation latency by buffering the I/O operations with an 8 word FIFO.
-Note: No other chip accesses are permitted when this buffer is used.
-
-A second enhancement is that both attribute and common memory space
-0x0800-0x0fff can translated to the PIO FIFO.  Thus memory operations (faster
-with *some* PCcard bridges) may be used instead of I/O operations.
-This is enabled by setting the 0x10 bit in the PCMCIA LAN COR.
-
-Some slow PC card bridges work better if they never see a WAIT signal.
-This is configured by setting the 0x20 bit in the PCMCIA LAN COR.
-Only do this after testing that it is reliable and improves performance.
-
-The upper five bits of RunnerRdCtrl are used to window into PCcard
-configuration space registers.  Window 0 is the regular Boomerang/Odie
-register set, 1-5 are various PC card control registers, and 16-31 are
-the (reversed!) CIS table.
-
-A final note: writing the InternalConfig register in window 3 with an
-invalid ramWidth is Very Bad.
-
-V. References
-
-http://www.scyld.com/expert/NWay.html
-http://www.national.com/opf/DP/DP83840A.html
-
-Thanks to Terry Murphy of 3Com for providing development information for
-earlier 3Com products.
-
-*/
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/interrupt.h>
-#include <linux/in.h>
-#include <linux/delay.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-#include <linux/if_arp.h>
-#include <linux/ioport.h>
-#include <linux/bitops.h>
-#include <linux/mii.h>
-
-#include <pcmcia/cistpl.h>
-#include <pcmcia/cisreg.h>
-#include <pcmcia/ciscode.h>
-#include <pcmcia/ds.h>
-
-#include <linux/uaccess.h>
-#include <asm/io.h>
-
-/*====================================================================*/
-
-/* Module parameters */
-
-MODULE_AUTHOR("David Hinds <[email protected]>");
-MODULE_DESCRIPTION("3Com 3c574 series PCMCIA ethernet driver");
-MODULE_LICENSE("GPL");
-
-#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
-
-/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-INT_MODULE_PARM(max_interrupt_work, 32);
-
-/* Force full duplex modes? */
-INT_MODULE_PARM(full_duplex, 0);
-
-/* Autodetect link polarity reversal? */
-INT_MODULE_PARM(auto_polarity, 1);
-
-
-/*====================================================================*/
-
-/* Time in jiffies before concluding the transmitter is hung. */
-#define TX_TIMEOUT  ((800*HZ)/1000)
-
-/* To minimize the size of the driver source and make the driver more
-   readable not all constants are symbolically defined.
-   You'll need the manual if you want to understand driver details anyway. */
-/* Offsets from base I/O address. */
-#define EL3_DATA	0x00
-#define EL3_CMD		0x0e
-#define EL3_STATUS	0x0e
-
-#define EL3WINDOW(win_num) outw(SelectWindow + (win_num), ioaddr + EL3_CMD)
-
-/* The top five bits written to EL3_CMD are a command, the lower
-   11 bits are the parameter, if applicable. */
-enum el3_cmds {
-	TotalReset = 0<<11, SelectWindow = 1<<11, StartCoax = 2<<11,
-	RxDisable = 3<<11, RxEnable = 4<<11, RxReset = 5<<11, RxDiscard = 8<<11,
-	TxEnable = 9<<11, TxDisable = 10<<11, TxReset = 11<<11,
-	FakeIntr = 12<<11, AckIntr = 13<<11, SetIntrEnb = 14<<11,
-	SetStatusEnb = 15<<11, SetRxFilter = 16<<11, SetRxThreshold = 17<<11,
-	SetTxThreshold = 18<<11, SetTxStart = 19<<11, StatsEnable = 21<<11,
-	StatsDisable = 22<<11, StopCoax = 23<<11,
-};
-
-enum elxl_status {
-	IntLatch = 0x0001, AdapterFailure = 0x0002, TxComplete = 0x0004,
-	TxAvailable = 0x0008, RxComplete = 0x0010, RxEarly = 0x0020,
-	IntReq = 0x0040, StatsFull = 0x0080, CmdBusy = 0x1000 };
-
-/* The SetRxFilter command accepts the following classes: */
-enum RxFilter {
-	RxStation = 1, RxMulticast = 2, RxBroadcast = 4, RxProm = 8
-};
-
-enum Window0 {
-	Wn0EepromCmd = 10, Wn0EepromData = 12, /* EEPROM command/address, data. */
-	IntrStatus=0x0E,		/* Valid in all windows. */
-};
-/* These assumes the larger EEPROM. */
-enum Win0_EEPROM_cmds {
-	EEPROM_Read = 0x200, EEPROM_WRITE = 0x100, EEPROM_ERASE = 0x300,
-	EEPROM_EWENB = 0x30,		/* Enable erasing/writing for 10 msec. */
-	EEPROM_EWDIS = 0x00,		/* Disable EWENB before 10 msec timeout. */
-};
-
-/* Register window 1 offsets, the window used in normal operation.
-   On the "Odie" this window is always mapped at offsets 0x10-0x1f.
-   Except for TxFree, which is overlapped by RunnerWrCtrl. */
-enum Window1 {
-	TX_FIFO = 0x10,  RX_FIFO = 0x10,  RxErrors = 0x14,
-	RxStatus = 0x18,  Timer=0x1A, TxStatus = 0x1B,
-	TxFree = 0x0C, /* Remaining free bytes in Tx buffer. */
-	RunnerRdCtrl = 0x16, RunnerWrCtrl = 0x1c,
-};
-
-enum Window3 {			/* Window 3: MAC/config bits. */
-	Wn3_Config=0, Wn3_MAC_Ctrl=6, Wn3_Options=8,
-};
-enum wn3_config {
-	Ram_size = 7,
-	Ram_width = 8,
-	Ram_speed = 0x30,
-	Rom_size = 0xc0,
-	Ram_split_shift = 16,
-	Ram_split = 3 << Ram_split_shift,
-	Xcvr_shift = 20,
-	Xcvr = 7 << Xcvr_shift,
-	Autoselect = 0x1000000,
-};
-
-enum Window4 {		/* Window 4: Xcvr/media bits. */
-	Wn4_FIFODiag = 4, Wn4_NetDiag = 6, Wn4_PhysicalMgmt=8, Wn4_Media = 10,
-};
-
-#define MEDIA_TP	0x00C0	/* Enable link beat and jabber for 10baseT. */
-
-struct el3_private {
-	struct pcmcia_device	*p_dev;
-	u16 advertising, partner;		/* NWay media advertisement */
-	unsigned char phys;			/* MII device address */
-	unsigned int autoselect:1, default_media:3;	/* Read from the EEPROM/Wn3_Config. */
-	/* for transceiver monitoring */
-	struct timer_list media;
-	unsigned short media_status;
-	unsigned short fast_poll;
-	unsigned long last_irq;
-	spinlock_t window_lock;			/* Guards the Window selection */
-};
-
-/* Set iff a MII transceiver on any interface requires mdio preamble.
-   This only set with the original DP83840 on older 3c905 boards, so the extra
-   code size of a per-interface flag is not worthwhile. */
-static char mii_preamble_required = 0;
-
-/* Index of functions. */
-
-static int tc574_config(struct pcmcia_device *link);
-static void tc574_release(struct pcmcia_device *link);
-
-static void mdio_sync(unsigned int ioaddr, int bits);
-static int mdio_read(unsigned int ioaddr, int phy_id, int location);
-static void mdio_write(unsigned int ioaddr, int phy_id, int location,
-		       int value);
-static unsigned short read_eeprom(unsigned int ioaddr, int index);
-static void tc574_wait_for_completion(struct net_device *dev, int cmd);
-
-static void tc574_reset(struct net_device *dev);
-static void media_check(struct timer_list *t);
-static int el3_open(struct net_device *dev);
-static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
-					struct net_device *dev);
-static irqreturn_t el3_interrupt(int irq, void *dev_id);
-static void update_stats(struct net_device *dev);
-static struct net_device_stats *el3_get_stats(struct net_device *dev);
-static int el3_rx(struct net_device *dev, int worklimit);
-static int el3_close(struct net_device *dev);
-static void el3_tx_timeout(struct net_device *dev, unsigned int txqueue);
-static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-static void set_rx_mode(struct net_device *dev);
-static void set_multicast_list(struct net_device *dev);
-
-static void tc574_detach(struct pcmcia_device *p_dev);
-
-/*
-	tc574_attach() creates an "instance" of the driver, allocating
-	local data structures for one device.  The device is registered
-	with Card Services.
-*/
-static const struct net_device_ops el3_netdev_ops = {
-	.ndo_open 		= el3_open,
-	.ndo_stop 		= el3_close,
-	.ndo_start_xmit		= el3_start_xmit,
-	.ndo_tx_timeout 	= el3_tx_timeout,
-	.ndo_get_stats		= el3_get_stats,
-	.ndo_eth_ioctl		= el3_ioctl,
-	.ndo_set_rx_mode	= set_multicast_list,
-	.ndo_set_mac_address 	= eth_mac_addr,
-	.ndo_validate_addr	= eth_validate_addr,
-};
-
-static int tc574_probe(struct pcmcia_device *link)
-{
-	struct el3_private *lp;
-	struct net_device *dev;
-
-	dev_dbg(&link->dev, "3c574_attach()\n");
-
-	/* Create the PC card device object. */
-	dev = alloc_etherdev(sizeof(struct el3_private));
-	if (!dev)
-		return -ENOMEM;
-	lp = netdev_priv(dev);
-	link->priv = dev;
-	lp->p_dev = link;
-
-	spin_lock_init(&lp->window_lock);
-	link->resource[0]->end = 32;
-	link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16;
-	link->config_flags |= CONF_ENABLE_IRQ;
-	link->config_index = 1;
-
-	dev->netdev_ops = &el3_netdev_ops;
-	dev->watchdog_timeo = TX_TIMEOUT;
-
-	return tc574_config(link);
-}
-
-static void tc574_detach(struct pcmcia_device *link)
-{
-	struct net_device *dev = link->priv;
-
-	dev_dbg(&link->dev, "3c574_detach()\n");
-
-	unregister_netdev(dev);
-
-	tc574_release(link);
-
-	free_netdev(dev);
-} /* tc574_detach */
-
-static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
-
-static int tc574_config(struct pcmcia_device *link)
-{
-	struct net_device *dev = link->priv;
-	struct el3_private *lp = netdev_priv(dev);
-	int ret, i, j;
-	__be16 addr[ETH_ALEN / 2];
-	unsigned int ioaddr;
-	char *cardname;
-	__u32 config;
-	u8 *buf;
-	size_t len;
-
-	dev_dbg(&link->dev, "3c574_config()\n");
-
-	link->io_lines = 16;
-
-	for (i = j = 0; j < 0x400; j += 0x20) {
-		link->resource[0]->start = j ^ 0x300;
-		i = pcmcia_request_io(link);
-		if (i == 0)
-			break;
-	}
-	if (i != 0)
-		goto failed;
-
-	ret = pcmcia_request_irq(link, el3_interrupt);
-	if (ret)
-		goto failed;
-
-	ret = pcmcia_enable_device(link);
-	if (ret)
-		goto failed;
-
-	dev->irq = link->irq;
-	dev->base_addr = link->resource[0]->start;
-
-	ioaddr = dev->base_addr;
-
-	/* The 3c574 normally uses an EEPROM for configuration info, including
-	   the hardware address.  The future products may include a modem chip
-	   and put the address in the CIS. */
-
-	len = pcmcia_get_tuple(link, 0x88, &buf);
-	if (buf && len >= 6) {
-		for (i = 0; i < 3; i++)
-			addr[i] = htons(le16_to_cpu(buf[i * 2]));
-		kfree(buf);
-	} else {
-		kfree(buf); /* 0 < len < 6 */
-		EL3WINDOW(0);
-		for (i = 0; i < 3; i++)
-			addr[i] = htons(read_eeprom(ioaddr, i + 10));
-		if (addr[0] == htons(0x6060)) {
-			pr_notice("IO port conflict at 0x%03lx-0x%03lx\n",
-				  dev->base_addr, dev->base_addr+15);
-			goto failed;
-		}
-	}
-	eth_hw_addr_set(dev, (u8 *)addr);
-	if (link->prod_id[1])
-		cardname = link->prod_id[1];
-	else
-		cardname = "3Com 3c574";
-
-	{
-		u_char mcr;
-		outw(2<<11, ioaddr + RunnerRdCtrl);
-		mcr = inb(ioaddr + 2);
-		outw(0<<11, ioaddr + RunnerRdCtrl);
-		pr_info("  ASIC rev %d,", mcr>>3);
-		EL3WINDOW(3);
-		config = inl(ioaddr + Wn3_Config);
-		lp->default_media = (config & Xcvr) >> Xcvr_shift;
-		lp->autoselect = config & Autoselect ? 1 : 0;
-	}
-
-	timer_setup(&lp->media, media_check, 0);
-
-	{
-		int phy;
-		
-		/* Roadrunner only: Turn on the MII transceiver */
-		outw(0x8040, ioaddr + Wn3_Options);
-		mdelay(1);
-		outw(0xc040, ioaddr + Wn3_Options);
-		tc574_wait_for_completion(dev, TxReset);
-		tc574_wait_for_completion(dev, RxReset);
-		mdelay(1);
-		outw(0x8040, ioaddr + Wn3_Options);
-		
-		EL3WINDOW(4);
-		for (phy = 1; phy <= 32; phy++) {
-			int mii_status;
-			mdio_sync(ioaddr, 32);
-			mii_status = mdio_read(ioaddr, phy & 0x1f, 1);
-			if (mii_status != 0xffff) {
-				lp->phys = phy & 0x1f;
-				dev_dbg(&link->dev, "  MII transceiver at "
-					"index %d, status %x.\n",
-					  phy, mii_status);
-				if ((mii_status & 0x0040) == 0)
-					mii_preamble_required = 1;
-				break;
-			}
-		}
-		if (phy > 32) {
-			pr_notice("  No MII transceivers found!\n");
-			goto failed;
-		}
-		i = mdio_read(ioaddr, lp->phys, 16) | 0x40;
-		mdio_write(ioaddr, lp->phys, 16, i);
-		lp->advertising = mdio_read(ioaddr, lp->phys, 4);
-		if (full_duplex) {
-			/* Only advertise the FD media types. */
-			lp->advertising &= ~0x02a0;
-			mdio_write(ioaddr, lp->phys, 4, lp->advertising);
-		}
-	}
-
-	SET_NETDEV_DEV(dev, &link->dev);
-
-	if (register_netdev(dev) != 0) {
-		pr_notice("register_netdev() failed\n");
-		goto failed;
-	}
-
-	netdev_info(dev, "%s at io %#3lx, irq %d, hw_addr %pM\n",
-		    cardname, dev->base_addr, dev->irq, dev->dev_addr);
-	netdev_info(dev, " %dK FIFO split %s Rx:Tx, %sMII interface.\n",
-		    8 << (config & Ram_size),
-		    ram_split[(config & Ram_split) >> Ram_split_shift],
-		    config & Autoselect ? "autoselect " : "");
-
-	return 0;
-
-failed:
-	tc574_release(link);
-	return -ENODEV;
-
-} /* tc574_config */
-
-static void tc574_release(struct pcmcia_device *link)
-{
-	pcmcia_disable_device(link);
-}
-
-static int tc574_suspend(struct pcmcia_device *link)
-{
-	struct net_device *dev = link->priv;
-
-	if (link->open)
-		netif_device_detach(dev);
-
-	return 0;
-}
-
-static int tc574_resume(struct pcmcia_device *link)
-{
-	struct net_device *dev = link->priv;
-
-	if (link->open) {
-		tc574_reset(dev);
-		netif_device_attach(dev);
-	}
-
-	return 0;
-}
-
-static void dump_status(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	EL3WINDOW(1);
-	netdev_info(dev, "  irq status %04x, rx status %04x, tx status %02x, tx free %04x\n",
-		    inw(ioaddr+EL3_STATUS),
-		    inw(ioaddr+RxStatus), inb(ioaddr+TxStatus),
-		    inw(ioaddr+TxFree));
-	EL3WINDOW(4);
-	netdev_info(dev, "  diagnostics: fifo %04x net %04x ethernet %04x media %04x\n",
-		    inw(ioaddr+0x04), inw(ioaddr+0x06),
-		    inw(ioaddr+0x08), inw(ioaddr+0x0a));
-	EL3WINDOW(1);
-}
-
-/*
-  Use this for commands that may take time to finish
-*/
-static void tc574_wait_for_completion(struct net_device *dev, int cmd)
-{
-	int i = 1500;
-	outw(cmd, dev->base_addr + EL3_CMD);
-	while (--i > 0)
-		if (!(inw(dev->base_addr + EL3_STATUS) & 0x1000)) break;
-	if (i == 0)
-		netdev_notice(dev, "command 0x%04x did not complete!\n", cmd);
-}
-
-/* Read a word from the EEPROM using the regular EEPROM access register.
-   Assume that we are in register window zero.
- */
-static unsigned short read_eeprom(unsigned int ioaddr, int index)
-{
-	int timer;
-	outw(EEPROM_Read + index, ioaddr + Wn0EepromCmd);
-	/* Pause for at least 162 usec for the read to take place. */
-	for (timer = 1620; timer >= 0; timer--) {
-		if ((inw(ioaddr + Wn0EepromCmd) & 0x8000) == 0)
-			break;
-	}
-	return inw(ioaddr + Wn0EepromData);
-}
-
-/* MII transceiver control section.
-   Read and write the MII registers using software-generated serial
-   MDIO protocol.  See the MII specifications or DP83840A data sheet
-   for details.
-   The maxium data clock rate is 2.5 Mhz.  The timing is easily met by the
-   slow PC card interface. */
-
-#define MDIO_SHIFT_CLK	0x01
-#define MDIO_DIR_WRITE	0x04
-#define MDIO_DATA_WRITE0 (0x00 | MDIO_DIR_WRITE)
-#define MDIO_DATA_WRITE1 (0x02 | MDIO_DIR_WRITE)
-#define MDIO_DATA_READ	0x02
-#define MDIO_ENB_IN		0x00
-
-/* Generate the preamble required for initial synchronization and
-   a few older transceivers. */
-static void mdio_sync(unsigned int ioaddr, int bits)
-{
-	unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt;
-
-	/* Establish sync by sending at least 32 logic ones. */
-	while (-- bits >= 0) {
-		outw(MDIO_DATA_WRITE1, mdio_addr);
-		outw(MDIO_DATA_WRITE1 | MDIO_SHIFT_CLK, mdio_addr);
-	}
-}
-
-static int mdio_read(unsigned int ioaddr, int phy_id, int location)
-{
-	int i;
-	int read_cmd = (0xf6 << 10) | (phy_id << 5) | location;
-	unsigned int retval = 0;
-	unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt;
-
-	if (mii_preamble_required)
-		mdio_sync(ioaddr, 32);
-
-	/* Shift the read command bits out. */
-	for (i = 14; i >= 0; i--) {
-		int dataval = (read_cmd&(1<<i)) ? MDIO_DATA_WRITE1 : MDIO_DATA_WRITE0;
-		outw(dataval, mdio_addr);
-		outw(dataval | MDIO_SHIFT_CLK, mdio_addr);
-	}
-	/* Read the two transition, 16 data, and wire-idle bits. */
-	for (i = 19; i > 0; i--) {
-		outw(MDIO_ENB_IN, mdio_addr);
-		retval = (retval << 1) | ((inw(mdio_addr) & MDIO_DATA_READ) ? 1 : 0);
-		outw(MDIO_ENB_IN | MDIO_SHIFT_CLK, mdio_addr);
-	}
-	return (retval>>1) & 0xffff;
-}
-
-static void mdio_write(unsigned int ioaddr, int phy_id, int location, int value)
-{
-	int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value;
-	unsigned int mdio_addr = ioaddr + Wn4_PhysicalMgmt;
-	int i;
-
-	if (mii_preamble_required)
-		mdio_sync(ioaddr, 32);
-
-	/* Shift the command bits out. */
-	for (i = 31; i >= 0; i--) {
-		int dataval = (write_cmd&(1<<i)) ? MDIO_DATA_WRITE1 : MDIO_DATA_WRITE0;
-		outw(dataval, mdio_addr);
-		outw(dataval | MDIO_SHIFT_CLK, mdio_addr);
-	}
-	/* Leave the interface idle. */
-	for (i = 1; i >= 0; i--) {
-		outw(MDIO_ENB_IN, mdio_addr);
-		outw(MDIO_ENB_IN | MDIO_SHIFT_CLK, mdio_addr);
-	}
-}
-
-/* Reset and restore all of the 3c574 registers. */
-static void tc574_reset(struct net_device *dev)
-{
-	struct el3_private *lp = netdev_priv(dev);
-	int i;
-	unsigned int ioaddr = dev->base_addr;
-	unsigned long flags;
-
-	tc574_wait_for_completion(dev, TotalReset|0x10);
-
-	spin_lock_irqsave(&lp->window_lock, flags);
-	/* Clear any transactions in progress. */
-	outw(0, ioaddr + RunnerWrCtrl);
-	outw(0, ioaddr + RunnerRdCtrl);
-
-	/* Set the station address and mask. */
-	EL3WINDOW(2);
-	for (i = 0; i < 6; i++)
-		outb(dev->dev_addr[i], ioaddr + i);
-	for (; i < 12; i+=2)
-		outw(0, ioaddr + i);
-
-	/* Reset config options */
-	EL3WINDOW(3);
-	outb((dev->mtu > 1500 ? 0x40 : 0), ioaddr + Wn3_MAC_Ctrl);
-	outl((lp->autoselect ? 0x01000000 : 0) | 0x0062001b,
-		 ioaddr + Wn3_Config);
-	/* Roadrunner only: Turn on the MII transceiver. */
-	outw(0x8040, ioaddr + Wn3_Options);
-	mdelay(1);
-	outw(0xc040, ioaddr + Wn3_Options);
-	EL3WINDOW(1);
-	spin_unlock_irqrestore(&lp->window_lock, flags);
-	
-	tc574_wait_for_completion(dev, TxReset);
-	tc574_wait_for_completion(dev, RxReset);
-	mdelay(1);
-	spin_lock_irqsave(&lp->window_lock, flags);
-	EL3WINDOW(3);
-	outw(0x8040, ioaddr + Wn3_Options);
-
-	/* Switch to the stats window, and clear all stats by reading. */
-	outw(StatsDisable, ioaddr + EL3_CMD);
-	EL3WINDOW(6);
-	for (i = 0; i < 10; i++)
-		inb(ioaddr + i);
-	inw(ioaddr + 10);
-	inw(ioaddr + 12);
-	EL3WINDOW(4);
-	inb(ioaddr + 12);
-	inb(ioaddr + 13);
-
-	/* .. enable any extra statistics bits.. */
-	outw(0x0040, ioaddr + Wn4_NetDiag);
-	
-	EL3WINDOW(1);
-	spin_unlock_irqrestore(&lp->window_lock, flags);
-	
-	/* .. re-sync MII and re-fill what NWay is advertising. */
-	mdio_sync(ioaddr, 32);
-	mdio_write(ioaddr, lp->phys, 4, lp->advertising);
-	if (!auto_polarity) {
-		/* works for TDK 78Q2120 series MII's */
-		i = mdio_read(ioaddr, lp->phys, 16) | 0x20;
-		mdio_write(ioaddr, lp->phys, 16, i);
-	}
-
-	spin_lock_irqsave(&lp->window_lock, flags);
-	/* Switch to register set 1 for normal use, just for TxFree. */
-	set_rx_mode(dev);
-	spin_unlock_irqrestore(&lp->window_lock, flags);
-	outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
-	outw(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */
-	outw(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */
-	/* Allow status bits to be seen. */
-	outw(SetStatusEnb | 0xff, ioaddr + EL3_CMD);
-	/* Ack all pending events, and set active indicator mask. */
-	outw(AckIntr | IntLatch | TxAvailable | RxEarly | IntReq,
-		 ioaddr + EL3_CMD);
-	outw(SetIntrEnb | IntLatch | TxAvailable | RxComplete | StatsFull
-		 | AdapterFailure | RxEarly, ioaddr + EL3_CMD);
-}
-
-static int el3_open(struct net_device *dev)
-{
-	struct el3_private *lp = netdev_priv(dev);
-	struct pcmcia_device *link = lp->p_dev;
-
-	if (!pcmcia_dev_present(link))
-		return -ENODEV;
-	
-	link->open++;
-	netif_start_queue(dev);
-	
-	tc574_reset(dev);
-	lp->media.expires = jiffies + HZ;
-	add_timer(&lp->media);
-	
-	dev_dbg(&link->dev, "%s: opened, status %4.4x.\n",
-		  dev->name, inw(dev->base_addr + EL3_STATUS));
-	
-	return 0;
-}
-
-static void el3_tx_timeout(struct net_device *dev, unsigned int txqueue)
-{
-	unsigned int ioaddr = dev->base_addr;
-	
-	netdev_notice(dev, "Transmit timed out!\n");
-	dump_status(dev);
-	dev->stats.tx_errors++;
-	netif_trans_update(dev); /* prevent tx timeout */
-	/* Issue TX_RESET and TX_START commands. */
-	tc574_wait_for_completion(dev, TxReset);
-	outw(TxEnable, ioaddr + EL3_CMD);
-	netif_wake_queue(dev);
-}
-
-static void pop_tx_status(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	int i;
-    
-	/* Clear the Tx status stack. */
-	for (i = 32; i > 0; i--) {
-		u_char tx_status = inb(ioaddr + TxStatus);
-		if (!(tx_status & 0x84))
-			break;
-		/* reset transmitter on jabber error or underrun */
-		if (tx_status & 0x30)
-			tc574_wait_for_completion(dev, TxReset);
-		if (tx_status & 0x38) {
-			pr_debug("%s: transmit error: status 0x%02x\n",
-				  dev->name, tx_status);
-			outw(TxEnable, ioaddr + EL3_CMD);
-			dev->stats.tx_aborted_errors++;
-		}
-		outb(0x00, ioaddr + TxStatus); /* Pop the status stack. */
-	}
-}
-
-static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
-					struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	struct el3_private *lp = netdev_priv(dev);
-	unsigned long flags;
-
-	pr_debug("%s: el3_start_xmit(length = %ld) called, "
-		  "status %4.4x.\n", dev->name, (long)skb->len,
-		  inw(ioaddr + EL3_STATUS));
-
-	spin_lock_irqsave(&lp->window_lock, flags);
-
-	dev->stats.tx_bytes += skb->len;
-
-	/* Put out the doubleword header... */
-	outw(skb->len, ioaddr + TX_FIFO);
-	outw(0, ioaddr + TX_FIFO);
-	/* ... and the packet rounded to a doubleword. */
-	outsl(ioaddr + TX_FIFO, skb->data, (skb->len+3)>>2);
-
-	/* TxFree appears only in Window 1, not offset 0x1c. */
-	if (inw(ioaddr + TxFree) <= 1536) {
-		netif_stop_queue(dev);
-		/* Interrupt us when the FIFO has room for max-sized packet. 
-		   The threshold is in units of dwords. */
-		outw(SetTxThreshold + (1536>>2), ioaddr + EL3_CMD);
-	}
-
-	pop_tx_status(dev);
-	spin_unlock_irqrestore(&lp->window_lock, flags);
-	dev_kfree_skb(skb);
-	return NETDEV_TX_OK;
-}
-
-/* The EL3 interrupt handler. */
-static irqreturn_t el3_interrupt(int irq, void *dev_id)
-{
-	struct net_device *dev = (struct net_device *) dev_id;
-	struct el3_private *lp = netdev_priv(dev);
-	unsigned int ioaddr;
-	unsigned status;
-	int work_budget = max_interrupt_work;
-	int handled = 0;
-
-	if (!netif_device_present(dev))
-		return IRQ_NONE;
-	ioaddr = dev->base_addr;
-
-	pr_debug("%s: interrupt, status %4.4x.\n",
-		  dev->name, inw(ioaddr + EL3_STATUS));
-
-	spin_lock(&lp->window_lock);
-	
-	while ((status = inw(ioaddr + EL3_STATUS)) &
-		   (IntLatch | RxComplete | RxEarly | StatsFull)) {
-		if (!netif_device_present(dev) ||
-			((status & 0xe000) != 0x2000)) {
-			pr_debug("%s: Interrupt from dead card\n", dev->name);
-			break;
-		}
-
-		handled = 1;
-
-		if (status & RxComplete)
-			work_budget = el3_rx(dev, work_budget);
-
-		if (status & TxAvailable) {
-			pr_debug("  TX room bit was handled.\n");
-			/* There's room in the FIFO for a full-sized packet. */
-			outw(AckIntr | TxAvailable, ioaddr + EL3_CMD);
-			netif_wake_queue(dev);
-		}
-
-		if (status & TxComplete)
-			pop_tx_status(dev);
-
-		if (status & (AdapterFailure | RxEarly | StatsFull)) {
-			/* Handle all uncommon interrupts. */
-			if (status & StatsFull)
-				update_stats(dev);
-			if (status & RxEarly) {
-				work_budget = el3_rx(dev, work_budget);
-				outw(AckIntr | RxEarly, ioaddr + EL3_CMD);
-			}
-			if (status & AdapterFailure) {
-				u16 fifo_diag;
-				EL3WINDOW(4);
-				fifo_diag = inw(ioaddr + Wn4_FIFODiag);
-				EL3WINDOW(1);
-				netdev_notice(dev, "adapter failure, FIFO diagnostic register %04x\n",
-					      fifo_diag);
-				if (fifo_diag & 0x0400) {
-					/* Tx overrun */
-					tc574_wait_for_completion(dev, TxReset);
-					outw(TxEnable, ioaddr + EL3_CMD);
-				}
-				if (fifo_diag & 0x2000) {
-					/* Rx underrun */
-					tc574_wait_for_completion(dev, RxReset);
-					set_rx_mode(dev);
-					outw(RxEnable, ioaddr + EL3_CMD);
-				}
-				outw(AckIntr | AdapterFailure, ioaddr + EL3_CMD);
-			}
-		}
-
-		if (--work_budget < 0) {
-			pr_debug("%s: Too much work in interrupt, "
-				  "status %4.4x.\n", dev->name, status);
-			/* Clear all interrupts */
-			outw(AckIntr | 0xFF, ioaddr + EL3_CMD);
-			break;
-		}
-		/* Acknowledge the IRQ. */
-		outw(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD);
-	}
-
-	pr_debug("%s: exiting interrupt, status %4.4x.\n",
-		  dev->name, inw(ioaddr + EL3_STATUS));
-		  
-	spin_unlock(&lp->window_lock);
-	return IRQ_RETVAL(handled);
-}
-
-/*
-    This timer serves two purposes: to check for missed interrupts
-	(and as a last resort, poll the NIC for events), and to monitor
-	the MII, reporting changes in cable status.
-*/
-static void media_check(struct timer_list *t)
-{
-	struct el3_private *lp = timer_container_of(lp, t, media);
-	struct net_device *dev = lp->p_dev->priv;
-	unsigned int ioaddr = dev->base_addr;
-	unsigned long flags;
-	unsigned short /* cable, */ media, partner;
-
-	if (!netif_device_present(dev))
-		goto reschedule;
-	
-	/* Check for pending interrupt with expired latency timer: with
-	   this, we can limp along even if the interrupt is blocked */
-	if ((inw(ioaddr + EL3_STATUS) & IntLatch) && (inb(ioaddr + Timer) == 0xff)) {
-		if (!lp->fast_poll)
-			netdev_info(dev, "interrupt(s) dropped!\n");
-
-		local_irq_save(flags);
-		el3_interrupt(dev->irq, dev);
-		local_irq_restore(flags);
-
-		lp->fast_poll = HZ;
-	}
-	if (lp->fast_poll) {
-		lp->fast_poll--;
-		lp->media.expires = jiffies + 2*HZ/100;
-		add_timer(&lp->media);
-		return;
-	}
-
-	spin_lock_irqsave(&lp->window_lock, flags);
-	EL3WINDOW(4);
-	media = mdio_read(ioaddr, lp->phys, 1);
-	partner = mdio_read(ioaddr, lp->phys, 5);
-	EL3WINDOW(1);
-	
-	if (media != lp->media_status) {
-		if ((media ^ lp->media_status) & 0x0004)
-			netdev_info(dev, "%s link beat\n",
-				    (lp->media_status & 0x0004) ? "lost" : "found");
-		if ((media ^ lp->media_status) & 0x0020) {
-			lp->partner = 0;
-			if (lp->media_status & 0x0020) {
-				netdev_info(dev, "autonegotiation restarted\n");
-			} else if (partner) {
-				partner &= lp->advertising;
-				lp->partner = partner;
-				netdev_info(dev, "autonegotiation complete: "
-					    "%dbaseT-%cD selected\n",
-					    (partner & 0x0180) ? 100 : 10,
-					    (partner & 0x0140) ? 'F' : 'H');
-			} else {
-				netdev_info(dev, "link partner did not autonegotiate\n");
-			}
-
-			EL3WINDOW(3);
-			outb((partner & 0x0140 ? 0x20 : 0) |
-				 (dev->mtu > 1500 ? 0x40 : 0), ioaddr + Wn3_MAC_Ctrl);
-			EL3WINDOW(1);
-
-		}
-		if (media & 0x0010)
-			netdev_info(dev, "remote fault detected\n");
-		if (media & 0x0002)
-			netdev_info(dev, "jabber detected\n");
-		lp->media_status = media;
-	}
-	spin_unlock_irqrestore(&lp->window_lock, flags);
-
-reschedule:
-	lp->media.expires = jiffies + HZ;
-	add_timer(&lp->media);
-}
-
-static struct net_device_stats *el3_get_stats(struct net_device *dev)
-{
-	struct el3_private *lp = netdev_priv(dev);
-
-	if (netif_device_present(dev)) {
-		unsigned long flags;
-		spin_lock_irqsave(&lp->window_lock, flags);
-		update_stats(dev);
-		spin_unlock_irqrestore(&lp->window_lock, flags);
-	}
-	return &dev->stats;
-}
-
-/*  Update statistics.
-	Surprisingly this need not be run single-threaded, but it effectively is.
-	The counters clear when read, so the adds must merely be atomic.
- */
-static void update_stats(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	u8 up;
-
-	pr_debug("%s: updating the statistics.\n", dev->name);
-
-	if (inw(ioaddr+EL3_STATUS) == 0xffff) /* No card. */
-		return;
-		
-	/* Unlike the 3c509 we need not turn off stats updates while reading. */
-	/* Switch to the stats window, and read everything. */
-	EL3WINDOW(6);
-	dev->stats.tx_carrier_errors 		+= inb(ioaddr + 0);
-	dev->stats.tx_heartbeat_errors		+= inb(ioaddr + 1);
-	/* Multiple collisions. */	   	inb(ioaddr + 2);
-	dev->stats.collisions			+= inb(ioaddr + 3);
-	dev->stats.tx_window_errors		+= inb(ioaddr + 4);
-	dev->stats.rx_fifo_errors		+= inb(ioaddr + 5);
-	dev->stats.tx_packets			+= inb(ioaddr + 6);
-	up		 			 = inb(ioaddr + 9);
-	dev->stats.tx_packets			+= (up&0x30) << 4;
-	/* Rx packets   */			   inb(ioaddr + 7);
-	/* Tx deferrals */			   inb(ioaddr + 8);
-	/* rx */				   inw(ioaddr + 10);
-	/* tx */				   inw(ioaddr + 12);
-
-	EL3WINDOW(4);
-	/* BadSSD */				   inb(ioaddr + 12);
-	up					 = inb(ioaddr + 13);
-
-	EL3WINDOW(1);
-}
-
-static int el3_rx(struct net_device *dev, int worklimit)
-{
-	unsigned int ioaddr = dev->base_addr;
-	short rx_status;
-	
-	pr_debug("%s: in rx_packet(), status %4.4x, rx_status %4.4x.\n",
-		  dev->name, inw(ioaddr+EL3_STATUS), inw(ioaddr+RxStatus));
-	while (!((rx_status = inw(ioaddr + RxStatus)) & 0x8000) &&
-			worklimit > 0) {
-		worklimit--;
-		if (rx_status & 0x4000) { /* Error, update stats. */
-			short error = rx_status & 0x3800;
-			dev->stats.rx_errors++;
-			switch (error) {
-			case 0x0000:	dev->stats.rx_over_errors++; break;
-			case 0x0800:	dev->stats.rx_length_errors++; break;
-			case 0x1000:	dev->stats.rx_frame_errors++; break;
-			case 0x1800:	dev->stats.rx_length_errors++; break;
-			case 0x2000:	dev->stats.rx_frame_errors++; break;
-			case 0x2800:	dev->stats.rx_crc_errors++; break;
-			}
-		} else {
-			short pkt_len = rx_status & 0x7ff;
-			struct sk_buff *skb;
-
-			skb = netdev_alloc_skb(dev, pkt_len + 5);
-
-			pr_debug("  Receiving packet size %d status %4.4x.\n",
-				  pkt_len, rx_status);
-			if (skb != NULL) {
-				skb_reserve(skb, 2);
-				insl(ioaddr+RX_FIFO, skb_put(skb, pkt_len),
-						((pkt_len+3)>>2));
-				skb->protocol = eth_type_trans(skb, dev);
-				netif_rx(skb);
-				dev->stats.rx_packets++;
-				dev->stats.rx_bytes += pkt_len;
-			} else {
-				pr_debug("%s: couldn't allocate a sk_buff of"
-					  " size %d.\n", dev->name, pkt_len);
-				dev->stats.rx_dropped++;
-			}
-		}
-		tc574_wait_for_completion(dev, RxDiscard);
-	}
-
-	return worklimit;
-}
-
-/* Provide ioctl() calls to examine the MII xcvr state. */
-static int el3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-{
-	struct el3_private *lp = netdev_priv(dev);
-	unsigned int ioaddr = dev->base_addr;
-	struct mii_ioctl_data *data = if_mii(rq);
-	int phy = lp->phys & 0x1f;
-
-	pr_debug("%s: In ioct(%-.6s, %#4.4x) %4.4x %4.4x %4.4x %4.4x.\n",
-		  dev->name, rq->ifr_ifrn.ifrn_name, cmd,
-		  data->phy_id, data->reg_num, data->val_in, data->val_out);
-
-	switch(cmd) {
-	case SIOCGMIIPHY:		/* Get the address of the PHY in use. */
-		data->phy_id = phy;
-		fallthrough;
-	case SIOCGMIIREG:		/* Read the specified MII register. */
-		{
-			int saved_window;
-			unsigned long flags;
-
-			spin_lock_irqsave(&lp->window_lock, flags);
-			saved_window = inw(ioaddr + EL3_CMD) >> 13;
-			EL3WINDOW(4);
-			data->val_out = mdio_read(ioaddr, data->phy_id & 0x1f,
-						  data->reg_num & 0x1f);
-			EL3WINDOW(saved_window);
-			spin_unlock_irqrestore(&lp->window_lock, flags);
-			return 0;
-		}
-	case SIOCSMIIREG:		/* Write the specified MII register */
-		{
-			int saved_window;
-                       unsigned long flags;
-
-			spin_lock_irqsave(&lp->window_lock, flags);
-			saved_window = inw(ioaddr + EL3_CMD) >> 13;
-			EL3WINDOW(4);
-			mdio_write(ioaddr, data->phy_id & 0x1f,
-				   data->reg_num & 0x1f, data->val_in);
-			EL3WINDOW(saved_window);
-			spin_unlock_irqrestore(&lp->window_lock, flags);
-			return 0;
-		}
-	default:
-		return -EOPNOTSUPP;
-	}
-}
-
-/* The Odie chip has a 64 bin multicast filter, but the bit layout is not
-   documented.  Until it is we revert to receiving all multicast frames when
-   any multicast reception is desired.
-   Note: My other drivers emit a log message whenever promiscuous mode is
-   entered to help detect password sniffers.  This is less desirable on
-   typical PC card machines, so we omit the message.
-   */
-
-static void set_rx_mode(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-
-	if (dev->flags & IFF_PROMISC)
-		outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm,
-			 ioaddr + EL3_CMD);
-	else if (!netdev_mc_empty(dev) || (dev->flags & IFF_ALLMULTI))
-		outw(SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr + EL3_CMD);
-	else
-		outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD);
-}
-
-static void set_multicast_list(struct net_device *dev)
-{
-	struct el3_private *lp = netdev_priv(dev);
-	unsigned long flags;
-
-	spin_lock_irqsave(&lp->window_lock, flags);
-	set_rx_mode(dev);
-	spin_unlock_irqrestore(&lp->window_lock, flags);
-}
-
-static int el3_close(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	struct el3_private *lp = netdev_priv(dev);
-	struct pcmcia_device *link = lp->p_dev;
-
-	dev_dbg(&link->dev, "%s: shutting down ethercard.\n", dev->name);
-	
-	if (pcmcia_dev_present(link)) {
-		unsigned long flags;
-
-		/* Turn off statistics ASAP.  We update lp->stats below. */
-		outw(StatsDisable, ioaddr + EL3_CMD);
-		
-		/* Disable the receiver and transmitter. */
-		outw(RxDisable, ioaddr + EL3_CMD);
-		outw(TxDisable, ioaddr + EL3_CMD);
-		
-		/* Note: Switching to window 0 may disable the IRQ. */
-		EL3WINDOW(0);
-		spin_lock_irqsave(&lp->window_lock, flags);
-		update_stats(dev);
-		spin_unlock_irqrestore(&lp->window_lock, flags);
-
-		/* force interrupts off */
-		outw(SetIntrEnb | 0x0000, ioaddr + EL3_CMD);
-	}
-
-	link->open--;
-	netif_stop_queue(dev);
-	timer_delete_sync(&lp->media);
-
-	return 0;
-}
-
-static const struct pcmcia_device_id tc574_ids[] = {
-	PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0574),
-	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0556, "cis/3CCFEM556.cis"),
-	PCMCIA_DEVICE_NULL,
-};
-MODULE_DEVICE_TABLE(pcmcia, tc574_ids);
-
-static struct pcmcia_driver tc574_driver = {
-	.owner		= THIS_MODULE,
-	.name		= "3c574_cs",
-	.probe		= tc574_probe,
-	.remove		= tc574_detach,
-	.id_table       = tc574_ids,
-	.suspend	= tc574_suspend,
-	.resume		= tc574_resume,
-};
-module_pcmcia_driver(tc574_driver);
drivers/net/ethernet/3com/Kconfig +0 -10
index 3fd3202d9776..294403ad7141 100644
@@ -17,16 +17,6 @@ config NET_VENDOR_3COM
 
 if NET_VENDOR_3COM
 
-config PCMCIA_3C574
-	tristate "3Com 3c574 PCMCIA support"
-	depends on PCMCIA && HAS_IOPORT
-	help
-	  Say Y here if you intend to attach a 3Com 3c574 or compatible PCMCIA
-	  (PC-card) Fast Ethernet card to your computer.
-
-	  To compile this driver as a module, choose M here: the module will be
-	  called 3c574_cs.  If unsure, say N.
-
 config PCMCIA_3C589
 	tristate "3Com 3c589 PCMCIA support"
 	depends on PCMCIA && HAS_IOPORT
drivers/net/ethernet/3com/Makefile +0 -1
index babfd93d5d53..45fb9af9b5c7 100644
@@ -4,6 +4,5 @@
 #
 
 obj-$(CONFIG_PCMCIA_3C589) += 3c589_cs.o
-obj-$(CONFIG_PCMCIA_3C574) += 3c574_cs.o
 obj-$(CONFIG_VORTEX) += 3c59x.o
 obj-$(CONFIG_TYPHOON) += typhoon.o
Signature · 1 line
2.53.0
#4 lore raw

RE: [PATCH net v2 03/15] drivers: net: 3com: 3c574: Remove this driver

Quoted 1 line

The 3c574 was written by Donald Becker between 19973-1998. It is an

Nit: 19973 --> 1993

Quoted 2 lines

PCMCIA device, so unlikely to be used with modern kernels.

maintainer
#5 lore raw

Re: [PATCH net v2 03/15] drivers: net: 3com: 3c574: Remove this driver

Quoted 3 lines · On Thu, 23 Apr 2026 02:14:22 +0000 Wei Fang wrote:
Quoted 1 line

The 3c574 was written by Donald Becker between 19973-1998. It is an

Nit: 19973 --> 1993

Will fix when applying FWIW

#6 lore raw

PATCH v2 4/15 drivers: net: 3com: 3c589: Remove this driver

In reply to Andrew Lunn

The 3c589 was written by David A. Hinds 2001. It is an PCMCIA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/3com/3c589_cs.c | 974 -----------------------------------
 drivers/net/ethernet/3com/Kconfig    |  10 -
 drivers/net/ethernet/3com/Makefile   |   1 -
 3 files changed, 985 deletions(-)
drivers/net/ethernet/3com/3c589_cs.c deleted +0 -974
deleted file mode 100644
index ea49be43b8c3..000000000000
@@ -1,974 +0,0 @@
-/* ======================================================================
- *
- * A PCMCIA ethernet driver for the 3com 3c589 card.
- *
- * Copyright (C) 1999 David A. Hinds -- [email protected]
- *
- * 3c589_cs.c 1.162 2001/10/13 00:08:50
- *
- * The network driver code is based on Donald Becker's 3c589 code:
- *
- * Written 1994 by Donald Becker.
- * Copyright 1993 United States Government as represented by the
- * Director, National Security Agency.  This software may be used and
- * distributed according to the terms of the GNU General Public License,
- * incorporated herein by reference.
- * Donald Becker may be reached at [email protected]
- *
- * Updated for 2.5.x by Alan Cox <[email protected]>
- *
- * ======================================================================
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#define DRV_NAME	"3c589_cs"
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/ptrace.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/interrupt.h>
-#include <linux/in.h>
-#include <linux/delay.h>
-#include <linux/ethtool.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-#include <linux/if_arp.h>
-#include <linux/ioport.h>
-#include <linux/bitops.h>
-#include <linux/jiffies.h>
-#include <linux/uaccess.h>
-#include <linux/io.h>
-
-#include <pcmcia/cistpl.h>
-#include <pcmcia/cisreg.h>
-#include <pcmcia/ciscode.h>
-#include <pcmcia/ds.h>
-
-
-/* To minimize the size of the driver source I only define operating
- * constants if they are used several times. You'll need the manual
- * if you want to understand driver details.
- */
-
-/* Offsets from base I/O address. */
-#define EL3_DATA	0x00
-#define EL3_TIMER	0x0a
-#define EL3_CMD		0x0e
-#define EL3_STATUS	0x0e
-
-#define EEPROM_READ	0x0080
-#define EEPROM_BUSY	0x8000
-
-#define EL3WINDOW(win_num) outw(SelectWindow + (win_num), ioaddr + EL3_CMD)
-
-/* The top five bits written to EL3_CMD are a command, the lower
- * 11 bits are the parameter, if applicable.
- */
-
-enum c509cmd {
-	TotalReset	= 0<<11,
-	SelectWindow	= 1<<11,
-	StartCoax	= 2<<11,
-	RxDisable	= 3<<11,
-	RxEnable	= 4<<11,
-	RxReset		= 5<<11,
-	RxDiscard	= 8<<11,
-	TxEnable	= 9<<11,
-	TxDisable	= 10<<11,
-	TxReset		= 11<<11,
-	FakeIntr	= 12<<11,
-	AckIntr		= 13<<11,
-	SetIntrEnb	= 14<<11,
-	SetStatusEnb	= 15<<11,
-	SetRxFilter	= 16<<11,
-	SetRxThreshold	= 17<<11,
-	SetTxThreshold	= 18<<11,
-	SetTxStart	= 19<<11,
-	StatsEnable	= 21<<11,
-	StatsDisable	= 22<<11,
-	StopCoax	= 23<<11
-};
-
-enum c509status {
-	IntLatch	= 0x0001,
-	AdapterFailure	= 0x0002,
-	TxComplete	= 0x0004,
-	TxAvailable	= 0x0008,
-	RxComplete	= 0x0010,
-	RxEarly		= 0x0020,
-	IntReq		= 0x0040,
-	StatsFull	= 0x0080,
-	CmdBusy		= 0x1000
-};
-
-/* The SetRxFilter command accepts the following classes: */
-enum RxFilter {
-	RxStation	= 1,
-	RxMulticast	= 2,
-	RxBroadcast	= 4,
-	RxProm		= 8
-};
-
-/* Register window 1 offsets, the window used in normal operation. */
-#define TX_FIFO		0x00
-#define RX_FIFO		0x00
-#define RX_STATUS	0x08
-#define TX_STATUS	0x0B
-#define TX_FREE		0x0C	/* Remaining free bytes in Tx buffer. */
-
-#define WN0_IRQ		0x08	/* Window 0: Set IRQ line in bits 12-15. */
-#define WN4_MEDIA	0x0A	/* Window 4: Various transcvr/media bits. */
-#define MEDIA_TP	0x00C0	/* Enable link beat and jabber for 10baseT. */
-#define MEDIA_LED	0x0001	/* Enable link light on 3C589E cards. */
-
-/* Time in jiffies before concluding Tx hung */
-#define TX_TIMEOUT	((400*HZ)/1000)
-
-struct el3_private {
-	struct pcmcia_device	*p_dev;
-	/* For transceiver monitoring */
-	struct timer_list	media;
-	u16			media_status;
-	u16			fast_poll;
-	unsigned long		last_irq;
-	spinlock_t		lock;
-};
-
-static const char *if_names[] = { "auto", "10baseT", "10base2", "AUI" };
-
-/*====================================================================*/
-
-/* Module parameters */
-
-MODULE_AUTHOR("David Hinds <[email protected]>");
-MODULE_DESCRIPTION("3Com 3c589 series PCMCIA ethernet driver");
-MODULE_LICENSE("GPL");
-
-#define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0)
-
-/* Special hook for setting if_port when module is loaded */
-INT_MODULE_PARM(if_port, 0);
-
-
-/*====================================================================*/
-
-static int tc589_config(struct pcmcia_device *link);
-static void tc589_release(struct pcmcia_device *link);
-
-static u16 read_eeprom(unsigned int ioaddr, int index);
-static void tc589_reset(struct net_device *dev);
-static void media_check(struct timer_list *t);
-static int el3_config(struct net_device *dev, struct ifmap *map);
-static int el3_open(struct net_device *dev);
-static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
-					struct net_device *dev);
-static irqreturn_t el3_interrupt(int irq, void *dev_id);
-static void update_stats(struct net_device *dev);
-static struct net_device_stats *el3_get_stats(struct net_device *dev);
-static int el3_rx(struct net_device *dev);
-static int el3_close(struct net_device *dev);
-static void el3_tx_timeout(struct net_device *dev, unsigned int txqueue);
-static void set_rx_mode(struct net_device *dev);
-static void set_multicast_list(struct net_device *dev);
-static const struct ethtool_ops netdev_ethtool_ops;
-
-static void tc589_detach(struct pcmcia_device *p_dev);
-
-static const struct net_device_ops el3_netdev_ops = {
-	.ndo_open		= el3_open,
-	.ndo_stop		= el3_close,
-	.ndo_start_xmit		= el3_start_xmit,
-	.ndo_tx_timeout		= el3_tx_timeout,
-	.ndo_set_config		= el3_config,
-	.ndo_get_stats		= el3_get_stats,
-	.ndo_set_rx_mode	= set_multicast_list,
-	.ndo_set_mac_address	= eth_mac_addr,
-	.ndo_validate_addr	= eth_validate_addr,
-};
-
-static int tc589_probe(struct pcmcia_device *link)
-{
-	struct el3_private *lp;
-	struct net_device *dev;
-	int ret;
-
-	dev_dbg(&link->dev, "3c589_attach()\n");
-
-	/* Create new ethernet device */
-	dev = alloc_etherdev(sizeof(struct el3_private));
-	if (!dev)
-		return -ENOMEM;
-	lp = netdev_priv(dev);
-	link->priv = dev;
-	lp->p_dev = link;
-
-	spin_lock_init(&lp->lock);
-	link->resource[0]->end = 16;
-	link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16;
-
-	link->config_flags |= CONF_ENABLE_IRQ;
-	link->config_index = 1;
-
-	dev->netdev_ops = &el3_netdev_ops;
-	dev->watchdog_timeo = TX_TIMEOUT;
-
-	dev->ethtool_ops = &netdev_ethtool_ops;
-
-	ret = tc589_config(link);
-	if (ret)
-		goto err_free_netdev;
-
-	return 0;
-
-err_free_netdev:
-	free_netdev(dev);
-	return ret;
-}
-
-static void tc589_detach(struct pcmcia_device *link)
-{
-	struct net_device *dev = link->priv;
-
-	dev_dbg(&link->dev, "3c589_detach\n");
-
-	unregister_netdev(dev);
-
-	tc589_release(link);
-
-	free_netdev(dev);
-} /* tc589_detach */
-
-static int tc589_config(struct pcmcia_device *link)
-{
-	struct net_device *dev = link->priv;
-	int ret, i, j, multi = 0, fifo;
-	__be16 addr[ETH_ALEN / 2];
-	unsigned int ioaddr;
-	static const char * const ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
-	u8 *buf;
-	size_t len;
-
-	dev_dbg(&link->dev, "3c589_config\n");
-
-	/* Is this a 3c562? */
-	if (link->manf_id != MANFID_3COM)
-		dev_info(&link->dev, "hmmm, is this really a 3Com card??\n");
-	multi = (link->card_id == PRODID_3COM_3C562);
-
-	link->io_lines = 16;
-
-	/* For the 3c562, the base address must be xx00-xx7f */
-	for (i = j = 0; j < 0x400; j += 0x10) {
-		if (multi && (j & 0x80))
-			continue;
-		link->resource[0]->start = j ^ 0x300;
-		i = pcmcia_request_io(link);
-		if (i == 0)
-			break;
-	}
-	if (i != 0)
-		goto failed;
-
-	ret = pcmcia_request_irq(link, el3_interrupt);
-	if (ret)
-		goto failed;
-
-	ret = pcmcia_enable_device(link);
-	if (ret)
-		goto failed;
-
-	dev->irq = link->irq;
-	dev->base_addr = link->resource[0]->start;
-	ioaddr = dev->base_addr;
-	EL3WINDOW(0);
-
-	/* The 3c589 has an extra EEPROM for configuration info, including
-	 * the hardware address.  The 3c562 puts the address in the CIS.
-	 */
-	len = pcmcia_get_tuple(link, 0x88, &buf);
-	if (buf && len >= 6) {
-		for (i = 0; i < 3; i++)
-			addr[i] = htons(le16_to_cpu(buf[i*2]));
-		kfree(buf);
-	} else {
-		kfree(buf); /* 0 < len < 6 */
-		for (i = 0; i < 3; i++)
-			addr[i] = htons(read_eeprom(ioaddr, i));
-		if (addr[0] == htons(0x6060)) {
-			dev_err(&link->dev, "IO port conflict at 0x%03lx-0x%03lx\n",
-					dev->base_addr, dev->base_addr+15);
-			goto failed;
-		}
-	}
-	eth_hw_addr_set(dev, (u8 *)addr);
-
-	/* The address and resource configuration register aren't loaded from
-	 * the EEPROM and *must* be set to 0 and IRQ3 for the PCMCIA version.
-	 */
-
-	outw(0x3f00, ioaddr + 8);
-	fifo = inl(ioaddr);
-
-	/* The if_port symbol can be set when the module is loaded */
-	if ((if_port >= 0) && (if_port <= 3))
-		dev->if_port = if_port;
-	else
-		dev_err(&link->dev, "invalid if_port requested\n");
-
-	SET_NETDEV_DEV(dev, &link->dev);
-
-	if (register_netdev(dev) != 0) {
-		dev_err(&link->dev, "register_netdev() failed\n");
-		goto failed;
-	}
-
-	netdev_info(dev, "3Com 3c%s, io %#3lx, irq %d, hw_addr %pM\n",
-			(multi ? "562" : "589"), dev->base_addr, dev->irq,
-			dev->dev_addr);
-	netdev_info(dev, "  %dK FIFO split %s Rx:Tx, %s xcvr\n",
-			(fifo & 7) ? 32 : 8, ram_split[(fifo >> 16) & 3],
-			if_names[dev->if_port]);
-	return 0;
-
-failed:
-	tc589_release(link);
-	return -ENODEV;
-} /* tc589_config */
-
-static void tc589_release(struct pcmcia_device *link)
-{
-	pcmcia_disable_device(link);
-}
-
-static int tc589_suspend(struct pcmcia_device *link)
-{
-	struct net_device *dev = link->priv;
-
-	if (link->open)
-		netif_device_detach(dev);
-
-	return 0;
-}
-
-static int tc589_resume(struct pcmcia_device *link)
-{
-	struct net_device *dev = link->priv;
-
-	if (link->open) {
-		tc589_reset(dev);
-		netif_device_attach(dev);
-	}
-
-	return 0;
-}
-
-/*====================================================================*/
-
-/* Use this for commands that may take time to finish */
-
-static void tc589_wait_for_completion(struct net_device *dev, int cmd)
-{
-	int i = 100;
-	outw(cmd, dev->base_addr + EL3_CMD);
-	while (--i > 0)
-		if (!(inw(dev->base_addr + EL3_STATUS) & 0x1000))
-			break;
-	if (i == 0)
-		netdev_warn(dev, "command 0x%04x did not complete!\n", cmd);
-}
-
-/* Read a word from the EEPROM using the regular EEPROM access register.
- * Assume that we are in register window zero.
- */
-
-static u16 read_eeprom(unsigned int ioaddr, int index)
-{
-	int i;
-	outw(EEPROM_READ + index, ioaddr + 10);
-	/* Reading the eeprom takes 162 us */
-	for (i = 1620; i >= 0; i--)
-		if ((inw(ioaddr + 10) & EEPROM_BUSY) == 0)
-			break;
-	return inw(ioaddr + 12);
-}
-
-/* Set transceiver type, perhaps to something other than what the user
- * specified in dev->if_port.
- */
-
-static void tc589_set_xcvr(struct net_device *dev, int if_port)
-{
-	struct el3_private *lp = netdev_priv(dev);
-	unsigned int ioaddr = dev->base_addr;
-
-	EL3WINDOW(0);
-	switch (if_port) {
-	case 0:
-	case 1:
-		outw(0, ioaddr + 6);
-		break;
-	case 2:
-		outw(3<<14, ioaddr + 6);
-		break;
-	case 3:
-		outw(1<<14, ioaddr + 6);
-		break;
-	}
-	/* On PCMCIA, this just turns on the LED */
-	outw((if_port == 2) ? StartCoax : StopCoax, ioaddr + EL3_CMD);
-	/* 10baseT interface, enable link beat and jabber check. */
-	EL3WINDOW(4);
-	outw(MEDIA_LED | ((if_port < 2) ? MEDIA_TP : 0), ioaddr + WN4_MEDIA);
-	EL3WINDOW(1);
-	if (if_port == 2)
-		lp->media_status = ((dev->if_port == 0) ? 0x8000 : 0x4000);
-	else
-		lp->media_status = ((dev->if_port == 0) ? 0x4010 : 0x8800);
-}
-
-static void dump_status(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	EL3WINDOW(1);
-	netdev_info(dev, "  irq status %04x, rx status %04x, tx status %02x  tx free %04x\n",
-			inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS),
-			inb(ioaddr+TX_STATUS), inw(ioaddr+TX_FREE));
-	EL3WINDOW(4);
-	netdev_info(dev, "  diagnostics: fifo %04x net %04x ethernet %04x media %04x\n",
-			inw(ioaddr+0x04), inw(ioaddr+0x06), inw(ioaddr+0x08),
-			inw(ioaddr+0x0a));
-	EL3WINDOW(1);
-}
-
-/* Reset and restore all of the 3c589 registers. */
-static void tc589_reset(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	int i;
-
-	EL3WINDOW(0);
-	outw(0x0001, ioaddr + 4);			/* Activate board. */
-	outw(0x3f00, ioaddr + 8);			/* Set the IRQ line. */
-
-	/* Set the station address in window 2. */
-	EL3WINDOW(2);
-	for (i = 0; i < 6; i++)
-		outb(dev->dev_addr[i], ioaddr + i);
-
-	tc589_set_xcvr(dev, dev->if_port);
-
-	/* Switch to the stats window, and clear all stats by reading. */
-	outw(StatsDisable, ioaddr + EL3_CMD);
-	EL3WINDOW(6);
-	for (i = 0; i < 9; i++)
-		inb(ioaddr+i);
-	inw(ioaddr + 10);
-	inw(ioaddr + 12);
-
-	/* Switch to register set 1 for normal use. */
-	EL3WINDOW(1);
-
-	set_rx_mode(dev);
-	outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
-	outw(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */
-	outw(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */
-	/* Allow status bits to be seen. */
-	outw(SetStatusEnb | 0xff, ioaddr + EL3_CMD);
-	/* Ack all pending events, and set active indicator mask. */
-	outw(AckIntr | IntLatch | TxAvailable | RxEarly | IntReq,
-	 ioaddr + EL3_CMD);
-	outw(SetIntrEnb | IntLatch | TxAvailable | RxComplete | StatsFull
-	 | AdapterFailure, ioaddr + EL3_CMD);
-}
-
-static void netdev_get_drvinfo(struct net_device *dev,
-			       struct ethtool_drvinfo *info)
-{
-	strscpy(info->driver, DRV_NAME, sizeof(info->driver));
-	snprintf(info->bus_info, sizeof(info->bus_info),
-		"PCMCIA 0x%lx", dev->base_addr);
-}
-
-static const struct ethtool_ops netdev_ethtool_ops = {
-	.get_drvinfo		= netdev_get_drvinfo,
-};
-
-static int el3_config(struct net_device *dev, struct ifmap *map)
-{
-	if ((map->port != (u_char)(-1)) && (map->port != dev->if_port)) {
-		if (map->port <= 3) {
-			WRITE_ONCE(dev->if_port, map->port);
-			netdev_info(dev, "switched to %s port\n", if_names[dev->if_port]);
-			tc589_set_xcvr(dev, dev->if_port);
-		} else {
-			return -EINVAL;
-		}
-	}
-	return 0;
-}
-
-static int el3_open(struct net_device *dev)
-{
-	struct el3_private *lp = netdev_priv(dev);
-	struct pcmcia_device *link = lp->p_dev;
-
-	if (!pcmcia_dev_present(link))
-		return -ENODEV;
-
-	link->open++;
-	netif_start_queue(dev);
-
-	tc589_reset(dev);
-	timer_setup(&lp->media, media_check, 0);
-	mod_timer(&lp->media, jiffies + HZ);
-
-	dev_dbg(&link->dev, "%s: opened, status %4.4x.\n",
-	  dev->name, inw(dev->base_addr + EL3_STATUS));
-
-	return 0;
-}
-
-static void el3_tx_timeout(struct net_device *dev, unsigned int txqueue)
-{
-	unsigned int ioaddr = dev->base_addr;
-
-	netdev_warn(dev, "Transmit timed out!\n");
-	dump_status(dev);
-	dev->stats.tx_errors++;
-	netif_trans_update(dev); /* prevent tx timeout */
-	/* Issue TX_RESET and TX_START commands. */
-	tc589_wait_for_completion(dev, TxReset);
-	outw(TxEnable, ioaddr + EL3_CMD);
-	netif_wake_queue(dev);
-}
-
-static void pop_tx_status(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	int i;
-
-	/* Clear the Tx status stack. */
-	for (i = 32; i > 0; i--) {
-		u_char tx_status = inb(ioaddr + TX_STATUS);
-		if (!(tx_status & 0x84))
-			break;
-		/* reset transmitter on jabber error or underrun */
-		if (tx_status & 0x30)
-			tc589_wait_for_completion(dev, TxReset);
-		if (tx_status & 0x38) {
-			netdev_dbg(dev, "transmit error: status 0x%02x\n", tx_status);
-			outw(TxEnable, ioaddr + EL3_CMD);
-			dev->stats.tx_aborted_errors++;
-		}
-		outb(0x00, ioaddr + TX_STATUS); /* Pop the status stack. */
-	}
-}
-
-static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
-					struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	struct el3_private *priv = netdev_priv(dev);
-	unsigned long flags;
-
-	netdev_dbg(dev, "el3_start_xmit(length = %ld) called, status %4.4x.\n",
-	       (long)skb->len, inw(ioaddr + EL3_STATUS));
-
-	spin_lock_irqsave(&priv->lock, flags);
-
-	dev->stats.tx_bytes += skb->len;
-
-	/* Put out the doubleword header... */
-	outw(skb->len, ioaddr + TX_FIFO);
-	outw(0x00, ioaddr + TX_FIFO);
-	/* ... and the packet rounded to a doubleword. */
-	outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-
-	if (inw(ioaddr + TX_FREE) <= 1536) {
-		netif_stop_queue(dev);
-		/* Interrupt us when the FIFO has room for max-sized packet. */
-		outw(SetTxThreshold + 1536, ioaddr + EL3_CMD);
-	}
-
-	pop_tx_status(dev);
-	spin_unlock_irqrestore(&priv->lock, flags);
-	dev_kfree_skb(skb);
-
-	return NETDEV_TX_OK;
-}
-
-/* The EL3 interrupt handler. */
-static irqreturn_t el3_interrupt(int irq, void *dev_id)
-{
-	struct net_device *dev = (struct net_device *) dev_id;
-	struct el3_private *lp = netdev_priv(dev);
-	unsigned int ioaddr;
-	__u16 status;
-	int i = 0, handled = 1;
-
-	if (!netif_device_present(dev))
-		return IRQ_NONE;
-
-	ioaddr = dev->base_addr;
-
-	netdev_dbg(dev, "interrupt, status %4.4x.\n", inw(ioaddr + EL3_STATUS));
-
-	spin_lock(&lp->lock);
-	while ((status = inw(ioaddr + EL3_STATUS)) &
-	(IntLatch | RxComplete | StatsFull)) {
-		if ((status & 0xe000) != 0x2000) {
-			netdev_dbg(dev, "interrupt from dead card\n");
-			handled = 0;
-			break;
-		}
-		if (status & RxComplete)
-			el3_rx(dev);
-		if (status & TxAvailable) {
-			netdev_dbg(dev, "    TX room bit was handled.\n");
-			/* There's room in the FIFO for a full-sized packet. */
-			outw(AckIntr | TxAvailable, ioaddr + EL3_CMD);
-			netif_wake_queue(dev);
-		}
-		if (status & TxComplete)
-			pop_tx_status(dev);
-		if (status & (AdapterFailure | RxEarly | StatsFull)) {
-			/* Handle all uncommon interrupts. */
-			if (status & StatsFull)		/* Empty statistics. */
-				update_stats(dev);
-			if (status & RxEarly) {
-				/* Rx early is unused. */
-				el3_rx(dev);
-				outw(AckIntr | RxEarly, ioaddr + EL3_CMD);
-			}
-			if (status & AdapterFailure) {
-				u16 fifo_diag;
-				EL3WINDOW(4);
-				fifo_diag = inw(ioaddr + 4);
-				EL3WINDOW(1);
-				netdev_warn(dev, "adapter failure, FIFO diagnostic register %04x.\n",
-			    fifo_diag);
-				if (fifo_diag & 0x0400) {
-					/* Tx overrun */
-					tc589_wait_for_completion(dev, TxReset);
-					outw(TxEnable, ioaddr + EL3_CMD);
-				}
-				if (fifo_diag & 0x2000) {
-					/* Rx underrun */
-					tc589_wait_for_completion(dev, RxReset);
-					set_rx_mode(dev);
-					outw(RxEnable, ioaddr + EL3_CMD);
-				}
-				outw(AckIntr | AdapterFailure, ioaddr + EL3_CMD);
-			}
-		}
-		if (++i > 10) {
-			netdev_err(dev, "infinite loop in interrupt, status %4.4x.\n",
-					status);
-			/* Clear all interrupts */
-			outw(AckIntr | 0xFF, ioaddr + EL3_CMD);
-			break;
-		}
-		/* Acknowledge the IRQ. */
-		outw(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD);
-	}
-	lp->last_irq = jiffies;
-	spin_unlock(&lp->lock);
-	netdev_dbg(dev, "exiting interrupt, status %4.4x.\n",
-			inw(ioaddr + EL3_STATUS));
-	return IRQ_RETVAL(handled);
-}
-
-static void media_check(struct timer_list *t)
-{
-	struct el3_private *lp = timer_container_of(lp, t, media);
-	struct net_device *dev = lp->p_dev->priv;
-	unsigned int ioaddr = dev->base_addr;
-	u16 media, errs;
-	unsigned long flags;
-
-	if (!netif_device_present(dev))
-		goto reschedule;
-
-	/* Check for pending interrupt with expired latency timer: with
-	 * this, we can limp along even if the interrupt is blocked
-	 */
-	if ((inw(ioaddr + EL3_STATUS) & IntLatch) &&
-	(inb(ioaddr + EL3_TIMER) == 0xff)) {
-		if (!lp->fast_poll)
-			netdev_warn(dev, "interrupt(s) dropped!\n");
-
-		local_irq_save(flags);
-		el3_interrupt(dev->irq, dev);
-		local_irq_restore(flags);
-
-		lp->fast_poll = HZ;
-	}
-	if (lp->fast_poll) {
-		lp->fast_poll--;
-		lp->media.expires = jiffies + HZ/100;
-		add_timer(&lp->media);
-		return;
-	}
-
-	/* lp->lock guards the EL3 window. Window should always be 1 except
-	 * when the lock is held
-	 */
-
-	spin_lock_irqsave(&lp->lock, flags);
-	EL3WINDOW(4);
-	media = inw(ioaddr+WN4_MEDIA) & 0xc810;
-
-	/* Ignore collisions unless we've had no irq's recently */
-	if (time_before(jiffies, lp->last_irq + HZ)) {
-		media &= ~0x0010;
-	} else {
-		/* Try harder to detect carrier errors */
-		EL3WINDOW(6);
-		outw(StatsDisable, ioaddr + EL3_CMD);
-		errs = inb(ioaddr + 0);
-		outw(StatsEnable, ioaddr + EL3_CMD);
-		dev->stats.tx_carrier_errors += errs;
-		if (errs || (lp->media_status & 0x0010))
-			media |= 0x0010;
-	}
-
-	if (media != lp->media_status) {
-		if ((media & lp->media_status & 0x8000) &&
-				((lp->media_status ^ media) & 0x0800))
-		netdev_info(dev, "%s link beat\n",
-				(lp->media_status & 0x0800 ? "lost" : "found"));
-		else if ((media & lp->media_status & 0x4000) &&
-		 ((lp->media_status ^ media) & 0x0010))
-		netdev_info(dev, "coax cable %s\n",
-				(lp->media_status & 0x0010 ? "ok" : "problem"));
-		if (dev->if_port == 0) {
-			if (media & 0x8000) {
-				if (media & 0x0800)
-					netdev_info(dev, "flipped to 10baseT\n");
-				else
-			tc589_set_xcvr(dev, 2);
-			} else if (media & 0x4000) {
-				if (media & 0x0010)
-					tc589_set_xcvr(dev, 1);
-				else
-					netdev_info(dev, "flipped to 10base2\n");
-			}
-		}
-		lp->media_status = media;
-	}
-
-	EL3WINDOW(1);
-	spin_unlock_irqrestore(&lp->lock, flags);
-
-reschedule:
-	lp->media.expires = jiffies + HZ;
-	add_timer(&lp->media);
-}
-
-static struct net_device_stats *el3_get_stats(struct net_device *dev)
-{
-	struct el3_private *lp = netdev_priv(dev);
-	unsigned long flags;
-	struct pcmcia_device *link = lp->p_dev;
-
-	if (pcmcia_dev_present(link)) {
-		spin_lock_irqsave(&lp->lock, flags);
-		update_stats(dev);
-		spin_unlock_irqrestore(&lp->lock, flags);
-	}
-	return &dev->stats;
-}
-
-/* Update statistics.  We change to register window 6, so this should be run
-* single-threaded if the device is active. This is expected to be a rare
-* operation, and it's simpler for the rest of the driver to assume that
-* window 1 is always valid rather than use a special window-state variable.
-*
-* Caller must hold the lock for this
-*/
-
-static void update_stats(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-
-	netdev_dbg(dev, "updating the statistics.\n");
-	/* Turn off statistics updates while reading. */
-	outw(StatsDisable, ioaddr + EL3_CMD);
-	/* Switch to the stats window, and read everything. */
-	EL3WINDOW(6);
-	dev->stats.tx_carrier_errors	+= inb(ioaddr + 0);
-	dev->stats.tx_heartbeat_errors	+= inb(ioaddr + 1);
-	/* Multiple collisions. */
-	inb(ioaddr + 2);
-	dev->stats.collisions		+= inb(ioaddr + 3);
-	dev->stats.tx_window_errors		+= inb(ioaddr + 4);
-	dev->stats.rx_fifo_errors		+= inb(ioaddr + 5);
-	dev->stats.tx_packets		+= inb(ioaddr + 6);
-	/* Rx packets   */
-	inb(ioaddr + 7);
-	/* Tx deferrals */
-	inb(ioaddr + 8);
-	/* Rx octets */
-	inw(ioaddr + 10);
-	/* Tx octets */
-	inw(ioaddr + 12);
-
-	/* Back to window 1, and turn statistics back on. */
-	EL3WINDOW(1);
-	outw(StatsEnable, ioaddr + EL3_CMD);
-}
-
-static int el3_rx(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	int worklimit = 32;
-	short rx_status;
-
-	netdev_dbg(dev, "in rx_packet(), status %4.4x, rx_status %4.4x.\n",
-	       inw(ioaddr+EL3_STATUS), inw(ioaddr+RX_STATUS));
-	while (!((rx_status = inw(ioaddr + RX_STATUS)) & 0x8000) &&
-		    worklimit > 0) {
-		worklimit--;
-		if (rx_status & 0x4000) { /* Error, update stats. */
-			short error = rx_status & 0x3800;
-			dev->stats.rx_errors++;
-			switch (error) {
-			case 0x0000:
-				dev->stats.rx_over_errors++;
-				break;
-			case 0x0800:
-				dev->stats.rx_length_errors++;
-				break;
-			case 0x1000:
-				dev->stats.rx_frame_errors++;
-				break;
-			case 0x1800:
-				dev->stats.rx_length_errors++;
-				break;
-			case 0x2000:
-				dev->stats.rx_frame_errors++;
-				break;
-			case 0x2800:
-				dev->stats.rx_crc_errors++;
-				break;
-			}
-		} else {
-			short pkt_len = rx_status & 0x7ff;
-			struct sk_buff *skb;
-
-			skb = netdev_alloc_skb(dev, pkt_len + 5);
-
-			netdev_dbg(dev, "    Receiving packet size %d status %4.4x.\n",
-		       pkt_len, rx_status);
-			if (skb != NULL) {
-				skb_reserve(skb, 2);
-				insl(ioaddr+RX_FIFO, skb_put(skb, pkt_len),
-			(pkt_len+3)>>2);
-				skb->protocol = eth_type_trans(skb, dev);
-				netif_rx(skb);
-				dev->stats.rx_packets++;
-				dev->stats.rx_bytes += pkt_len;
-			} else {
-				netdev_dbg(dev, "couldn't allocate a sk_buff of size %d.\n",
-			   pkt_len);
-				dev->stats.rx_dropped++;
-			}
-		}
-		/* Pop the top of the Rx FIFO */
-		tc589_wait_for_completion(dev, RxDiscard);
-	}
-	if (worklimit == 0)
-		netdev_warn(dev, "too much work in el3_rx!\n");
-	return 0;
-}
-
-static void set_rx_mode(struct net_device *dev)
-{
-	unsigned int ioaddr = dev->base_addr;
-	u16 opts = SetRxFilter | RxStation | RxBroadcast;
-
-	if (dev->flags & IFF_PROMISC)
-		opts |= RxMulticast | RxProm;
-	else if (!netdev_mc_empty(dev) || (dev->flags & IFF_ALLMULTI))
-		opts |= RxMulticast;
-	outw(opts, ioaddr + EL3_CMD);
-}
-
-static void set_multicast_list(struct net_device *dev)
-{
-	struct el3_private *priv = netdev_priv(dev);
-	unsigned long flags;
-
-	spin_lock_irqsave(&priv->lock, flags);
-	set_rx_mode(dev);
-	spin_unlock_irqrestore(&priv->lock, flags);
-}
-
-static int el3_close(struct net_device *dev)
-{
-	struct el3_private *lp = netdev_priv(dev);
-	struct pcmcia_device *link = lp->p_dev;
-	unsigned int ioaddr = dev->base_addr;
-
-	dev_dbg(&link->dev, "%s: shutting down ethercard.\n", dev->name);
-
-	if (pcmcia_dev_present(link)) {
-		/* Turn off statistics ASAP.  We update dev->stats below. */
-		outw(StatsDisable, ioaddr + EL3_CMD);
-
-		/* Disable the receiver and transmitter. */
-		outw(RxDisable, ioaddr + EL3_CMD);
-		outw(TxDisable, ioaddr + EL3_CMD);
-
-		if (dev->if_port == 2)
-			/* Turn off thinnet power.  Green! */
-			outw(StopCoax, ioaddr + EL3_CMD);
-		else if (dev->if_port == 1) {
-			/* Disable link beat and jabber */
-			EL3WINDOW(4);
-			outw(0, ioaddr + WN4_MEDIA);
-		}
-
-		/* Switching back to window 0 disables the IRQ. */
-		EL3WINDOW(0);
-		/* But we explicitly zero the IRQ line select anyway. */
-		outw(0x0f00, ioaddr + WN0_IRQ);
-
-		/* Check if the card still exists */
-		if ((inw(ioaddr+EL3_STATUS) & 0xe000) == 0x2000)
-			update_stats(dev);
-	}
-
-	link->open--;
-	netif_stop_queue(dev);
-	timer_delete_sync(&lp->media);
-
-	return 0;
-}
-
-static const struct pcmcia_device_id tc589_ids[] = {
-	PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0101, 0x0562),
-	PCMCIA_MFC_DEVICE_PROD_ID1(0, "Motorola MARQUIS", 0xf03e4e77),
-	PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0589),
-	PCMCIA_DEVICE_PROD_ID12("Farallon", "ENet", 0x58d93fc4, 0x992c2202),
-	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x0035, "cis/3CXEM556.cis"),
-	PCMCIA_MFC_DEVICE_CIS_MANF_CARD(0, 0x0101, 0x003d, "cis/3CXEM556.cis"),
-	PCMCIA_DEVICE_NULL,
-};
-MODULE_DEVICE_TABLE(pcmcia, tc589_ids);
-
-static struct pcmcia_driver tc589_driver = {
-	.owner		= THIS_MODULE,
-	.name		= "3c589_cs",
-	.probe		= tc589_probe,
-	.remove		= tc589_detach,
-	.id_table	= tc589_ids,
-	.suspend	= tc589_suspend,
-	.resume		= tc589_resume,
-};
-module_pcmcia_driver(tc589_driver);
drivers/net/ethernet/3com/Kconfig +0 -10
index 294403ad7141..399cb6c56198 100644
@@ -17,16 +17,6 @@ config NET_VENDOR_3COM
 
 if NET_VENDOR_3COM
 
-config PCMCIA_3C589
-	tristate "3Com 3c589 PCMCIA support"
-	depends on PCMCIA && HAS_IOPORT
-	help
-	  Say Y here if you intend to attach a 3Com 3c589 or compatible PCMCIA
-	  (PC-card) Ethernet card to your computer.
-
-	  To compile this driver as a module, choose M here: the module will be
-	  called 3c589_cs.  If unsure, say N.
-
 config VORTEX
 	tristate "3c590/3c900 series (592/595/597) \"Vortex/Boomerang\" support"
 	depends on (PCI || EISA) && HAS_IOPORT_MAP
drivers/net/ethernet/3com/Makefile +0 -1
index 45fb9af9b5c7..5c4d07f1d456 100644
@@ -3,6 +3,5 @@
 # Makefile for the 3Com Ethernet device drivers
 #
 
-obj-$(CONFIG_PCMCIA_3C589) += 3c589_cs.o
 obj-$(CONFIG_VORTEX) += 3c59x.o
 obj-$(CONFIG_TYPHOON) += typhoon.o
Signature · 1 line
2.53.0
#7 lore raw

PATCH v2 5/15 drivers: net: amd: lance: Remove this driver

In reply to Andrew Lunn

The lance was written by Donald Becker between 1993-1998. It is an ISA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/amd/Kconfig  |   11 -
 drivers/net/ethernet/amd/Makefile |    1 -
 drivers/net/ethernet/amd/lance.c  | 1317 -------------------------------------
 3 files changed, 1329 deletions(-)
drivers/net/ethernet/amd/Kconfig +0 -11
index 45e8d698781c..c5abb81977dd 100644
@@ -43,17 +43,6 @@ config AMD8111_ETH
 	  To compile this driver as a module, choose M here. The module
 	  will be called amd8111e.
 
-config LANCE
-	tristate "AMD LANCE and PCnet (AT1500 and NE2100) support"
-	depends on ISA && ISA_DMA_API && !ARM && !PPC32
-	select NETDEV_LEGACY_INIT
-	help
-	  If you have a network (Ethernet) card of this type, say Y here.
-	  Some LinkSys cards are of this type.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called lance.  This is recommended.
-
 config PCNET32
 	tristate "AMD PCnet32 PCI support"
 	depends on PCI && HAS_IOPORT
drivers/net/ethernet/amd/Makefile +0 -1
index 2dcfb84731e1..f261501f7324 100644
@@ -9,7 +9,6 @@ obj-$(CONFIG_ARIADNE) += ariadne.o
 obj-$(CONFIG_ATARILANCE) += atarilance.o
 obj-$(CONFIG_DECLANCE) += declance.o
 obj-$(CONFIG_HPLANCE) += hplance.o 7990.o
-obj-$(CONFIG_LANCE) += lance.o
 obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o
 obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o
 obj-$(CONFIG_PCMCIA_NMCLAN) += nmclan_cs.o
drivers/net/ethernet/amd/lance.c deleted +0 -1317

1,317 lines not on this page · raw message

Signature · 1 line
2.53.0
#8 lore raw

PATCH v2 6/15 drivers: net: amd: nmclan: Remove this driver

In reply to Andrew Lunn

The nmclan was written by Roger C Pao in 1995. It is an PCMCIA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/amd/Kconfig     |   10 -
 drivers/net/ethernet/amd/Makefile    |    1 -
 drivers/net/ethernet/amd/nmclan_cs.c | 1508 ----------------------------------
 3 files changed, 1519 deletions(-)
drivers/net/ethernet/amd/Kconfig +0 -10
index c5abb81977dd..e35991141a1a 100644
@@ -109,16 +109,6 @@ config MVME147_NET
 	  driver for this chip in your kernel.
 	  To compile this driver as a module, choose M here.
 
-config PCMCIA_NMCLAN
-	tristate "New Media PCMCIA support"
-	depends on PCMCIA && HAS_IOPORT
-	help
-	  Say Y here if you intend to attach a New Media Ethernet or LiveWire
-	  PCMCIA (PC-card) Ethernet card to your computer.
-
-	  To compile this driver as a module, choose M here: the module will be
-	  called nmclan_cs.  If unsure, say N.
-
 config SUN3LANCE
 	tristate "Sun3/Sun3x on-board LANCE support"
 	depends on (SUN3 || SUN3X)
drivers/net/ethernet/amd/Makefile +0 -1
index f261501f7324..e485fae235a7 100644
@@ -11,7 +11,6 @@ obj-$(CONFIG_DECLANCE) += declance.o
 obj-$(CONFIG_HPLANCE) += hplance.o 7990.o
 obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o
 obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o
-obj-$(CONFIG_PCMCIA_NMCLAN) += nmclan_cs.o
 obj-$(CONFIG_PCNET32) += pcnet32.o
 obj-$(CONFIG_SUN3LANCE) += sun3lance.o
 obj-$(CONFIG_SUNLANCE) += sunlance.o
drivers/net/ethernet/amd/nmclan_cs.c deleted +0 -1508

1,508 lines not on this page · raw message

Signature · 1 line
2.53.0
#9 lore raw

PATCH v2 7/15 drivers: net: smsc: smc9194: Remove this driver

In reply to Andrew Lunn

The smc9194 was written by Erik Stahlman in 1996. It is an ISA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/smsc/Kconfig   |   15 -
 drivers/net/ethernet/smsc/Makefile  |    1 -
 drivers/net/ethernet/smsc/smc9194.c | 1535 -----------------------------------
 3 files changed, 1551 deletions(-)
drivers/net/ethernet/smsc/Kconfig +0 -15
index 13ce9086a9ca..d25bbcc98854 100644
@@ -19,21 +19,6 @@ config NET_VENDOR_SMSC
 
 if NET_VENDOR_SMSC
 
-config SMC9194
-	tristate "SMC 9194 support"
-	depends on ISA
-	select CRC32
-	select NETDEV_LEGACY_INIT
-	help
-	  This is support for the SMC9xxx based Ethernet cards. Choose this
-	  option if you have a DELL laptop with the docking station, or
-	  another SMC9192/9194 based chipset.  Say Y if you want it compiled
-	  into the kernel, and read the file
-	  <file:Documentation/networking/device_drivers/ethernet/smsc/smc9.rst>.
-
-	  To compile this driver as a module, choose M here. The module
-	  will be called smc9194.
-
 config SMC91X
 	tristate "SMC 91C9x/91C1xxx support"
 	select CRC32
drivers/net/ethernet/smsc/Makefile +0 -1
index 1501fa364c13..afea0b94c2a4 100644
@@ -3,7 +3,6 @@
 # Makefile for the SMSC network device drivers.
 #
 
-obj-$(CONFIG_SMC9194) += smc9194.o
 obj-$(CONFIG_SMC91X) += smc91x.o
 obj-$(CONFIG_PCMCIA_SMC91C92) += smc91c92_cs.o
 obj-$(CONFIG_EPIC100) += epic100.o
drivers/net/ethernet/smsc/smc9194.c deleted +0 -1535

1,535 lines not on this page · raw message

Signature · 1 line
2.53.0
#10 lore raw

PATCH v2 8/15 drivers: net: smsc: smc91c92: Remove this driver

In reply to Andrew Lunn

The smc91c92 was written by David A Hinds in 1999. It is an PCMCIA device, so unlikely to be used with modern kernels.

Remove the Documentation as well, since it refers to kernel versions 1.2.13 until 1.3.71 and FTP sites which no longer exist.

---
v2
Remove document as well

---
 .../device_drivers/ethernet/smsc/smc9.rst          |   48 -
 drivers/net/ethernet/smsc/Kconfig                  |   12 -
 drivers/net/ethernet/smsc/Makefile                 |    1 -
 drivers/net/ethernet/smsc/smc91c92_cs.c            | 2059 --------------------
 4 files changed, 2120 deletions(-)
Documentation/networking/device_drivers/ethernet/smsc/smc9.rst deleted +0 -48
deleted file mode 100644
index e5eac896a631..000000000000
@@ -1,48 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0
-
-================
-SMC 9xxxx Driver
-================
-
-Revision 0.12
-
-3/5/96
-
-Copyright 1996  Erik Stahlman
-
-Released under terms of the GNU General Public License.
-
-This file contains the instructions and caveats for my SMC9xxx driver.  You
-should not be using the driver without reading this file.
-
-Things to note about installation:
-
-  1. The driver should work on all kernels from 1.2.13 until 1.3.71.
-     (A kernel patch is supplied for 1.3.71 )
-
-  2. If you include this into the kernel, you might need to change some
-     options, such as for forcing IRQ.
-
-
-  3.  To compile as a module, run 'make'.
-      Make will give you the appropriate options for various kernel support.
-
-  4.  Loading the driver as a module::
-
-	use:   insmod smc9194.o
-	optional parameters:
-		io=xxxx    : your base address
-		irq=xx	   : your irq
-		ifport=x   :	0 for whatever is default
-				1 for twisted pair
-				2 for AUI  ( or BNC on some cards )
-
-How to obtain the latest version?
-
-FTP:
-	ftp://fenris.campus.vt.edu/smc9/smc9-12.tar.gz
-	ftp://sfbox.vt.edu/filebox/F/fenris/smc9/smc9-12.tar.gz
-
-
-Contacting me:
-    [email protected]
drivers/net/ethernet/smsc/Kconfig +0 -12
index d25bbcc98854..66bca803b19c 100644
@@ -37,18 +37,6 @@ config SMC91X
 	  The module will be called smc91x.  If you want to compile it as a
 	  module, say M here and read <file:Documentation/kbuild/modules.rst>.
 
-config PCMCIA_SMC91C92
-	tristate "SMC 91Cxx PCMCIA support"
-	depends on PCMCIA && HAS_IOPORT
-	select CRC32
-	select MII
-	help
-	  Say Y here if you intend to attach an SMC 91Cxx compatible PCMCIA
-	  (PC-card) Ethernet or Fast Ethernet card to your computer.
-
-	  To compile this driver as a module, choose M here: the module will be
-	  called smc91c92_cs.  If unsure, say N.
-
 config EPIC100
 	tristate "SMC EtherPower II"
 	depends on PCI
drivers/net/ethernet/smsc/Makefile +0 -1
index afea0b94c2a4..ab6f03f7ba17 100644
@@ -4,7 +4,6 @@
 #
 
 obj-$(CONFIG_SMC91X) += smc91x.o
-obj-$(CONFIG_PCMCIA_SMC91C92) += smc91c92_cs.o
 obj-$(CONFIG_EPIC100) += epic100.o
 obj-$(CONFIG_SMSC9420) += smsc9420.o
 obj-$(CONFIG_SMSC911X) += smsc911x.o
drivers/net/ethernet/smsc/smc91c92_cs.c deleted +0 -2059

2,059 lines not on this page · raw message

Signature · 1 line
2.53.0
#11 lore raw

PATCH v2 9/15 drivers: net: cirrus: cs89x0: Remove this driver

In reply to Andrew Lunn

The cs89x0 was written by Bonald Becker 1993 to 1994. It is an ISA device, so unlikely to be used with modern kernels.

---
v2
Remove documentation as well

---
 .../device_drivers/ethernet/cirrus/cs89x0.rst      |  647 -------
 drivers/net/ethernet/cirrus/Kconfig                |   30 -
 drivers/net/ethernet/cirrus/Makefile               |    1 -
 drivers/net/ethernet/cirrus/cs89x0.c               | 1915 --------------------
 4 files changed, 2593 deletions(-)
Documentation/networking/device_drivers/ethernet/cirrus/cs89x0.rst deleted +0 -647
deleted file mode 100644
index e5c283940ac5..000000000000
@@ -1,647 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0
-
-================================================
-Cirrus Logic LAN CS8900/CS8920 Ethernet Adapters
-================================================
-
-.. note::
-
-   This document was contributed by Cirrus Logic for kernel 2.2.5.  This version
-   has been updated for 2.3.48 by Andrew Morton.
-
-   Still, this is too outdated! A major cleanup is needed here.
-
-Cirrus make a copy of this driver available at their website, as
-described below.  In general, you should use the driver version which
-comes with your Linux distribution.
-
-
-Linux Network Interface Driver ver. 2.00 <kernel 2.3.48>
-
-
-.. TABLE OF CONTENTS
-
-   1.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 Information
-
-   2.0 ADAPTER INSTALLATION and CONFIGURATION
-	2.1 CS8900-based Adapter Configuration
-	2.2 CS8920-based Adapter Configuration
-
-   3.0 LOADING THE DRIVER AS A MODULE
-
-   4.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
-
-   5.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 Conflicts
-
-   6.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 maintainer
-	6.5 Kernel boot parameters
-
-
-1. Cirrus Logic LAN CS8900/CS8920 Ethernet Adapters
-===================================================
-
-
-1.1. Product Overview
-=====================
-
-The 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 Description
-=======================
-
-The CS8900/CS8920 Ethernet Adapter driver for Linux supports the Linux
-v2.3.48 or greater kernel.  It can be compiled directly into the kernel
-or loaded at run-time as a device driver module.
-
-1.2.1 Driver Name: cs89x0
-
-1.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 Requirements
-------------------------
-
-The 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 Information
---------------------------
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation, version 1.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY 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 Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-
-
-2. 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 Configuration
----------------------------------------
-
-CS8900-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 Configuration
----------------------------------------
-
-CS8920-based adapters are shipped from Cirrus Logic configured as Plug
-and Play (PnP) enabled.  However, since the cs89x0 driver does NOT
-support PnP, you must install the CS8920 adapter in a DOS-based PC and
-run the CS8900/20 Setup Utility to disable PnP and configure the
-adapter before installation in the target Linux system.  Failure to do
-this will leave the adapter inactive and the driver will be unable to
-communicate 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. Loading the Driver as a Module
-=================================
-
-If the driver is compiled as a loadable module, you can load the driver module
-with 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=aui
-
-This example loads the module and configures the adapter to use an IO port base
-address of 200h, interrupt 10, and use the AUI media connection.  The following
-configuration 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 media=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
-   to partially 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 = 0
-
-g) 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/isapnp
-
-l) 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. Compiling the Driver
-=======================
-
-The cs89x0 driver can be compiled directly into the kernel or compiled into
-a loadable device driver module.
-
-Just use the standard way to configure the driver and compile the Kernel.
-
-
-4.1. Compiling the Driver to Support Rx DMA
--------------------------------------------
-
-The compile-time optionality for DMA was removed in the 2.3 kernel
-series.  DMA support is now unconditionally part of the driver.  It is
-enabled by the 'use_dma=1' module option.
-
-
-5. Testing and Troubleshooting
-==============================
-
-5.1. Known Defects and Limitations
-----------------------------------
-
-Refer to the RELEASE.TXT file distributed as part of this archive for a list of
-known defects, driver limitations, and work arounds.
-
-
-5.2. Testing the Adapter
-------------------------
-
-Once the adapter has been installed and configured, the diagnostic option of
-the CS8900/20 Setup Utility can be used to test the functionality of the
-adapter and its network connection.  Use the diagnostics 'Self Test' option to
-test the functionality of the adapter with the hardware configuration you have
-assigned. You can use the diagnostics 'Network Test' to test the ability of the
-adapter to communicate across the Ethernet with another PC equipped with a
-CS8900/20-based adapter card (it must also be running the CS8900/20 Setup
-Utility).
-
-.. note::
-
-	 The Setup Utility's diagnostics are designed to run in a
-	 DOS-only operating system environment.  DO NOT run the diagnostics
-	 from a DOS or command prompt session under Windows 95, Windows NT,
-	 OS/2, or other operating system.
-
-To run the diagnostics tests on the CS8900/20 adapter:
-
-   1.  Boot DOS on the PC and start the CS8900/20 Setup Utility.
-
-   2.  The adapter's current configuration is displayed.  Hit the ENTER key to
-       get to the main menu.
-
-   4.  Select 'Diagnostics' (ALT-G) from the main menu.
-       * Select 'Self-Test' to test the adapter's basic functionality.
-       * Select 'Network Test' to test the network connection and cabling.
-
-
-5.2.1. Diagnostic Self-test
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The diagnostic self-test checks the adapter's basic functionality as well as
-its ability to communicate across the ISA bus based on the system resources
-assigned during hardware configuration.  The following tests are performed:
-
-   * IO Register Read/Write Test
-
-     The IO Register Read/Write test insures that the CS8900/20 can be
-     accessed in IO mode, and that the IO base address is correct.
-
-   * Shared Memory Test
-
-     The Shared Memory test insures the CS8900/20 can be accessed in memory
-     mode and that the range of memory addresses assigned does not conflict
-     with other devices in the system.
-
-   * Interrupt Test
-
-     The Interrupt test insures there are no conflicts with the assigned IRQ
-     signal.
-
-   * EEPROM Test
-
-     The EEPROM test insures the EEPROM can be read.
-
-   * Chip RAM Test
-
-     The Chip RAM test insures the 4K of memory internal to the CS8900/20 is
-     working properly.
-
-   * Internal Loop-back Test
-
-     The Internal Loop Back test insures the adapter's transmitter and
-     receiver are operating properly.  If this test fails, make sure the
-     adapter's cable is connected to the network (check for LED activity for
-     example).
-
-   * Boot PROM Test
-
-     The Boot PROM  test insures the Boot PROM is present, and can be read.
-     Failure indicates the Boot PROM  was not successfully read due to a
-     hardware problem or due to a conflicts on the Boot PROM address
-     assignment. (Test only applies if the adapter is configured to use the
-     Boot PROM option.)
-
-Failure of a test item indicates a possible system resource conflict with
-another device on the ISA bus.  In this case, you should use the Manual Setup
-option to reconfigure the adapter by selecting a different value for the system
-resource that failed.
-
-
-5.2.2. Diagnostic Network Test
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The Diagnostic Network Test verifies a working network connection by
-transferring data between two CS8900/20 adapters installed in different PCs
-on the same network. (Note: the diagnostic network test should not be run
-between two nodes across a router.)
-
-This test requires that each of the two PCs have a CS8900/20-based adapter
-installed and have the CS8900/20 Setup Utility running.  The first PC is
-configured as a Responder and the other PC is configured as an Initiator.
-Once the Initiator is started, it sends data frames to the Responder which
-returns the frames to the Initiator.
-
-The total number of frames received and transmitted are displayed on the
-Initiator's display, along with a count of the number of frames received and
-transmitted OK or in error.  The test can be terminated anytime by the user at
-either PC.
-
-To setup the Diagnostic Network Test:
-
-    1.  Select a PC with a CS8900/20-based adapter and a known working network
-	connection to act as the Responder.  Run the CS8900/20 Setup Utility
-	and select 'Diagnostics -> Network Test -> Responder' from the main
-	menu.  Hit ENTER to start the Responder.
-
-    2.  Return to the PC with the CS8900/20-based adapter you want to test and
-	start the CS8900/20 Setup Utility.
-
-    3.  From the main menu, Select 'Diagnostic -> Network Test -> Initiator'.
-	Hit ENTER to start the test.
-
-You may stop the test on the Initiator at any time while allowing the Responder
-to continue running.  In this manner, you can move to additional PCs and test
-them by starting the Initiator on another PC without having to stop/start the
-Responder.
-
-
-
-5.3. Using the Adapter's LEDs
------------------------------
-
-The 2 and 3-media adapters have two LEDs visible on the back end of the board
-located near the 10Base-T connector.
-
-Link Integrity LED: A "steady" ON of the green LED indicates a valid 10Base-T
-connection.  (Only applies to 10Base-T.  The green LED has no significance for
-a 10Base-2 or AUI connection.)
-
-TX/RX LED: The yellow LED lights briefly each time the adapter transmits or
-receives data. (The yellow LED will appear to "flicker" on a typical network.)
-
-
-5.4. Resolving I/O Conflicts
-----------------------------
-
-An IO conflict occurs when two or more adapter use the same ISA resource (IO
-address, memory address or IRQ).  You can usually detect an IO conflict in one
-of four ways after installing and or configuring the CS8900/20-based adapter:
-
-    1.  The system does not boot properly (or at all).
-
-    2.  The driver cannot communicate with the adapter, reporting an "Adapter
-	not found" error message.
-
-    3.  You cannot connect to the network or the driver will not load.
-
-    4.  If you have configured the adapter to run in memory mode but the driver
-	reports it is using IO mode when loading, this is an indication of a
-	memory address conflict.
-
-If an IO conflict occurs, run the CS8900/20 Setup Utility and perform a
-diagnostic self-test.  Normally, the ISA resource in conflict will fail the
-self-test.  If so, reconfigure the adapter selecting another choice for the
-resource in conflict.  Run the diagnostics again to check for further IO
-conflicts.
-
-In some cases, such as when the PC will not boot, it may be necessary to remove
-the adapter and reconfigure it by installing it in another PC to run the
-CS8900/20 Setup Utility.  Once reinstalled in the target system, run the
-diagnostics self-test to ensure the new configuration is free of conflicts
-before loading the driver again.
-
-When manually configuring the adapter, keep in mind the typical ISA system
-resource usage as indicated in the tables below.
-
-::
-
-  I/O Address    	Device                        IRQ      Device
-  -----------    	--------                      ---      --------
-     200-20F       	Game I/O adapter               3       COM2, Bus Mouse
-     230-23F       	Bus Mouse                      4       COM1
-     270-27F       	LPT3: third parallel port      5       LPT2
-     2F0-2FF       	COM2: second serial port       6       Floppy Disk controller
-     320-32F       	Fixed disk controller          7       LPT1
-							 8       Real-time Clock
-						     9       EGA/VGA display adapter
-						    12       Mouse (PS/2)
-  Memory Address  Device                          13       Math Coprocessor
-  --------------  ---------------------           14       Hard Disk controller
-  A000-BFFF	EGA Graphics Adapter
-  A000-C7FF	VGA Graphics Adapter
-  B000-BFFF	Mono Graphics Adapter
-  B800-BFFF	Color Graphics Adapter
-  E000-FFFF	AT BIOS
-
-
-
-
-6. Technical Support
-====================
-
-6.1. Contacting Cirrus Logic's Technical Support
-------------------------------------------------
-
-Cirrus Logic's CS89XX Technical Application Support can be reached at::
-
-  Telephone  :(800) 888-5016 (from inside U.S. and Canada)
-	     :(512) 442-7555 (from outside the U.S. and Canada)
-  Fax        :(512) 912-3871
-  Email      :[email protected]
-  WWW        :http://www.cirrus.com
-
-
-6.2. Information Required before Contacting Technical Support
--------------------------------------------------------------
-
-Before contacting Cirrus Logic for technical support, be prepared to provide as
-Much of the following information as possible.
-
-1.) Adapter type (CRD8900, CDB8900, CDB8920, etc.)
-
-2.) Adapter configuration
-
-    * IO Base, Memory Base, IO or memory mode enabled, IRQ, DMA channel
-    * Plug and Play enabled/disabled (CS8920-based adapters only)
-    * Configured for media auto-detect or specific media type (which type).
-
-3.) PC System's Configuration
-
-    * Plug and Play system (yes/no)
-    * BIOS (make and version)
-    * System make and model
-    * CPU (type and speed)
-    * System RAM
-    * SCSI Adapter
-
-4.) Software
-
-    * CS89XX driver and version
-    * Your network operating system and version
-    * Your system's OS version
-    * Version of all protocol support files
-
-5.) Any Error Message displayed.
-
-
-
-6.3 Obtaining the Latest Driver Version
----------------------------------------
-
-You can obtain the latest CS89XX drivers and support software from Cirrus Logic's
-Web site.  You can also contact Cirrus Logic's Technical Support (email:
[email protected]) and request that you be registered for automatic
-software-update notification.
-
-Cirrus Logic maintains a web page at http://www.cirrus.com with the
-latest drivers and technical publications.
-
-
-6.4. Current maintainer
------------------------
-
-In February 2000 the maintenance of this driver was assumed by Andrew
-Morton.
-
-6.5 Kernel module parameters
-----------------------------
-
-For use in embedded environments with no cs89x0 EEPROM, the kernel boot
-parameter ``cs89x0_media=`` has been implemented.  Usage is::
-
-	cs89x0_media=rj45    or
-	cs89x0_media=aui     or
-	cs89x0_media=bnc
drivers/net/ethernet/cirrus/Kconfig +0 -30
index 5bdf731d9503..1a0c7b3bfcd6 100644
@@ -17,36 +17,6 @@ config NET_VENDOR_CIRRUS
 
 if NET_VENDOR_CIRRUS
 
-config CS89x0
-	tristate
-
-config CS89x0_ISA
-	tristate "CS89x0 ISA driver support"
-	depends on HAS_IOPORT_MAP
-	depends on ISA
-	depends on !PPC32
-	depends on CS89x0_PLATFORM=n
-	select NETDEV_LEGACY_INIT
-	select CS89x0
-	help
-	  Support for CS89x0 chipset based Ethernet cards. If you have a
-	  network (Ethernet) card of this type, say Y and read the file
-	  <file:Documentation/networking/device_drivers/ethernet/cirrus/cs89x0.rst>.
-
-	  To compile this driver as a module, choose M here. The module
-	  will be called cs89x0.
-
-config CS89x0_PLATFORM
-	tristate "CS89x0 platform driver support"
-	depends on ARM || (COMPILE_TEST && !PPC)
-	select CS89x0
-	help
-	  Say Y to compile the cs89x0 platform driver. This makes this driver
-	  suitable for use on certain evaluation boards such as the iMX21ADS.
-
-	  To compile this driver as a module, choose M here. The module
-	  will be called cs89x0.
-
 config EP93XX_ETH
 	tristate "EP93xx Ethernet support"
 	depends on (ARM && ARCH_EP93XX) || COMPILE_TEST
drivers/net/ethernet/cirrus/Makefile +0 -1
index 84865e593788..cb740939d976 100644
@@ -3,6 +3,5 @@
 # Makefile for the Cirrus network device drivers.
 #
 
-obj-$(CONFIG_CS89x0) += cs89x0.o
 obj-$(CONFIG_EP93XX_ETH) += ep93xx_eth.o
 obj-$(CONFIG_MAC89x0) += mac89x0.o
drivers/net/ethernet/cirrus/cs89x0.c deleted +0 -1915

1,915 lines not on this page · raw message

Signature · 1 line
2.53.0
#12 lore raw

PATCH v2 10/15 drivers: net: cirrus: mac89x0: Remove this driver

In reply to Andrew Lunn

The mac89x0 was written by Russell Nelson in 1996. It is an MAC device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/cirrus/Kconfig   |  10 -
 drivers/net/ethernet/cirrus/Makefile  |   1 -
 drivers/net/ethernet/cirrus/cs89x0.h  | 461 ---------------------------
 drivers/net/ethernet/cirrus/mac89x0.c | 577 ----------------------------------
 4 files changed, 1049 deletions(-)
drivers/net/ethernet/cirrus/Kconfig +0 -10
index 1a0c7b3bfcd6..786d379e79fe 100644
@@ -25,14 +25,4 @@ config EP93XX_ETH
 	  This is a driver for the ethernet hardware included in EP93xx CPUs.
 	  Say Y if you are building a kernel for EP93xx based devices.
 
-config MAC89x0
-	tristate "Macintosh CS89x0 based ethernet cards"
-	depends on MAC
-	help
-	  Support for CS89x0 chipset based Ethernet cards.  If you have a
-	  Nubus or LC-PDS network (Ethernet) card of this type, say Y here.
-
-	  To compile this driver as a module, choose M here. This module will
-	  be called mac89x0.
-
 endif # NET_VENDOR_CIRRUS
drivers/net/ethernet/cirrus/Makefile +0 -1
index cb740939d976..03800af0f0e1 100644
@@ -4,4 +4,3 @@
 #
 
 obj-$(CONFIG_EP93XX_ETH) += ep93xx_eth.o
-obj-$(CONFIG_MAC89x0) += mac89x0.o
drivers/net/ethernet/cirrus/cs89x0.h deleted +0 -461

461 lines not on this page · raw message

drivers/net/ethernet/cirrus/mac89x0.c deleted +0 -577

577 lines not on this page · raw message

Signature · 1 line
2.53.0
#13 lore raw

Re: [PATCH net v2 10/15] drivers: net: cirrus: mac89x0: Remove this driver

CC linux-m68k

Quoted 1 line · Andrew Lunn

The mac89x0 was written by Russell Nelson in 1996. It is an MAC

It is based on the ISA cs89x0 driver, written by Russell Nelson.

Quoted 1 line

device, so unlikely to be used with modern kernels.

Macs do run modern kernels.

Quoted 1,090 lines
---
 drivers/net/ethernet/cirrus/Kconfig   |  10 -
 drivers/net/ethernet/cirrus/Makefile  |   1 -
 drivers/net/ethernet/cirrus/cs89x0.h  | 461 ---------------------------
 drivers/net/ethernet/cirrus/mac89x0.c | 577 ----------------------------------
 4 files changed, 1049 deletions(-)
drivers/net/ethernet/cirrus/Kconfig +0 -10
index 1a0c7b3bfcd6..786d379e79fe 100644
@@ -25,14 +25,4 @@ config EP93XX_ETH
          This is a driver for the ethernet hardware included in EP93xx CPUs.
          Say Y if you are building a kernel for EP93xx based devices.
 
-config MAC89x0
-       tristate "Macintosh CS89x0 based ethernet cards"
-       depends on MAC
-       help
-         Support for CS89x0 chipset based Ethernet cards.  If you have a
-         Nubus or LC-PDS network (Ethernet) card of this type, say Y here.
-
-         To compile this driver as a module, choose M here. This module will
-         be called mac89x0.
-
 endif # NET_VENDOR_CIRRUS
drivers/net/ethernet/cirrus/Makefile +0 -1
index cb740939d976..03800af0f0e1 100644
@@ -4,4 +4,3 @@
 #
 
 obj-$(CONFIG_EP93XX_ETH) += ep93xx_eth.o
-obj-$(CONFIG_MAC89x0) += mac89x0.o
drivers/net/ethernet/cirrus/cs89x0.h deleted +0 -461
deleted file mode 100644
index 210f9ec9af4b..000000000000
@@ -1,461 +0,0 @@
-/*  Copyright, 1988-1992, Russell Nelson, Crynwr Software
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, version 1.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-   */
-
-
-#define PP_ChipID 0x0000       /* offset   0h -> Corp -ID              */
-                               /* offset   2h -> Model/Product Number  */
-                               /* offset   3h -> Chip Revision Number  */
-
-#define PP_ISAIOB 0x0020       /*  IO base address */
-#define PP_CS8900_ISAINT 0x0022        /*  ISA interrupt select */
-#define PP_CS8920_ISAINT 0x0370        /*  ISA interrupt select */
-#define PP_CS8900_ISADMA 0x0024        /*  ISA Rec DMA channel */
-#define PP_CS8920_ISADMA 0x0374        /*  ISA Rec DMA channel */
-#define PP_ISASOF 0x0026       /*  ISA DMA offset */
-#define PP_DmaFrameCnt 0x0028  /*  ISA DMA Frame count */
-#define PP_DmaByteCnt 0x002A   /*  ISA DMA Byte count */
-#define PP_CS8900_ISAMemB 0x002C       /*  Memory base */
-#define PP_CS8920_ISAMemB 0x0348 /*  */
-
-#define PP_ISABootBase 0x0030  /*  Boot Prom base  */
-#define PP_ISABootMask 0x0034  /*  Boot Prom Mask */
-
-/* EEPROM data and command registers */
-#define PP_EECMD 0x0040                /*  NVR Interface Command register */
-#define PP_EEData 0x0042       /*  NVR Interface Data Register */
-#define PP_DebugReg 0x0044     /*  Debug Register */
-
-#define PP_RxCFG 0x0102                /*  Rx Bus config */
-#define PP_RxCTL 0x0104                /*  Receive Control Register */
-#define PP_TxCFG 0x0106                /*  Transmit Config Register */
-#define PP_TxCMD 0x0108                /*  Transmit Command Register */
-#define PP_BufCFG 0x010A       /*  Bus configuration Register */
-#define PP_LineCTL 0x0112      /*  Line Config Register */
-#define PP_SelfCTL 0x0114      /*  Self Command Register */
-#define PP_BusCTL 0x0116       /*  ISA bus control Register */
-#define PP_TestCTL 0x0118      /*  Test Register */
-#define PP_AutoNegCTL 0x011C   /*  Auto Negotiation Ctrl */
-
-#define PP_ISQ 0x0120          /*  Interrupt Status */
-#define PP_RxEvent 0x0124      /*  Rx Event Register */
-#define PP_TxEvent 0x0128      /*  Tx Event Register */
-#define PP_BufEvent 0x012C     /*  Bus Event Register */
-#define PP_RxMiss 0x0130       /*  Receive Miss Count */
-#define PP_TxCol 0x0132                /*  Transmit Collision Count */
-#define PP_LineST 0x0134       /*  Line State Register */
-#define PP_SelfST 0x0136       /*  Self State register */
-#define PP_BusST 0x0138                /*  Bus Status */
-#define PP_TDR 0x013C          /*  Time Domain Reflectometry */
-#define PP_AutoNegST 0x013E    /*  Auto Neg Status */
-#define PP_TxCommand 0x0144    /*  Tx Command */
-#define PP_TxLength 0x0146     /*  Tx Length */
-#define PP_LAF 0x0150          /*  Hash Table */
-#define PP_IA 0x0158           /*  Physical Address Register */
-
-#define PP_RxStatus 0x0400     /*  Receive start of frame */
-#define PP_RxLength 0x0402     /*  Receive Length of frame */
-#define PP_RxFrame 0x0404      /*  Receive frame pointer */
-#define PP_TxFrame 0x0A00      /*  Transmit frame pointer */
-
-/*  Primary I/O Base Address. If no I/O base is supplied by the user, then this */
-/*  can be used as the default I/O base to access the PacketPage Area. */
-#define DEFAULTIOBASE 0x0300
-#define FIRST_IO 0x020C                /*  First I/O port to check */
-#define LAST_IO 0x037C         /*  Last I/O port to check (+10h) */
-#define ADD_MASK 0x3000                /*  Mask it use of the ADD_PORT register */
-#define ADD_SIG 0x3000         /*  Expected ID signature */
-
-/* On Macs, we only need use the ISA I/O stuff until we do MEMORY_ON */
-#ifdef CONFIG_MAC
-#define LCSLOTBASE 0xfee00000
-#define MMIOBASE 0x40000
-#endif
-
-#define CHIP_EISA_ID_SIG 0x630E   /*  Product ID Code for Crystal Chip (CS8900 spec 4.3) */
-#define CHIP_EISA_ID_SIG_STR "0x630E"
-
-#ifdef IBMEIPKT
-#define EISA_ID_SIG 0x4D24     /*  IBM */
-#define PART_NO_SIG 0x1010     /*  IBM */
-#define MONGOOSE_BIT 0x0000    /*  IBM */
-#else
-#define EISA_ID_SIG 0x630E     /*  PnP Vendor ID (same as chip id for Crystal board) */
-#define PART_NO_SIG 0x4000     /*  ID code CS8920 board (PnP Vendor Product code) */
-#define MONGOOSE_BIT 0x2000    /*  PART_NO_SIG + MONGOOSE_BUT => ID of mongoose */
-#endif
-
-#define PRODUCT_ID_ADD 0x0002   /*  Address of product ID */
-
-/*  Mask to find out the types of  registers */
-#define REG_TYPE_MASK 0x001F
-
-/*  Eeprom Commands */
-#define ERSE_WR_ENBL 0x00F0
-#define ERSE_WR_DISABLE 0x0000
-
-/*  Defines Control/Config register quintuplet numbers */
-#define RX_BUF_CFG 0x0003
-#define RX_CONTROL 0x0005
-#define TX_CFG 0x0007
-#define TX_COMMAND 0x0009
-#define BUF_CFG 0x000B
-#define LINE_CONTROL 0x0013
-#define SELF_CONTROL 0x0015
-#define BUS_CONTROL 0x0017
-#define TEST_CONTROL 0x0019
-
-/*  Defines Status/Count registers quintuplet numbers */
-#define RX_EVENT 0x0004
-#define TX_EVENT 0x0008
-#define BUF_EVENT 0x000C
-#define RX_MISS_COUNT 0x0010
-#define TX_COL_COUNT 0x0012
-#define LINE_STATUS 0x0014
-#define SELF_STATUS 0x0016
-#define BUS_STATUS 0x0018
-#define TDR 0x001C
-
-/* PP_RxCFG - Receive  Configuration and Interrupt Mask bit definition -  Read/write */
-#define SKIP_1 0x0040
-#define RX_STREAM_ENBL 0x0080
-#define RX_OK_ENBL 0x0100
-#define RX_DMA_ONLY 0x0200
-#define AUTO_RX_DMA 0x0400
-#define BUFFER_CRC 0x0800
-#define RX_CRC_ERROR_ENBL 0x1000
-#define RX_RUNT_ENBL 0x2000
-#define RX_EXTRA_DATA_ENBL 0x4000
-
-/* PP_RxCTL - Receive Control bit definition - Read/write */
-#define RX_IA_HASH_ACCEPT 0x0040
-#define RX_PROM_ACCEPT 0x0080
-#define RX_OK_ACCEPT 0x0100
-#define RX_MULTCAST_ACCEPT 0x0200
-#define RX_IA_ACCEPT 0x0400
-#define RX_BROADCAST_ACCEPT 0x0800
-#define RX_BAD_CRC_ACCEPT 0x1000
-#define RX_RUNT_ACCEPT 0x2000
-#define RX_EXTRA_DATA_ACCEPT 0x4000
-#define RX_ALL_ACCEPT (RX_PROM_ACCEPT|RX_BAD_CRC_ACCEPT|RX_RUNT_ACCEPT|RX_EXTRA_DATA_ACCEPT)
-/*  Default receive mode - individually addressed, broadcast, and error free */
-#define DEF_RX_ACCEPT (RX_IA_ACCEPT | RX_BROADCAST_ACCEPT | RX_OK_ACCEPT)
-
-/* PP_TxCFG - Transmit Configuration Interrupt Mask bit definition - Read/write */
-#define TX_LOST_CRS_ENBL 0x0040
-#define TX_SQE_ERROR_ENBL 0x0080
-#define TX_OK_ENBL 0x0100
-#define TX_LATE_COL_ENBL 0x0200
-#define TX_JBR_ENBL 0x0400
-#define TX_ANY_COL_ENBL 0x0800
-#define TX_16_COL_ENBL 0x8000
-
-/* PP_TxCMD - Transmit Command bit definition - Read-only */
-#define TX_START_4_BYTES 0x0000
-#define TX_START_64_BYTES 0x0040
-#define TX_START_128_BYTES 0x0080
-#define TX_START_ALL_BYTES 0x00C0
-#define TX_FORCE 0x0100
-#define TX_ONE_COL 0x0200
-#define TX_TWO_PART_DEFF_DISABLE 0x0400
-#define TX_NO_CRC 0x1000
-#define TX_RUNT 0x2000
-
-/* PP_BufCFG - Buffer Configuration Interrupt Mask bit definition - Read/write */
-#define GENERATE_SW_INTERRUPT 0x0040
-#define RX_DMA_ENBL 0x0080
-#define READY_FOR_TX_ENBL 0x0100
-#define TX_UNDERRUN_ENBL 0x0200
-#define RX_MISS_ENBL 0x0400
-#define RX_128_BYTE_ENBL 0x0800
-#define TX_COL_COUNT_OVRFLOW_ENBL 0x1000
-#define RX_MISS_COUNT_OVRFLOW_ENBL 0x2000
-#define RX_DEST_MATCH_ENBL 0x8000
-
-/* PP_LineCTL - Line Control bit definition - Read/write */
-#define SERIAL_RX_ON 0x0040
-#define SERIAL_TX_ON 0x0080
-#define AUI_ONLY 0x0100
-#define AUTO_AUI_10BASET 0x0200
-#define MODIFIED_BACKOFF 0x0800
-#define NO_AUTO_POLARITY 0x1000
-#define TWO_PART_DEFDIS 0x2000
-#define LOW_RX_SQUELCH 0x4000
-
-/* PP_SelfCTL - Software Self Control bit definition - Read/write */
-#define POWER_ON_RESET 0x0040
-#define SW_STOP 0x0100
-#define SLEEP_ON 0x0200
-#define AUTO_WAKEUP 0x0400
-#define HCB0_ENBL 0x1000
-#define HCB1_ENBL 0x2000
-#define HCB0 0x4000
-#define HCB1 0x8000
-
-/* PP_BusCTL - ISA Bus Control bit definition - Read/write */
-#define RESET_RX_DMA 0x0040
-#define MEMORY_ON 0x0400
-#define DMA_BURST_MODE 0x0800
-#define IO_CHANNEL_READY_ON 0x1000
-#define RX_DMA_SIZE_64K 0x2000
-#define ENABLE_IRQ 0x8000
-
-/* PP_TestCTL - Test Control bit definition - Read/write */
-#define LINK_OFF 0x0080
-#define ENDEC_LOOPBACK 0x0200
-#define AUI_LOOPBACK 0x0400
-#define BACKOFF_OFF 0x0800
-#define FDX_8900 0x4000
-#define FAST_TEST 0x8000
-
-/* PP_RxEvent - Receive Event Bit definition - Read-only */
-#define RX_IA_HASHED 0x0040
-#define RX_DRIBBLE 0x0080
-#define RX_OK 0x0100
-#define RX_HASHED 0x0200
-#define RX_IA 0x0400
-#define RX_BROADCAST 0x0800
-#define RX_CRC_ERROR 0x1000
-#define RX_RUNT 0x2000
-#define RX_EXTRA_DATA 0x4000
-
-#define HASH_INDEX_MASK 0x0FC00
-
-/* PP_TxEvent - Transmit Event Bit definition - Read-only */
-#define TX_LOST_CRS 0x0040
-#define TX_SQE_ERROR 0x0080
-#define TX_OK 0x0100
-#define TX_LATE_COL 0x0200
-#define TX_JBR 0x0400
-#define TX_16_COL 0x8000
-#define TX_SEND_OK_BITS (TX_OK|TX_LOST_CRS)
-#define TX_COL_COUNT_MASK 0x7800
-
-/* PP_BufEvent - Buffer Event Bit definition - Read-only */
-#define SW_INTERRUPT 0x0040
-#define RX_DMA 0x0080
-#define READY_FOR_TX 0x0100
-#define TX_UNDERRUN 0x0200
-#define RX_MISS 0x0400
-#define RX_128_BYTE 0x0800
-#define TX_COL_OVRFLW 0x1000
-#define RX_MISS_OVRFLW 0x2000
-#define RX_DEST_MATCH 0x8000
-
-/* PP_LineST - Ethernet Line Status bit definition - Read-only */
-#define LINK_OK 0x0080
-#define AUI_ON 0x0100
-#define TENBASET_ON 0x0200
-#define POLARITY_OK 0x1000
-#define CRS_OK 0x4000
-
-/* PP_SelfST - Chip Software Status bit definition */
-#define ACTIVE_33V 0x0040
-#define INIT_DONE 0x0080
-#define SI_BUSY 0x0100
-#define EEPROM_PRESENT 0x0200
-#define EEPROM_OK 0x0400
-#define EL_PRESENT 0x0800
-#define EE_SIZE_64 0x1000
-
-/* PP_BusST - ISA Bus Status bit definition */
-#define TX_BID_ERROR 0x0080
-#define READY_FOR_TX_NOW 0x0100
-
-/* PP_AutoNegCTL - Auto Negotiation Control bit definition */
-#define RE_NEG_NOW 0x0040
-#define ALLOW_FDX 0x0080
-#define AUTO_NEG_ENABLE 0x0100
-#define NLP_ENABLE 0x0200
-#define FORCE_FDX 0x8000
-#define AUTO_NEG_BITS (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE)
-#define AUTO_NEG_MASK (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE|ALLOW_FDX|RE_NEG_NOW)
-
-/* PP_AutoNegST - Auto Negotiation Status bit definition */
-#define AUTO_NEG_BUSY 0x0080
-#define FLP_LINK 0x0100
-#define FLP_LINK_GOOD 0x0800
-#define LINK_FAULT 0x1000
-#define HDX_ACTIVE 0x4000
-#define FDX_ACTIVE 0x8000
-
-/*  The following block defines the ISQ event types */
-#define ISQ_RECEIVER_EVENT 0x04
-#define ISQ_TRANSMITTER_EVENT 0x08
-#define ISQ_BUFFER_EVENT 0x0c
-#define ISQ_RX_MISS_EVENT 0x10
-#define ISQ_TX_COL_EVENT 0x12
-
-#define ISQ_EVENT_MASK 0x003F   /*  ISQ mask to find out type of event */
-#define ISQ_HIST 16            /*  small history buffer */
-#define AUTOINCREMENT 0x8000   /*  Bit mask to set bit-15 for autoincrement */
-
-#define TXRXBUFSIZE 0x0600
-#define RXDMABUFSIZE 0x8000
-#define RXDMASIZE 0x4000
-#define TXRX_LENGTH_MASK 0x07FF
-
-/*  rx options bits */
-#define RCV_WITH_RXON  1       /*  Set SerRx ON */
-#define RCV_COUNTS     2       /*  Use Framecnt1 */
-#define RCV_PONG       4       /*  Pong respondent */
-#define RCV_DONG       8       /*  Dong operation */
-#define RCV_POLLING    0x10    /*  Poll RxEvent */
-#define RCV_ISQ                0x20    /*  Use ISQ, int */
-#define RCV_AUTO_DMA   0x100   /*  Set AutoRxDMAE */
-#define RCV_DMA                0x200   /*  Set RxDMA only */
-#define RCV_DMA_ALL    0x400   /*  Copy all DMA'ed */
-#define RCV_FIXED_DATA 0x800   /*  Every frame same */
-#define RCV_IO         0x1000  /*  Use ISA IO only */
-#define RCV_MEMORY     0x2000  /*  Use ISA Memory */
-
-#define RAM_SIZE       0x1000       /*  The card has 4k bytes or RAM */
-#define PKT_START PP_TxFrame  /*  Start of packet RAM */
-
-#define RX_FRAME_PORT  0x0000
-#define TX_FRAME_PORT RX_FRAME_PORT
-#define TX_CMD_PORT    0x0004
-#define TX_NOW         0x0000       /*  Tx packet after   5 bytes copied */
-#define TX_AFTER_381   0x0040       /*  Tx packet after 381 bytes copied */
-#define TX_AFTER_ALL   0x00c0       /*  Tx packet after all bytes copied */
-#define TX_LEN_PORT    0x0006
-#define ISQ_PORT       0x0008
-#define ADD_PORT       0x000A
-#define DATA_PORT      0x000C
-
-#define EEPROM_WRITE_EN                0x00F0
-#define EEPROM_WRITE_DIS       0x0000
-#define EEPROM_WRITE_CMD       0x0100
-#define EEPROM_READ_CMD                0x0200
-
-/*  Receive Header */
-/*  Description of header of each packet in receive area of memory */
-#define RBUF_EVENT_LOW 0   /*  Low byte of RxEvent - status of received frame */
-#define RBUF_EVENT_HIGH        1   /*  High byte of RxEvent - status of received frame */
-#define RBUF_LEN_LOW   2   /*  Length of received data - low byte */
-#define RBUF_LEN_HI    3   /*  Length of received data - high byte */
-#define RBUF_HEAD_LEN  4   /*  Length of this header */
-
-#define CHIP_READ 0x1   /*  Used to mark state of the repins code (chip or dma) */
-#define DMA_READ 0x2   /*  Used to mark state of the repins code (chip or dma) */
-
-/*  for bios scan */
-/*  */
-#ifdef CSDEBUG
-/*  use these values for debugging bios scan */
-#define BIOS_START_SEG 0x00000
-#define BIOS_OFFSET_INC 0x0010
-#else
-#define BIOS_START_SEG 0x0c000
-#define BIOS_OFFSET_INC 0x0200
-#endif
-
-#define BIOS_LAST_OFFSET 0x0fc00
-
-/*  Byte offsets into the EEPROM configuration buffer */
-#define ISA_CNF_OFFSET 0x6
-#define TX_CTL_OFFSET (ISA_CNF_OFFSET + 8)                     /*  8900 eeprom */
-#define AUTO_NEG_CNF_OFFSET (ISA_CNF_OFFSET + 8)               /*  8920 eeprom */
-
-  /*  the assumption here is that the bits in the eeprom are generally  */
-  /*  in the same position as those in the autonegctl register. */
-  /*  Of course the IMM bit is not in that register so it must be  */
-  /*  masked out */
-#define EE_FORCE_FDX  0x8000
-#define EE_NLP_ENABLE 0x0200
-#define EE_AUTO_NEG_ENABLE 0x0100
-#define EE_ALLOW_FDX 0x0080
-#define EE_AUTO_NEG_CNF_MASK (EE_FORCE_FDX|EE_NLP_ENABLE|EE_AUTO_NEG_ENABLE|EE_ALLOW_FDX)
-
-#define IMM_BIT 0x0040         /*  ignore missing media         */
-
-#define ADAPTER_CNF_OFFSET (AUTO_NEG_CNF_OFFSET + 2)
-#define A_CNF_10B_T 0x0001
-#define A_CNF_AUI 0x0002
-#define A_CNF_10B_2 0x0004
-#define A_CNF_MEDIA_TYPE 0x0070
-#define A_CNF_MEDIA_AUTO 0x0070
-#define A_CNF_MEDIA_10B_T 0x0020
-#define A_CNF_MEDIA_AUI 0x0040
-#define A_CNF_MEDIA_10B_2 0x0010
-#define A_CNF_DC_DC_POLARITY 0x0080
-#define A_CNF_NO_AUTO_POLARITY 0x2000
-#define A_CNF_LOW_RX_SQUELCH 0x4000
-#define A_CNF_EXTND_10B_2 0x8000
-
-#define PACKET_PAGE_OFFSET 0x8
-
-/*  Bit definitions for the ISA configuration word from the EEPROM */
-#define INT_NO_MASK 0x000F
-#define DMA_NO_MASK 0x0070
-#define ISA_DMA_SIZE 0x0200
-#define ISA_AUTO_RxDMA 0x0400
-#define ISA_RxDMA 0x0800
-#define DMA_BURST 0x1000
-#define STREAM_TRANSFER 0x2000
-#define ANY_ISA_DMA (ISA_AUTO_RxDMA | ISA_RxDMA)
-
-/*  DMA controller registers */
-#define DMA_BASE 0x00     /*  DMA controller base */
-#define DMA_BASE_2 0x0C0    /*  DMA controller base */
-
-#define DMA_STAT 0x0D0    /*  DMA controller status register */
-#define DMA_MASK 0x0D4    /*  DMA controller mask register */
-#define DMA_MODE 0x0D6    /*  DMA controller mode register */
-#define DMA_RESETFF 0x0D8    /*  DMA controller first/last flip flop */
-
-/*  DMA data */
-#define DMA_DISABLE 0x04     /*  Disable channel n */
-#define DMA_ENABLE 0x00     /*  Enable channel n */
-/*  Demand transfers, incr. address, auto init, writes, ch. n */
-#define DMA_RX_MODE 0x14
-/*  Demand transfers, incr. address, auto init, reads, ch. n */
-#define DMA_TX_MODE 0x18
-
-#define DMA_SIZE (16*1024) /*  Size of dma buffer - 16k */
-
-#define CS8900 0x0000
-#define CS8920 0x4000
-#define CS8920M 0x6000
-#define REVISON_BITS 0x1F00
-#define EEVER_NUMBER 0x12
-#define CHKSUM_LEN 0x14
-#define CHKSUM_VAL 0x0000
-#define START_EEPROM_DATA 0x001c /*  Offset into eeprom for start of data */
-#define IRQ_MAP_EEPROM_DATA 0x0046 /*  Offset into eeprom for the IRQ map */
-#define IRQ_MAP_LEN 0x0004 /*  No of bytes to read for the IRQ map */
-#define PNP_IRQ_FRMT 0x0022 /*  PNP small item IRQ format */
-#define CS8900_IRQ_MAP 0x1c20 /*  This IRQ map is fixed */
-
-#define CS8920_NO_INTS 0x0F   /*  Max CS8920 interrupt select # */
-
-#define PNP_ADD_PORT 0x0279
-#define PNP_WRITE_PORT 0x0A79
-
-#define GET_PNP_ISA_STRUCT 0x40
-#define PNP_ISA_STRUCT_LEN 0x06
-#define PNP_CSN_CNT_OFF 0x01
-#define PNP_RD_PORT_OFF 0x02
-#define PNP_FUNCTION_OK 0x00
-#define PNP_WAKE 0x03
-#define PNP_RSRC_DATA 0x04
-#define PNP_RSRC_READY 0x01
-#define PNP_STATUS 0x05
-#define PNP_ACTIVATE 0x30
-#define PNP_CNF_IO_H 0x60
-#define PNP_CNF_IO_L 0x61
-#define PNP_CNF_INT 0x70
-#define PNP_CNF_DMA 0x74
-#define PNP_CNF_MEM 0x48
drivers/net/ethernet/cirrus/mac89x0.c deleted +0 -578
deleted file mode 100644
index 6723df9b65d9..000000000000
@@ -1,577 +0,0 @@
-/* mac89x0.c: A Crystal Semiconductor CS89[02]0 driver for linux. */
-/*
-       Written 1996 by Russell Nelson, with reference to skeleton.c
-       written 1993-1994 by Donald Becker.
-
-       This software may be used and distributed according to the terms
-       of the GNU General Public License, incorporated herein by reference.
-
-       The author may be reached at [email protected], Crynwr
-       Software, 11 Grant St., Potsdam, NY 13676
-
-  Changelog:
-
-  Mike Cruse        : [email protected]
-                    : Changes for Linux 2.0 compatibility.
-                    : Added dev_id parameter in net_interrupt(),
-                    : request_irq() and free_irq(). Just NULL for now.
-
-  Mike Cruse        : Added MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT macros
-                    : in net_open() and net_close() so kerneld would know
-                    : that the module is in use and wouldn't eject the
-                    : driver prematurely.
-
-  Mike Cruse        : Rewrote init_module() and cleanup_module using 8390.c
-                    : as an example. Disabled autoprobing in init_module(),
-                    : not a good thing to do to other devices while Linux
-                    : is running from all accounts.
-
-  Alan Cox          : Removed 1.2 support, added 2.1 extra counters.
-
-  David Huggins-Daines <[email protected]>
-
-  Split this off into mac89x0.c, and gutted it of all parts which are
-  not relevant to the existing CS8900 cards on the Macintosh
-  (i.e. basically the Daynaport CS and LC cards).  To be precise:
-
-    * Removed all the media-detection stuff, because these cards are
-    TP-only.
-
-    * Lobotomized the ISA interrupt bogosity, because these cards use
-    a hardwired NuBus interrupt and a magic ISAIRQ value in the card.
-
-    * Basically eliminated everything not relevant to getting the
-    cards minimally functioning on the Macintosh.
-
-  I might add that these cards are badly designed even from the Mac
-  standpoint, in that Dayna, in their infinite wisdom, used NuBus slot
-  I/O space and NuBus interrupts for these cards, but neglected to
-  provide anything even remotely resembling a NuBus ROM.  Therefore we
-  have to probe for them in a brain-damaged ISA-like fashion.
-
-  Arnaldo Carvalho de Melo <[email protected]> - 11/01/2001
-  check kmalloc and release the allocated memory on failure in
-  mac89x0_probe and in init_module
-  use local_irq_{save,restore}(flags) in net_get_stat, not just
-  local_irq_{dis,en}able()
-*/
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-static const char version[] =
-"cs89x0.c:v1.02 11/26/96 Russell Nelson <[email protected]>\n";
-
-#include <linux/module.h>
-
-/*
-  Sources:
-
-       Crynwr packet driver epktisa.
-
-       Crystal Semiconductor data sheets.
-
-*/
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/fcntl.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/in.h>
-#include <linux/string.h>
-#include <linux/nubus.h>
-#include <linux/errno.h>
-#include <linux/init.h>
-#include <linux/netdevice.h>
-#include <linux/platform_device.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-#include <linux/delay.h>
-#include <linux/bitops.h>
-#include <linux/gfp.h>
-
-#include <asm/io.h>
-#include <asm/hwtest.h>
-#include <asm/macints.h>
-
-#include "cs89x0.h"
-
-static int debug = -1;
-module_param(debug, int, 0);
-MODULE_PARM_DESC(debug, "debug message level");
-
-/* Information that need to be kept for each board. */
-struct net_local {
-       int msg_enable;
-       int chip_type;          /* one of: CS8900, CS8920, CS8920M */
-       char chip_revision;     /* revision letter of the chip ('A'...) */
-       int send_cmd;           /* the propercommand used to send a packet. */
-       int rx_mode;
-       int curr_rx_cfg;
-        int send_underrun;      /* keep track of how many underruns in a row we get */
-};
-
-/* Index to functions, as function prototypes. */
-static int net_open(struct net_device *dev);
-static netdev_tx_t net_send_packet(struct sk_buff *skb, struct net_device *dev);
-static irqreturn_t net_interrupt(int irq, void *dev_id);
-static void set_multicast_list(struct net_device *dev);
-static void net_rx(struct net_device *dev);
-static int net_close(struct net_device *dev);
-static struct net_device_stats *net_get_stats(struct net_device *dev);
-static int set_mac_address(struct net_device *dev, void *addr);
-
-/* For reading/writing registers ISA-style */
-static inline int
-readreg_io(struct net_device *dev, int portno)
-{
-       nubus_writew(swab16(portno), dev->base_addr + ADD_PORT);
-       return swab16(nubus_readw(dev->base_addr + DATA_PORT));
-}
-
-static inline void
-writereg_io(struct net_device *dev, int portno, int value)
-{
-       nubus_writew(swab16(portno), dev->base_addr + ADD_PORT);
-       nubus_writew(swab16(value), dev->base_addr + DATA_PORT);
-}
-
-/* These are for reading/writing registers in shared memory */
-static inline int
-readreg(struct net_device *dev, int portno)
-{
-       return swab16(nubus_readw(dev->mem_start + portno));
-}
-
-static inline void
-writereg(struct net_device *dev, int portno, int value)
-{
-       nubus_writew(swab16(value), dev->mem_start + portno);
-}
-
-static const struct net_device_ops mac89x0_netdev_ops = {
-       .ndo_open               = net_open,
-       .ndo_stop               = net_close,
-       .ndo_start_xmit         = net_send_packet,
-       .ndo_get_stats          = net_get_stats,
-       .ndo_set_rx_mode        = set_multicast_list,
-       .ndo_set_mac_address    = set_mac_address,
-       .ndo_validate_addr      = eth_validate_addr,
-};
-
-/* Probe for the CS8900 card in slot E.  We won't bother looking
-   anywhere else until we have a really good reason to do so. */
-static int mac89x0_device_probe(struct platform_device *pdev)
-{
-       struct net_device *dev;
-       struct net_local *lp;
-       int i, slot;
-       unsigned rev_type = 0;
-       unsigned long ioaddr;
-       unsigned short sig;
-       int err = -ENODEV;
-       struct nubus_rsrc *fres;
-
-       dev = alloc_etherdev(sizeof(struct net_local));
-       if (!dev)
-               return -ENOMEM;
-
-       /* We might have to parameterize this later */
-       slot = 0xE;
-       /* Get out now if there's a real NuBus card in slot E */
-       for_each_func_rsrc(fres)
-               if (fres->board->slot == slot)
-                       goto out;
-
-       /* The pseudo-ISA bits always live at offset 0x300 (gee,
-           wonder why...) */
-       ioaddr = (unsigned long)
-               nubus_slot_addr(slot) | (((slot&0xf) << 20) + DEFAULTIOBASE);
-       {
-               int card_present;
-
-               card_present = (hwreg_present((void *)ioaddr + 4) &&
-                               hwreg_present((void *)ioaddr + DATA_PORT));
-               if (!card_present)
-                       goto out;
-       }
-
-       nubus_writew(0, ioaddr + ADD_PORT);
-       sig = nubus_readw(ioaddr + DATA_PORT);
-       if (sig != swab16(CHIP_EISA_ID_SIG))
-               goto out;
-
-       SET_NETDEV_DEV(dev, &pdev->dev);
-
-       /* Initialize the net_device structure. */
-       lp = netdev_priv(dev);
-
-       lp->msg_enable = netif_msg_init(debug, 0);
-
-       /* Fill in the 'dev' fields. */
-       dev->base_addr = ioaddr;
-       dev->mem_start = (unsigned long)
-               nubus_slot_addr(slot) | (((slot&0xf) << 20) + MMIOBASE);
-       dev->mem_end = dev->mem_start + 0x1000;
-
-       /* Turn on shared memory */
-       writereg_io(dev, PP_BusCTL, MEMORY_ON);
-
-       /* get the chip type */
-       rev_type = readreg(dev, PRODUCT_ID_ADD);
-       lp->chip_type = rev_type &~ REVISON_BITS;
-       lp->chip_revision = ((rev_type & REVISON_BITS) >> 8) + 'A';
-
-       /* Check the chip type and revision in order to set the correct send command
-       CS8920 revision C and CS8900 revision F can use the faster send. */
-       lp->send_cmd = TX_AFTER_381;
-       if (lp->chip_type == CS8900 && lp->chip_revision >= 'F')
-               lp->send_cmd = TX_NOW;
-       if (lp->chip_type != CS8900 && lp->chip_revision >= 'C')
-               lp->send_cmd = TX_NOW;
-
-       netif_dbg(lp, drv, dev, "%s", version);
-
-       pr_info("cs89%c0%s rev %c found at %#8lx\n",
-               lp->chip_type == CS8900 ? '0' : '2',
-               lp->chip_type == CS8920M ? "M" : "",
-               lp->chip_revision, dev->base_addr);
-
-       /* Try to read the MAC address */
-       if ((readreg(dev, PP_SelfST) & (EEPROM_PRESENT | EEPROM_OK)) == 0) {
-               pr_info("No EEPROM, giving up now.\n");
-               goto out1;
-        } else {
-               u8 addr[ETH_ALEN];
-
-                for (i = 0; i < ETH_ALEN; i += 2) {
-                       /* Big-endian (why??!) */
-                       unsigned short s = readreg(dev, PP_IA + i);
-                       addr[i] = s >> 8;
-                       addr[i+1] = s & 0xff;
-                }
-               eth_hw_addr_set(dev, addr);
-        }
-
-       dev->irq = SLOT2IRQ(slot);
-
-       /* print the IRQ and ethernet address. */
-
-       pr_info("MAC %pM, IRQ %d\n", dev->dev_addr, dev->irq);
-
-       dev->netdev_ops         = &mac89x0_netdev_ops;
-
-       err = register_netdev(dev);
-       if (err)
-               goto out1;
-
-       platform_set_drvdata(pdev, dev);
-       return 0;
-out1:
-       nubus_writew(0, dev->base_addr + ADD_PORT);
-out:
-       free_netdev(dev);
-       return err;
-}
-
-/* Open/initialize the board.  This is called (in the current kernel)
-   sometime after booting when the 'ifconfig' program is run.
-
-   This routine should set everything up anew at each open, even
-   registers that "should" only need to be set once at boot, so that
-   there is non-reboot way to recover if something goes wrong.
-   */
-static int
-net_open(struct net_device *dev)
-{
-       struct net_local *lp = netdev_priv(dev);
-       int i;
-
-       /* Disable the interrupt for now */
-       writereg(dev, PP_BusCTL, readreg(dev, PP_BusCTL) & ~ENABLE_IRQ);
-
-       /* Grab the interrupt */
-       if (request_irq(dev->irq, net_interrupt, 0, "cs89x0", dev))
-               return -EAGAIN;
-
-       /* Set up the IRQ - Apparently magic */
-       if (lp->chip_type == CS8900)
-               writereg(dev, PP_CS8900_ISAINT, 0);
-       else
-               writereg(dev, PP_CS8920_ISAINT, 0);
-
-       /* set the Ethernet address */
-       for (i=0; i < ETH_ALEN/2; i++)
-               writereg(dev, PP_IA+i*2, dev->dev_addr[i*2] | (dev->dev_addr[i*2+1] << 8));
-
-       /* Turn on both receive and transmit operations */
-       writereg(dev, PP_LineCTL, readreg(dev, PP_LineCTL) | SERIAL_RX_ON | SERIAL_TX_ON);
-
-       /* Receive only error free packets addressed to this card */
-       lp->rx_mode = 0;
-       writereg(dev, PP_RxCTL, DEF_RX_ACCEPT);
-
-       lp->curr_rx_cfg = RX_OK_ENBL | RX_CRC_ERROR_ENBL;
-
-       writereg(dev, PP_RxCFG, lp->curr_rx_cfg);
-
-       writereg(dev, PP_TxCFG, TX_LOST_CRS_ENBL | TX_SQE_ERROR_ENBL | TX_OK_ENBL |
-              TX_LATE_COL_ENBL | TX_JBR_ENBL | TX_ANY_COL_ENBL | TX_16_COL_ENBL);
-
-       writereg(dev, PP_BufCFG, READY_FOR_TX_ENBL | RX_MISS_COUNT_OVRFLOW_ENBL |
-                TX_COL_COUNT_OVRFLOW_ENBL | TX_UNDERRUN_ENBL);
-
-       /* now that we've got our act together, enable everything */
-       writereg(dev, PP_BusCTL, readreg(dev, PP_BusCTL) | ENABLE_IRQ);
-       netif_start_queue(dev);
-       return 0;
-}
-
-static netdev_tx_t
-net_send_packet(struct sk_buff *skb, struct net_device *dev)
-{
-       struct net_local *lp = netdev_priv(dev);
-       unsigned long flags;
-
-       netif_dbg(lp, tx_queued, dev, "sent %d byte packet of type %x\n",
-                 skb->len, skb->data[ETH_ALEN + ETH_ALEN] << 8 |
-                 skb->data[ETH_ALEN + ETH_ALEN + 1]);
-
-       /* keep the upload from being interrupted, since we
-          ask the chip to start transmitting before the
-          whole packet has been completely uploaded. */
-       local_irq_save(flags);
-       netif_stop_queue(dev);
-
-       /* initiate a transmit sequence */
-       writereg(dev, PP_TxCMD, lp->send_cmd);
-       writereg(dev, PP_TxLength, skb->len);
-
-       /* Test to see if the chip has allocated memory for the packet */
-       if ((readreg(dev, PP_BusST) & READY_FOR_TX_NOW) == 0) {
-               /* Gasp!  It hasn't.  But that shouldn't happen since
-                  we're waiting for TxOk, so return 1 and requeue this packet. */
-               local_irq_restore(flags);
-               return NETDEV_TX_BUSY;
-       }
-
-       /* Write the contents of the packet */
-       skb_copy_from_linear_data(skb, (void *)(dev->mem_start + PP_TxFrame),
-                                 skb->len+1);
-
-       local_irq_restore(flags);
-       dev_kfree_skb (skb);
-
-       return NETDEV_TX_OK;
-}
-
-/* The typical workload of the driver:
-   Handle the network interface interrupts. */
-static irqreturn_t net_interrupt(int irq, void *dev_id)
-{
-       struct net_device *dev = dev_id;
-       struct net_local *lp;
-       int ioaddr, status;
-
-       ioaddr = dev->base_addr;
-       lp = netdev_priv(dev);
-
-       /* we MUST read all the events out of the ISQ, otherwise we'll never
-           get interrupted again.  As a consequence, we can't have any limit
-           on the number of times we loop in the interrupt handler.  The
-           hardware guarantees that eventually we'll run out of events.  Of
-           course, if you're on a slow machine, and packets are arriving
-           faster than you can read them off, you're screwed.  Hasta la
-           vista, baby!  */
-       while ((status = swab16(nubus_readw(dev->base_addr + ISQ_PORT)))) {
-               netif_dbg(lp, intr, dev, "status=%04x\n", status);
-               switch(status & ISQ_EVENT_MASK) {
-               case ISQ_RECEIVER_EVENT:
-                       /* Got a packet(s). */
-                       net_rx(dev);
-                       break;
-               case ISQ_TRANSMITTER_EVENT:
-                       dev->stats.tx_packets++;
-                       netif_wake_queue(dev);
-                       if ((status & TX_OK) == 0)
-                               dev->stats.tx_errors++;
-                       if (status & TX_LOST_CRS)
-                               dev->stats.tx_carrier_errors++;
-                       if (status & TX_SQE_ERROR)
-                               dev->stats.tx_heartbeat_errors++;
-                       if (status & TX_LATE_COL)
-                               dev->stats.tx_window_errors++;
-                       if (status & TX_16_COL)
-                               dev->stats.tx_aborted_errors++;
-                       break;
-               case ISQ_BUFFER_EVENT:
-                       if (status & READY_FOR_TX) {
-                               /* we tried to transmit a packet earlier,
-                                   but inexplicably ran out of buffers.
-                                   That shouldn't happen since we only ever
-                                   load one packet.  Shrug.  Do the right
-                                   thing anyway. */
-                               netif_wake_queue(dev);
-                       }
-                       if (status & TX_UNDERRUN) {
-                               netif_dbg(lp, tx_err, dev, "transmit underrun\n");
-                                lp->send_underrun++;
-                                if (lp->send_underrun == 3) lp->send_cmd = TX_AFTER_381;
-                                else if (lp->send_underrun == 6) lp->send_cmd = TX_AFTER_ALL;
-                        }
-                       break;
-               case ISQ_RX_MISS_EVENT:
-                       dev->stats.rx_missed_errors += (status >> 6);
-                       break;
-               case ISQ_TX_COL_EVENT:
-                       dev->stats.collisions += (status >> 6);
-                       break;
-               }
-       }
-       return IRQ_HANDLED;
-}
-
-/* We have a good packet(s), get it/them out of the buffers. */
-static void
-net_rx(struct net_device *dev)
-{
-       struct net_local *lp = netdev_priv(dev);
-       struct sk_buff *skb;
-       int status, length;
-
-       status = readreg(dev, PP_RxStatus);
-       if ((status & RX_OK) == 0) {
-               dev->stats.rx_errors++;
-               if (status & RX_RUNT)
-                               dev->stats.rx_length_errors++;
-               if (status & RX_EXTRA_DATA)
-                               dev->stats.rx_length_errors++;
-               if ((status & RX_CRC_ERROR) &&
-                   !(status & (RX_EXTRA_DATA|RX_RUNT)))
-                       /* per str 172 */
-                       dev->stats.rx_crc_errors++;
-               if (status & RX_DRIBBLE)
-                               dev->stats.rx_frame_errors++;
-               return;
-       }
-
-       length = readreg(dev, PP_RxLength);
-       /* Malloc up new buffer. */
-       skb = alloc_skb(length, GFP_ATOMIC);
-       if (skb == NULL) {
-               dev->stats.rx_dropped++;
-               return;
-       }
-       skb_put(skb, length);
-
-       skb_copy_to_linear_data(skb, (void *)(dev->mem_start + PP_RxFrame),
-                               length);
-
-       netif_dbg(lp, rx_status, dev, "received %d byte packet of type %x\n",
-                 length, skb->data[ETH_ALEN + ETH_ALEN] << 8 |
-                 skb->data[ETH_ALEN + ETH_ALEN + 1]);
-
-        skb->protocol=eth_type_trans(skb,dev);
-       netif_rx(skb);
-       dev->stats.rx_packets++;
-       dev->stats.rx_bytes += length;
-}
-
-/* The inverse routine to net_open(). */
-static int
-net_close(struct net_device *dev)
-{
-
-       writereg(dev, PP_RxCFG, 0);
-       writereg(dev, PP_TxCFG, 0);
-       writereg(dev, PP_BufCFG, 0);
-       writereg(dev, PP_BusCTL, 0);
-
-       netif_stop_queue(dev);
-
-       free_irq(dev->irq, dev);
-
-       /* Update the statistics here. */
-
-       return 0;
-
-}
-
-/* Get the current statistics. This may be called with the card open or
-   closed. */
-static struct net_device_stats *
-net_get_stats(struct net_device *dev)
-{
-       unsigned long flags;
-
-       local_irq_save(flags);
-       /* Update the statistics from the device registers. */
-       dev->stats.rx_missed_errors += (readreg(dev, PP_RxMiss) >> 6);
-       dev->stats.collisions += (readreg(dev, PP_TxCol) >> 6);
-       local_irq_restore(flags);
-
-       return &dev->stats;
-}
-
-static void set_multicast_list(struct net_device *dev)
-{
-       struct net_local *lp = netdev_priv(dev);
-
-       if(dev->flags&IFF_PROMISC)
-       {
-               lp->rx_mode = RX_ALL_ACCEPT;
-       } else if ((dev->flags & IFF_ALLMULTI) || !netdev_mc_empty(dev)) {
-               /* The multicast-accept list is initialized to accept-all, and we
-                  rely on higher-level filtering for now. */
-               lp->rx_mode = RX_MULTCAST_ACCEPT;
-       }
-       else
-               lp->rx_mode = 0;
-
-       writereg(dev, PP_RxCTL, DEF_RX_ACCEPT | lp->rx_mode);
-
-       /* in promiscuous mode, we accept errored packets, so we have to enable interrupts on them also */
-       writereg(dev, PP_RxCFG, lp->curr_rx_cfg |
-            (lp->rx_mode == RX_ALL_ACCEPT? (RX_CRC_ERROR_ENBL|RX_RUNT_ENBL|RX_EXTRA_DATA_ENBL) : 0));
-}
-
-
-static int set_mac_address(struct net_device *dev, void *addr)
-{
-       struct sockaddr *saddr = addr;
-       int i;
-
-       if (!is_valid_ether_addr(saddr->sa_data))
-               return -EADDRNOTAVAIL;
-
-       eth_hw_addr_set(dev, saddr->sa_data);
-       netdev_info(dev, "Setting MAC address to %pM\n", dev->dev_addr);
-
-       /* set the Ethernet address */
-       for (i=0; i < ETH_ALEN/2; i++)
-               writereg(dev, PP_IA+i*2, dev->dev_addr[i*2] | (dev->dev_addr[i*2+1] << 8));
-
-       return 0;
-}
-
-MODULE_DESCRIPTION("Macintosh CS89x0-based Ethernet driver");
-MODULE_LICENSE("GPL");
-
-static void mac89x0_device_remove(struct platform_device *pdev)
-{
-       struct net_device *dev = platform_get_drvdata(pdev);
-
-       unregister_netdev(dev);
-       nubus_writew(0, dev->base_addr + ADD_PORT);
-       free_netdev(dev);
-}
-
-static struct platform_driver mac89x0_platform_driver = {
-       .probe = mac89x0_device_probe,
-       .remove = mac89x0_device_remove,
-       .driver = {
-               .name = "mac89x0",
-       },
-};
-
-module_platform_driver(mac89x0_platform_driver);
 
--

2.53.0

#14 lore raw

Re: [PATCH net v2 10/15] drivers: net: cirrus: mac89x0: Remove this driver

Hi Geert,

Quoted 10 lines · Geert Uytterhoeven

CC linux-m68k

Quoted 1 line · Andrew Lunn

The mac89x0 was written by Russell Nelson in 1996. It is an MAC

It is based on the ISA cs89x0 driver, written by Russell Nelson.

Quoted 1 line

device, so unlikely to be used with modern kernels.

Macs do run modern kernels.

Retrocomputing still is not well regarded by some maintainers, it seems :-(.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#15 lore raw

Re: [PATCH net v2 10/15] drivers: net: cirrus: mac89x0: Remove this driver

Hi Adrian,

Quoted 3 lines · John Paul Adrian Glaubitz
Quoted 1 line

Macs do run modern kernels.

Retrocomputing still is not well regarded by some maintainers, it seems :-(.

I've found bugs in drivers by plugging those things into exotic hardware like my Amiga 4000 and Ultra5 [0].
So, it's not totally pointless. And having a shader capable Amiga[1] is pretty cool.
Sad to see fun stuff getting pushed out by basically spam bots. :(

0 - https://lists.freedesktop.org/archives/amd-gfx/2025-October/132283.html
1 - https://gist.github.com/fifteenhex/0e5ce8c1614bcec20ed242045c11d1d9

#16 lore raw

Re: [PATCH net v2 10/15] drivers: net: cirrus: mac89x0: Remove this driver

Hi Daniel,

Quoted 4 lines · Daniel Palmer

Hi Adrian,

On Thu, 23 Apr 2026 at 16:10, John Paul Adrian Glaubitz <[email protected]> wrote:

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Macs do run modern kernels.

Retrocomputing still is not well regarded by some maintainers, it seems :-(.

I've found bugs in drivers by plugging those things into exotic hardware like my Amiga 4000 and Ultra5 [0].
So, it's not totally pointless. And having a shader capable Amiga[1] is pretty cool.

Not only that. Those exotic architectures also help iron out generic kernel bugs and give new maintainers an possibility to get their feet wet.

Quoted 1 line

Sad to see fun stuff getting pushed out by basically spam bots. :(

It's not so much pushed out by spam bots but by the commercialization of the Linux kernel. Many developers think that the sole purpose of the Linux kernel is to run on modern commodity hardware.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
maintainer
#17 lore raw

Re: [PATCH net v2 10/15] drivers: net: cirrus: mac89x0: Remove this driver

Quoted 7 lines · On Thu, 23 Apr 2026 11:28:11 +0200 John Paul Adrian Glaubitz wrote:
Quoted 6 lines
Quoted 1 line

Retrocomputing still is not well regarded by some maintainers, it seems :-(.

I've found bugs in drivers by plugging those things into exotic hardware like my Amiga 4000 and Ultra5 [0].
So, it's not totally pointless. And having a shader capable Amiga[1] is pretty cool.

Quoted 8 lines

Not only that. Those exotic architectures also help iron out generic kernel bugs and give new maintainers an possibility to get their feet wet.

Quoted 1 line

Sad to see fun stuff getting pushed out by basically spam bots. :(

It's not so much pushed out by spam bots but by the commercialization of the Linux kernel. Many developers think that the sole purpose of the Linux kernel is to run on modern commodity hardware.

Please send that MAINTAINERS patch to designate yourselves as maintainers (like Daniel already did for another driver). This is the ideal outcome.

We want to be welcoming in the community. But being a part of the community means participating in _work_.

#18 lore raw

Re: [PATCH net v2 10/15] drivers: net: cirrus: mac89x0: Remove this driver

Quoted 3 lines · Jakub Kicinski

We want to be welcoming in the community. But being a part of the community means participating in _work_.

The work of testing drivers requires that maintainers have ready access to actual hardware. Behavioural simulation like QEMU does not cut it. Therefore, it sounds like you're going to need someone with actual clout to mandate that drivers must have maintainers and those maintainers must have access to working hardware, or those drivers get placed on a removal schedule along with _every_ other orphaned module across the entire tree.

That way, you get to chase _all_ freeloaders regardless of whether they are unpaid enthusiasts or foundation sponsors. Surely you'd find out what "welcoming" really means -- but you would get to remove a _lot_ of code.

Far more likely, you'd find out that the typical Linux user is actually a retro computing enthusiast because he's using some device that's over 5 years old, and the employer of the maintainer of the relevant driver got assigned to something more profitable years ago and all their old hardware got tossed out in the last office move. (What was that saying about those who live in silica houses?)

Anyway, I think there is a better way. Let's score every module based on cost/benefit to the "community". We can use retail sales volume as a proxy for the former quantity (in unadjusted dollars) and use module size (in lines of code) as proxy for the latter. If nothing else, that would show us which modules are more or less valuable to the community, relative to the average module.

#19 lore raw

PATCH v2 11/15 drivers: net: fujitsu: fmvj18x: Remove this driver

In reply to Andrew Lunn

The fmvj18x was written by Shingo Fujimoto in 2002. It is an PCMCIA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/Kconfig              |    1 -
 drivers/net/ethernet/fujitsu/Kconfig      |   30 -
 drivers/net/ethernet/fujitsu/Makefile     |    6 -
 drivers/net/ethernet/fujitsu/fmvj18x_cs.c | 1176 -----------------------------
 4 files changed, 1213 deletions(-)
drivers/net/ethernet/Kconfig +0 -1
index bdc29d143160..c94e8f27af94 100644
@@ -61,7 +61,6 @@ source "drivers/net/ethernet/engleder/Kconfig"
 source "drivers/net/ethernet/ezchip/Kconfig"
 source "drivers/net/ethernet/faraday/Kconfig"
 source "drivers/net/ethernet/freescale/Kconfig"
-source "drivers/net/ethernet/fujitsu/Kconfig"
 source "drivers/net/ethernet/fungible/Kconfig"
 source "drivers/net/ethernet/google/Kconfig"
 source "drivers/net/ethernet/hisilicon/Kconfig"
drivers/net/ethernet/fujitsu/Kconfig deleted +0 -30
deleted file mode 100644
index 06a28bce5d27..000000000000
@@ -1,30 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Fujitsu Network device configuration
-#
-
-config NET_VENDOR_FUJITSU
-	bool "Fujitsu devices"
-	default y
-	depends on PCMCIA
-	help
-	  If you have a network (Ethernet) card belonging to this class, say Y.
-
-	  Note that the answer to this question doesn't directly affect the
-	  the questions about Fujitsu cards. If you say Y, you will be asked for
-	  your specific card in the following questions.
-
-if NET_VENDOR_FUJITSU
-
-config PCMCIA_FMVJ18X
-	tristate "Fujitsu FMV-J18x PCMCIA support"
-	depends on PCMCIA && HAS_IOPORT
-	select CRC32
-	help
-	  Say Y here if you intend to attach a Fujitsu FMV-J18x or compatible
-	  PCMCIA (PC-card) Ethernet card to your computer.
-
-	  To compile this driver as a module, choose M here: the module will be
-	  called fmvj18x_cs.  If unsure, say N.
-
-endif # NET_VENDOR_FUJITSU
drivers/net/ethernet/fujitsu/Makefile deleted +0 -6
deleted file mode 100644
index 74feebbf4572..000000000000
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the Fujitsu network device drivers.
-#
-
-obj-$(CONFIG_PCMCIA_FMVJ18X) += fmvj18x_cs.o
drivers/net/ethernet/fujitsu/fmvj18x_cs.c deleted +0 -1176

1,176 lines not on this page · raw message

Signature · 1 line
2.53.0
#20 lore raw

PATCH v2 12/15 drivers: net: 8390: AX88190: Remove this driver

In reply to Andrew Lunn

The ax88190 was written by David A. Hindsh in 2001. It is an PCMCIA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/8390/Kconfig    |   12 -
 drivers/net/ethernet/8390/Makefile   |    1 -
 drivers/net/ethernet/8390/axnet_cs.c | 1707 ----------------------------------
 3 files changed, 1720 deletions(-)
drivers/net/ethernet/8390/Kconfig +0 -12
index 345f250781c6..3dea042cc2eb 100644
@@ -17,18 +17,6 @@ config NET_VENDOR_8390
 
 if NET_VENDOR_8390
 
-config PCMCIA_AXNET
-	tristate "Asix AX88190 PCMCIA support"
-	depends on PCMCIA && HAS_IOPORT
-	help
-	  Say Y here if you intend to attach an Asix AX88190-based PCMCIA
-	  (PC-card) Fast Ethernet card to your computer.  These cards are
-	  nearly NE2000 compatible but need a separate driver due to a few
-	  misfeatures.
-
-	  To compile this driver as a module, choose M here: the module will be
-	  called axnet_cs.  If unsure, say N.
-
 config AX88796
 	tristate "ASIX AX88796 NE2000 clone support" if !ZORRO
 	depends on (ARM || MIPS || SUPERH || ZORRO || COMPILE_TEST)
drivers/net/ethernet/8390/Makefile +0 -1
index 85c83c566ec6..60220484b382 100644
@@ -11,7 +11,6 @@ obj-$(CONFIG_HYDRA) += hydra.o
 obj-$(CONFIG_MCF8390) += mcf8390.o
 obj-$(CONFIG_NE2000) += ne.o 8390p.o
 obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
-obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o 8390.o
 obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o
 obj-$(CONFIG_STNIC) += stnic.o 8390.o
 obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
drivers/net/ethernet/8390/axnet_cs.c deleted +0 -1707

1,707 lines not on this page · raw message

Signature · 1 line
2.53.0
#21 lore raw

Re: [PATCH net v2 12/15] drivers: net: 8390: AX88190: Remove this driver

Quoted 1 line · Andrew Lunn

The ax88190 was written by David A. Hindsh

Hinds

#22 lore raw

PATCH v2 13/15 drivers: net: 8390: pcnet: Remove this driver

In reply to Andrew Lunn

The pcnet was written by David A. Hindsh in 1999. It is an PCMCIA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/8390/Kconfig    |   11 -
 drivers/net/ethernet/8390/Makefile   |    1 -
 drivers/net/ethernet/8390/pcnet_cs.c | 1717 ----------------------------------
 3 files changed, 1729 deletions(-)
drivers/net/ethernet/8390/Kconfig +0 -11
index 3dea042cc2eb..3e56806471a3 100644
@@ -132,17 +132,6 @@ config APNE
 	  To compile this driver as a module, choose M here: the module
 	  will be called apne.
 
-config PCMCIA_PCNET
-	tristate "NE2000 compatible PCMCIA support"
-	depends on PCMCIA && HAS_IOPORT
-	select CRC32
-	help
-	  Say Y here if you intend to attach an NE2000 compatible PCMCIA
-	  (PC-card) Ethernet or Fast Ethernet card to your computer.
-
-	  To compile this driver as a module, choose M here: the module will be
-	  called pcnet_cs.  If unsure, say N.
-
 config STNIC
 	tristate "National DP83902AV  support"
 	depends on SUPERH
drivers/net/ethernet/8390/Makefile +0 -1
index 60220484b382..b215136a603b 100644
@@ -11,7 +11,6 @@ obj-$(CONFIG_HYDRA) += hydra.o
 obj-$(CONFIG_MCF8390) += mcf8390.o
 obj-$(CONFIG_NE2000) += ne.o 8390p.o
 obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
-obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o
 obj-$(CONFIG_STNIC) += stnic.o 8390.o
 obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
 obj-$(CONFIG_WD80x3) += wd.o 8390.o
drivers/net/ethernet/8390/pcnet_cs.c deleted +0 -1717

1,717 lines not on this page · raw message

Signature · 1 line
2.53.0
maintainer Acked-by on v2 13/15
#23 lore raw

Re: [PATCH net v2 13/15] drivers: net: 8390: pcnet: Remove this driver

Quoted 8 lines · Andrew Lunn

The pcnet was written by David A. Hindsh in 1999. It is an PCMCIA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/8390/Kconfig    |   11 -
 drivers/net/ethernet/8390/Makefile   |    1 -
 drivers/net/ethernet/8390/pcnet_cs.c | 1717 ----------------------------------

NACK for this one. This is the most common PCMCIA networking device, so should be removed only once the rest of the PCMCIA subsystem is removed. For the other removals of PCMCIA device drivers in this series:

Thanks,
Dominik

#24 lore raw

Re: [PATCH net v2 13/15] drivers: net: 8390: pcnet: Remove this driver

Quoted 4 lines · Dominik Brodowski
Quoted 3 lines · Andrew Lunn

The pcnet was written by David A. Hindsh in 1999. It is an PCMCIA device, so unlikely to be used with modern kernels.

Quoted 8 lines
Quoted 5 lines
---
 drivers/net/ethernet/8390/Kconfig    |   11 -
 drivers/net/ethernet/8390/Makefile   |    1 -
 drivers/net/ethernet/8390/pcnet_cs.c | 1717 ----------------------------------

NACK for this one. This is the most common PCMCIA networking device, so should be removed only once the rest of the PCMCIA subsystem is removed.

Please submit a patch to MAINTAINERS making yourself the Maintainer of this driver, if you want to keep it around.

Andrew

#25 lore raw

Re: [PATCH net v2 13/15] drivers: net: 8390: pcnet: Remove this driver

Am Thu, Apr 23, 2026 at 02:04:10PM +0200 schrieb Andrew Lunn:

Quoted 11 lines · Dominik Brodowski
Quoted 10 lines · Andrew Lunn
Quoted 8 lines

The pcnet was written by David A. Hindsh in 1999. It is an PCMCIA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/8390/Kconfig    |   11 -
 drivers/net/ethernet/8390/Makefile   |    1 -
 drivers/net/ethernet/8390/pcnet_cs.c | 1717 ----------------------------------
Quoted 5 lines
Quoted 2 lines

NACK for this one. This is the most common PCMCIA networking device, so should be removed only once the rest of the PCMCIA subsystem is removed.

Please submit a patch to MAINTAINERS making yourself the Maintainer of this driver, if you want to keep it around.

Feel free to move the MAINTAINER entry for this to the PCMCIA subsystem, as patches will be handled then via the PCMCIA tree anyway.

Best,
Dominik

#26 lore raw

Re: [PATCH net v2 13/15] drivers: net: 8390: pcnet: Remove this driver

In reply to Andrew Lunn
Quoted 1 line · Andrew Lunn

The pcnet was written by David A. Hindsh

Hinds again

#27 lore raw

PATCH v2 14/15 drivers: net: 8390: ultra: Remove this driver

In reply to Andrew Lunn

The ultra was written by Donald Becker 1993 to 1998. It is an ISA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/8390/Kconfig     |  18 -
 drivers/net/ethernet/8390/Makefile    |   1 -
 drivers/net/ethernet/8390/smc-ultra.c | 630 ----------------------------------
 3 files changed, 649 deletions(-)
drivers/net/ethernet/8390/Kconfig +0 -18
index 3e56806471a3..dd066b0a39d5 100644
@@ -144,24 +144,6 @@ config STNIC
 
 	  If unsure, say N.
 
-config ULTRA
-	tristate "SMC Ultra support"
-	depends on ISA
-	select NETDEV_LEGACY_INIT
-	select CRC32
-	help
-	  If you have a network (Ethernet) card of this type, say Y here.
-
-	  Important: There have been many reports that, with some motherboards
-	  mixing an SMC Ultra and an Adaptec AHA154x SCSI card (or compatible,
-	  such as some BusLogic models) causes corruption problems with many
-	  operating systems. The Linux smc-ultra driver has a work-around for
-	  this but keep it in mind if you have such a SCSI card and have
-	  problems.
-
-	  To compile this driver as a module, choose M here. The module
-	  will be called smc-ultra.
-
 config WD80x3
 	tristate "WD80*3 support"
 	depends on ISA
drivers/net/ethernet/8390/Makefile +0 -1
index b215136a603b..0afdccddda58 100644
@@ -12,7 +12,6 @@ obj-$(CONFIG_MCF8390) += mcf8390.o
 obj-$(CONFIG_NE2000) += ne.o 8390p.o
 obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
 obj-$(CONFIG_STNIC) += stnic.o 8390.o
-obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
 obj-$(CONFIG_WD80x3) += wd.o 8390.o
 obj-$(CONFIG_XSURF100) += xsurf100.o
 obj-$(CONFIG_ZORRO8390) += zorro8390.o
drivers/net/ethernet/8390/smc-ultra.c deleted +0 -630

630 lines not on this page · raw message

Signature · 1 line
2.53.0
#28 lore raw

PATCH v2 15/15 drivers: net: 8390: wd80x3: Remove this driver

In reply to Andrew Lunn

The wd80x3 was written by Donald Becker 1993 to 1994. It is an ISA device, so unlikely to be used with modern kernels.

---
 drivers/net/ethernet/8390/Kconfig  |  11 -
 drivers/net/ethernet/8390/Makefile |   1 -
 drivers/net/ethernet/8390/wd.c     | 575 -------------------------------------
 3 files changed, 587 deletions(-)
drivers/net/ethernet/8390/Kconfig +0 -11
index dd066b0a39d5..d2116d70ab5d 100644
@@ -144,17 +144,6 @@ config STNIC
 
 	  If unsure, say N.
 
-config WD80x3
-	tristate "WD80*3 support"
-	depends on ISA
-	select NETDEV_LEGACY_INIT
-	select CRC32
-	help
-	  If you have a network (Ethernet) card of this type, say Y here.
-
-	  To compile this driver as a module, choose M here. The module
-	  will be called wd.
-
 config ZORRO8390
 	tristate "Zorro NS8390-based Ethernet support"
 	depends on ZORRO
drivers/net/ethernet/8390/Makefile +0 -1
index 0afdccddda58..ad5145c30c85 100644
@@ -12,6 +12,5 @@ obj-$(CONFIG_MCF8390) += mcf8390.o
 obj-$(CONFIG_NE2000) += ne.o 8390p.o
 obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
 obj-$(CONFIG_STNIC) += stnic.o 8390.o
-obj-$(CONFIG_WD80x3) += wd.o 8390.o
 obj-$(CONFIG_XSURF100) += xsurf100.o
 obj-$(CONFIG_ZORRO8390) += zorro8390.o
drivers/net/ethernet/8390/wd.c deleted +0 -575

575 lines not on this page · raw message

Signature · 1 line
2.53.0
#29 lore raw

Re: [PATCH net v2 15/15] drivers: net: 8390: wd80x3: Remove this driver

kernel test robot noticed the following build warnings:

Hi Andrew,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 1f5ffc672165ff851063a5fd044b727ab2517ae3]

url:    https://github.com/intel-lab-lkp/linux/commits/Andrew-Lunn/drivers-net-3com-3c509-Remove-this-driver/20260424-104110
base:   1f5ffc672165ff851063a5fd044b727ab2517ae3
patch link:    https://lore.kernel.org/r/20260422-v7-0-0-net-next-driver-removal-v1-v2-15-08a5b59784d5%40lunn.ch
patch subject: [PATCH net v2 15/15] drivers: net: 8390: wd80x3: Remove this driver
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
docutils: docutils (Docutils 0.21.2, Python 3.13.5, on linux)
reproduce: (https://download.01.org/0day-ci/archive/20260430/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

Non-Preserved Properties
======================== [docutils]

>> Documentation/networking/device_drivers/ethernet/index.rst:10: WARNING: toctree contains reference to nonexisting document 'networking/device_drivers/ethernet/3com/3c509' [toc.not_readable]

Documentation/networking/skbuff:36: ./include/linux/skbuff.h:48: ERROR: Unexpected section title.

vim +10 Documentation/networking/device_drivers/ethernet/index.rst

132db93572821e Jakub Kicinski 2020-06-26   7  
132db93572821e Jakub Kicinski 2020-06-26   8  Contents:
132db93572821e Jakub Kicinski 2020-06-26   9  

132db93572821e Jakub Kicinski 2020-06-26 @10 .. toctree::

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki