Commit ee446fd5 authored by Paul Gortmaker's avatar Paul Gortmaker

tokenring: delete all remaining driver support

This represents the mass deletion of the of the tokenring support.

It gets rid of:
  - the net/tr.c which the drivers depended on
  - the drivers/net component
  - the Kbuild infrastructure around it
  - any tokenring related CONFIG_ settings in any defconfigs
  - the tokenring headers in the include/linux dir
  - the firmware associated with the tokenring drivers.
  - any associated token ring documentation.
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 211ed865
......@@ -996,7 +996,6 @@ Table 1-9: Network info in /proc/net
snmp SNMP data
sockstat Socket statistics
tcp TCP sockets
tr_rif Token ring RIF routing table
udp UDP sockets
unix UNIX domain sockets
wireless Wireless interface data (Wavelan etc)
......
00-INDEX
- this file
3c359.txt
- information on the 3Com TokenLink Velocity XL (3c5359) driver.
3c505.txt
- information on the 3Com EtherLink Plus (3c505) driver.
3c509.txt
......@@ -142,8 +140,6 @@ netif-msg.txt
- Design of the network interface message level setting (NETIF_MSG_*).
nfc.txt
- The Linux Near Field Communication (NFS) subsystem.
olympic.txt
- IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info.
openvswitch.txt
- Open vSwitch developer documentation.
operstates.txt
......@@ -184,8 +180,6 @@ skfp.txt
- SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info.
smc9.txt
- the driver for SMC's 9000 series of Ethernet cards
smctr.txt
- SMC TokenCard TokenRing Linux driver info.
spider-net.txt
- README for the Spidernet Driver (as found in PS3 / Cell BE).
stmmac.txt
......@@ -200,8 +194,6 @@ tcp-thin.txt
- kernel tuning options for low rate 'thin' TCP streams.
tlan.txt
- ThunderLAN (Compaq Netelligent 10/100, Olicom OC-2xxx) driver info.
tms380tr.txt
- SysKonnect Token Ring ISA/PCI adapter driver info.
tproxy.txt
- Transparent proxy support user guide.
tuntap.txt
......
3COM PCI TOKEN LINK VELOCITY XL TOKEN RING CARDS README
Release 0.9.0 - Release
Jul 17th 2000 Mike Phillips
1.2.0 - Final
Feb 17th 2002 Mike Phillips
Updated for submission to the 2.4.x kernel.
Thanks:
Terry Murphy from 3Com for tech docs and support,
Adam D. Ligas for testing the driver.
Note:
This driver will NOT work with the 3C339 Token Ring cards, you need
to use the tms380 driver instead.
Options:
The driver accepts three options: ringspeed, pkt_buf_sz and message_level.
These options can be specified differently for each card found.
ringspeed: Has one of three settings 0 (default), 4 or 16. 0 will
make the card autosense the ringspeed and join at the appropriate speed,
this will be the default option for most people. 4 or 16 allow you to
explicitly force the card to operate at a certain speed. The card will fail
if you try to insert it at the wrong speed. (Although some hubs will allow
this so be *very* careful). The main purpose for explicitly setting the ring
speed is for when the card is first on the ring. In autosense mode, if the card
cannot detect any active monitors on the ring it will open at the same speed as
its last opening. This can be hazardous if this speed does not match the speed
you want the ring to operate at.
pkt_buf_sz: This is this initial receive buffer allocation size. This will
default to 4096 if no value is entered. You may increase performance of the
driver by setting this to a value larger than the network packet size, although
the driver now re-sizes buffers based on MTU settings as well.
message_level: Controls level of messages created by the driver. Defaults to 0:
which only displays start-up and critical messages. Presently any non-zero
value will display all soft messages as well. NB This does not turn
debugging messages on, that must be done by modified the source code.
Variable MTU size:
The driver can handle a MTU size up to either 4500 or 18000 depending upon
ring speed. The driver also changes the size of the receive buffers as part
of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring
position = 296,000 bytes of memory space, plus of course anything
necessary for the tx sk_buff's. Remember this is per card, so if you are
building routers, gateway's etc, you could start to use a lot of memory
real fast.
2/17/02 Mike Phillips
IBM PCI Pit/Pit-Phy/Olympic CHIPSET BASED TOKEN RING CARDS README
Release 0.2.0 - Release
June 8th 1999 Peter De Schrijver & Mike Phillips
Release 0.9.C - Release
April 18th 2001 Mike Phillips
Thanks:
Erik De Cock, Adrian Bridgett and Frank Fiene for their
patience and testing.
Donald Champion for the cardbus support
Kyle Lucke for the dma api changes.
Jonathon Bitner for hardware support.
Everybody on linux-tr for their continued support.
Options:
The driver accepts four options: ringspeed, pkt_buf_sz,
message_level and network_monitor.
These options can be specified differently for each card found.
ringspeed: Has one of three settings 0 (default), 4 or 16. 0 will
make the card autosense the ringspeed and join at the appropriate speed,
this will be the default option for most people. 4 or 16 allow you to
explicitly force the card to operate at a certain speed. The card will fail
if you try to insert it at the wrong speed. (Although some hubs will allow
this so be *very* careful). The main purpose for explicitly setting the ring
speed is for when the card is first on the ring. In autosense mode, if the card
cannot detect any active monitors on the ring it will not open, so you must
re-init the card at the appropriate speed. Unfortunately at present the only
way of doing this is rmmod and insmod which is a bit tough if it is compiled
in the kernel.
pkt_buf_sz: This is this initial receive buffer allocation size. This will
default to 4096 if no value is entered. You may increase performance of the
driver by setting this to a value larger than the network packet size, although
the driver now re-sizes buffers based on MTU settings as well.
message_level: Controls level of messages created by the driver. Defaults to 0:
which only displays start-up and critical messages. Presently any non-zero
value will display all soft messages as well. NB This does not turn
debugging messages on, that must be done by modified the source code.
network_monitor: Any non-zero value will provide a quasi network monitoring
mode. All unexpected MAC frames (beaconing etc.) will be received
by the driver and the source and destination addresses printed.
Also an entry will be added in /proc/net called olympic_tr%d, where tr%d
is the registered device name, i.e tr0, tr1, etc. This displays low
level information about the configuration of the ring and the adapter.
This feature has been designed for network administrators to assist in
the diagnosis of network / ring problems. (This used to OLYMPIC_NETWORK_MONITOR,
but has now changed to allow each adapter to be configured differently and
to alleviate the necessity to re-compile olympic to turn the option on).
Multi-card:
The driver will detect multiple cards and will work with shared interrupts,
each card is assigned the next token ring device, i.e. tr0 , tr1, tr2. The
driver should also happily reside in the system with other drivers. It has
been tested with ibmtr.c running, and I personally have had one Olicom PCI
card and two IBM olympic cards (all on the same interrupt), all running
together.
Variable MTU size:
The driver can handle a MTU size up to either 4500 or 18000 depending upon
ring speed. The driver also changes the size of the receive buffers as part
of the mtu re-sizing, so if you set mtu = 18000, you will need to be able
to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring
position = 296,000 bytes of memory space, plus of course anything
necessary for the tx sk_buff's. Remember this is per card, so if you are
building routers, gateway's etc, you could start to use a lot of memory
real fast.
6/8/99 Peter De Schrijver and Mike Phillips
Text File for the SMC TokenCard TokenRing Linux driver (smctr.c).
By Jay Schulist <jschlst@samba.org>
The Linux SMC Token Ring driver works with the SMC TokenCard Elite (8115T)
ISA and SMC TokenCard Elite/A (8115T/A) MCA adapters.
Latest information on this driver can be obtained on the Linux-SNA WWW site.
Please point your browser to: http://www.linux-sna.org
This driver is rather simple to use. Select Y to Token Ring adapter support
in the kernel configuration. A choice for SMC Token Ring adapters will
appear. This drives supports all SMC ISA/MCA adapters. Choose this
option. I personally recommend compiling the driver as a module (M), but if you
you would like to compile it statically answer Y instead.
This driver supports multiple adapters without the need to load multiple copies
of the driver. You should be able to load up to 7 adapters without any kernel
modifications, if you are in need of more please contact the maintainer of this
driver.
Load the driver either by lilo/loadlin or as a module. When a module using the
following command will suffice for most:
# modprobe smctr
smctr.c: v1.00 12/6/99 by jschlst@samba.org
tr0: SMC TokenCard 8115T at Io 0x300, Irq 10, Rom 0xd8000, Ram 0xcc000.
Now just setup the device via ifconfig and set and routes you may have. After
this you are ready to start sending some tokens.
Errata:
1). For anyone wondering where to pick up the SMC adapters please browse
to http://www.smc.com
2). If you are the first/only Token Ring Client on a Token Ring LAN, please
specify the ringspeed with the ringspeed=[4/16] module option. If no
ringspeed is specified the driver will attempt to autodetect the ring
speed and/or if the adapter is the first/only station on the ring take
the appropriate actions.
NOTE: Default ring speed is 16MB UTP.
3). PnP support for this adapter sucks. I recommend hard setting the
IO/MEM/IRQ by the jumpers on the adapter. If this is not possible
load the module with the following io=[ioaddr] mem=[mem_addr]
irq=[irq_num].
The following IRQ, IO, and MEM settings are supported.
IO ports:
0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0, 0x300,
0x320, 0x340, 0x360, 0x380.
IRQs:
2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15
Memory addresses:
0xA0000, 0xA4000, 0xA8000, 0xAC000, 0xB0000, 0xB4000,
0xB8000, 0xBC000, 0xC0000, 0xC4000, 0xC8000, 0xCC000,
0xD0000, 0xD4000, 0xD8000, 0xDC000, 0xE0000, 0xE4000,
0xE8000, 0xEC000, 0xF0000, 0xF4000, 0xF8000, 0xFC000
This driver is under the GNU General Public License. Its Firmware image is
included as an initialized C-array and is licensed by SMC to the Linux
users of this driver. However no warranty about its fitness is expressed or
implied by SMC.
Text file for the Linux SysKonnect Token Ring ISA/PCI Adapter Driver.
Text file by: Jay Schulist <jschlst@samba.org>
The Linux SysKonnect Token Ring driver works with the SysKonnect TR4/16(+) ISA,
SysKonnect TR4/16(+) PCI, SysKonnect TR4/16 PCI, and older revisions of the
SK NET TR4/16 ISA card.
Latest information on this driver can be obtained on the Linux-SNA WWW site.
Please point your browser to:
http://www.linux-sna.org
Many thanks to Christoph Goos for his excellent work on this driver and
SysKonnect for donating the adapters to Linux-SNA for the testing and
maintenance of this device driver.
Important information to be noted:
1. Adapters can be slow to open (~20 secs) and close (~5 secs), please be
patient.
2. This driver works very well when autoprobing for adapters. Why even
think about those nasty io/int/dma settings of modprobe when the driver
will do it all for you!
This driver is rather simple to use. Select Y to Token Ring adapter support
in the kernel configuration. A choice for SysKonnect Token Ring adapters will
appear. This drives supports all SysKonnect ISA and PCI adapters. Choose this
option. I personally recommend compiling the driver as a module (M), but if you
you would like to compile it statically answer Y instead.
This driver supports multiple adapters without the need to load multiple copies
of the driver. You should be able to load up to 7 adapters without any kernel
modifications, if you are in need of more please contact the maintainer of this
driver.
Load the driver either by lilo/loadlin or as a module. When a module using the
following command will suffice for most:
# modprobe sktr
This will produce output similar to the following: (Output is user specific)
sktr.c: v1.01 08/29/97 by Christoph Goos
tr0: SK NET TR 4/16 PCI found at 0x6100, using IRQ 17.
tr1: SK NET TR 4/16 PCI found at 0x6200, using IRQ 16.
tr2: SK NET TR 4/16 ISA found at 0xa20, using IRQ 10 and DMA 5.
Now just setup the device via ifconfig and set and routes you may have. After
this you are ready to start sending some tokens.
Errata:
For anyone wondering where to pick up the SysKonnect adapters please browse
to http://www.syskonnect.com
This driver is under the GNU General Public License. Its Firmware image is
included as an initialized C-array and is licensed by SysKonnect to the Linux
users of this driver. However no warranty about its fitness is expressed or
implied by SysKonnect.
Below find attached the setting for the SK NET TR 4/16 ISA adapters
-------------------------------------------------------------------
***************************
*** C O N T E N T S ***
***************************
1) Location of DIP-Switch W1
2) Default settings
3) DIP-Switch W1 description
==============================================================
CHAPTER 1 LOCATION OF DIP-SWITCH
==============================================================
UÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
þUÄÄÄÄÄÄ¿ UÄÄÄÄÄ¿ UÄÄÄ¿ þ
þAÄÄÄÄÄÄU W1 AÄÄÄÄÄU UÄÄÄÄ¿ þ þ þ
þUÄÄÄÄÄÄ¿ þ þ þ þ UÄÄÅ¿
þAÄÄÄÄÄÄU UÄÄÄÄÄÄÄÄÄÄÄ¿ AÄÄÄÄU þ þ þ þþ
þUÄÄÄÄÄÄ¿ þ þ UÄÄÄ¿ AÄÄÄU AÄÄÅU
þAÄÄÄÄÄÄU þ TMS380C26 þ þ þ þ
þUÄÄÄÄÄÄ¿ þ þ AÄÄÄU AÄ¿
þAÄÄÄÄÄÄU þ þ þ þ
þ AÄÄÄÄÄÄÄÄÄÄÄU þ þ
þ þ þ
þ AÄU
þ þ
þ þ
þ þ
þ þ
AÄÄÄÄÄÄÄÄÄÄÄÄAÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄAÄÄAÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄAÄÄÄÄÄÄÄÄÄU
AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄU AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄU
==============================================================
CHAPTER 2 DEFAULT SETTINGS
==============================================================
W1 1 2 3 4 5 6 7 8
+------------------------------+
| ON X |
| OFF X X X X X X X |
+------------------------------+
W1.1 = ON Adapter drives address lines SA17..19
W1.2 - 1.5 = OFF BootROM disabled
W1.6 - 1.8 = OFF I/O address 0A20h
==============================================================
CHAPTER 3 DIP SWITCH W1 DESCRIPTION
==============================================================
UÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄ¿ ON
þ 1 þ 2 þ 3 þ 4 þ 5 þ 6 þ 7 þ 8 þ
AÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄU OFF
|AD | BootROM Addr. | I/O |
+-+-+-------+-------+-----+-----+
| | |
| | +------ 6 7 8
| | ON ON ON 1900h
| | ON ON OFF 0900h
| | ON OFF ON 1980h
| | ON OFF OFF 0980h
| | OFF ON ON 1b20h
| | OFF ON OFF 0b20h
| | OFF OFF ON 1a20h
| | OFF OFF OFF 0a20h (+)
| |
| |
| +-------- 2 3 4 5
| OFF x x x disabled (+)
| ON ON ON ON C0000
| ON ON ON OFF C4000
| ON ON OFF ON C8000
| ON ON OFF OFF CC000
| ON OFF ON ON D0000
| ON OFF ON OFF D4000
| ON OFF OFF ON D8000
| ON OFF OFF OFF DC000
|
|
+----- 1
OFF adapter does NOT drive SA<17..19>
ON adapter drives SA<17..19> (+)
(+) means default setting
********************************
......@@ -346,11 +346,8 @@ CONFIG_CHELSIO_T1=m
CONFIG_IXGB=m
CONFIG_S2IO=m
CONFIG_MYRI10GE=m
CONFIG_TR=y
CONFIG_IBMOL=m
CONFIG_IBMLS=m
CONFIG_3C359=m
CONFIG_TMS380TR=m
CONFIG_TMSPCI=m
CONFIG_ABYSS=m
CONFIG_USB_CATC=m
......@@ -376,7 +373,6 @@ CONFIG_PCMCIA_SMC91C92=m
CONFIG_PCMCIA_XIRC2PS=m
CONFIG_PCMCIA_AXNET=m
CONFIG_ARCNET_COM20020_CS=m
CONFIG_PCMCIA_IBMTR=m
CONFIG_WAN=y
CONFIG_LANMEDIA=m
CONFIG_HDLC=m
......
......@@ -332,11 +332,6 @@ CONFIG_XT2000_SONIC=y
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
#
# Token Ring devices
#
# CONFIG_TR is not set
#
# Wireless LAN (non-hamradio)
#
......
......@@ -69,7 +69,6 @@
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/delay.h>
// #include <linux/trdevice.h>
#include <asm/uaccess.h>
#include <asm/io.h>
......
......@@ -282,8 +282,6 @@ source "drivers/net/slip/Kconfig"
source "drivers/s390/net/Kconfig"
source "drivers/net/tokenring/Kconfig"
source "drivers/net/usb/Kconfig"
source "drivers/net/wireless/Kconfig"
......
......@@ -50,7 +50,6 @@ obj-$(CONFIG_SLIP) += slip/
obj-$(CONFIG_SLHC) += slip/
obj-$(CONFIG_NET_SB1000) += sb1000.o
obj-$(CONFIG_SUNGEM_PHY) += sungem_phy.o
obj-$(CONFIG_TR) += tokenring/
obj-$(CONFIG_WAN) += wan/
obj-$(CONFIG_WLAN) += wireless/
obj-$(CONFIG_WIMAX) += wimax/
......
......@@ -29,7 +29,6 @@
*/
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/trdevice.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/netlink.h>
......@@ -284,46 +283,6 @@ static void __init ethif_probe2(int unit)
probe_list2(unit, parport_probes, base_addr == 0));
}
#ifdef CONFIG_TR
/* Token-ring device probe */
extern int ibmtr_probe_card(struct net_device *);
extern struct net_device *smctr_probe(int unit);
static struct devprobe2 tr_probes2[] __initdata = {
#ifdef CONFIG_SMCTR
{smctr_probe, 0},
#endif
{NULL, 0},
};
static __init int trif_probe(int unit)
{
int err = -ENODEV;
#ifdef CONFIG_IBMTR
struct net_device *dev = alloc_trdev(0);
if (!dev)
return -ENOMEM;
sprintf(dev->name, "tr%d", unit);
netdev_boot_setup_check(dev);
err = ibmtr_probe_card(dev);
if (err)
free_netdev(dev);
#endif
return err;
}
static void __init trif_probe2(int unit)
{
unsigned long base_addr = netdev_boot_base("tr", unit);
if (base_addr == 1)
return;
probe_list2(unit, tr_probes2, base_addr == 0);
}
#endif
/* Statically configured drivers -- order matters here. */
static int __init net_olddevs_init(void)
{
......@@ -332,11 +291,6 @@ static int __init net_olddevs_init(void)
#ifdef CONFIG_SBNI
for (num = 0; num < 8; ++num)
sbni_probe(num);
#endif
#ifdef CONFIG_TR
for (num = 0; num < 8; ++num)
if (!trif_probe(num))
trif_probe2(num);
#endif
for (num = 0; num < 8; ++num)
ethif_probe2(num);
......
This diff is collapsed.
/*
* 3c359.h (c) 2000 Mike Phillips (mikep@linuxtr.net) All Rights Reserved
*
* Linux driver for 3Com 3C359 Token Link PCI XL cards.
*
* This software may be used and distributed according to the terms
* of the GNU General Public License Version 2 or (at your option)
* any later verion, incorporated herein by reference.
*/
/* Memory Access Commands */
#define IO_BYTE_READ 0x28 << 24
#define IO_BYTE_WRITE 0x18 << 24
#define IO_WORD_READ 0x20 << 24
#define IO_WORD_WRITE 0x10 << 24
#define MMIO_BYTE_READ 0x88 << 24
#define MMIO_BYTE_WRITE 0x48 << 24
#define MMIO_WORD_READ 0x80 << 24
#define MMIO_WORD_WRITE 0x40 << 24
#define MEM_BYTE_READ 0x8C << 24
#define MEM_BYTE_WRITE 0x4C << 24
#define MEM_WORD_READ 0x84 << 24
#define MEM_WORD_WRITE 0x44 << 24
#define PMBAR 0x1C80
#define PMB_CPHOLD (1<<10)
#define CPATTENTION 0x180D
#define CPA_PMBARVIS (1<<7)
#define CPA_MEMWREN (1<<6)
#define SWITCHSETTINGS 0x1C88
#define EECONTROL 0x1C8A
#define EEDATA 0x1C8C
#define EEREAD 0x0080
#define EEWRITE 0x0040
#define EEERASE 0x0060
#define EE_ENABLE_WRITE 0x0030
#define EEBUSY (1<<15)
#define WRBR 0xCDE02
#define WWOR 0xCDE04
#define WWCR 0xCDE06
#define MACSTATUS 0xCDE08
#define MISR_RW 0xCDE0B
#define MISR_AND 0xCDE2B
#define MISR_SET 0xCDE4B
#define RXBUFAREA 0xCDE10
#define RXEARLYTHRESH 0xCDE12
#define TXSTARTTHRESH 0x58
#define DNPRIREQTHRESH 0x2C
#define MISR_CSRB (1<<5)
#define MISR_RASB (1<<4)
#define MISR_SRBFR (1<<3)
#define MISR_ASBFR (1<<2)
#define MISR_ARBF (1<<1)
/* MISR Flags memory locations */
#define MF_SSBF 0xDFFE0
#define MF_ARBF 0xDFFE1
#define MF_ASBFR 0xDFFE2
#define MF_SRBFR 0xDFFE3
#define MF_RASB 0xDFFE4
#define MF_CSRB 0xDFFE5
#define MMIO_MACDATA 0x10
#define MMIO_MAC_ACCESS_CMD 0x14
#define MMIO_TIMER 0x1A
#define MMIO_DMA_CTRL 0x20
#define MMIO_DNLISTPTR 0x24
#define MMIO_HASHFILTER 0x28
#define MMIO_CONFIG 0x29
#define MMIO_DNPRIREQTHRESH 0x2C
#define MMIO_DNPOLL 0x2D
#define MMIO_UPPKTSTATUS 0x30
#define MMIO_FREETIMER 0x34
#define MMIO_COUNTDOWN 0x36
#define MMIO_UPLISTPTR 0x38
#define MMIO_UPPOLL 0x3C
#define MMIO_UPBURSTTHRESH 0x40
#define MMIO_DNBURSTTHRESH 0x41
#define MMIO_INTSTATUS_AUTO 0x56
#define MMIO_TXSTARTTHRESH 0x58
#define MMIO_INTERRUPTENABLE 0x5A
#define MMIO_INDICATIONENABLE 0x5C
#define MMIO_COMMAND 0x5E /* These two are meant to be the same */
#define MMIO_INTSTATUS 0x5E /* Makes the code more readable this way */
#define INTSTAT_CMD_IN_PROGRESS (1<<12)
#define INTSTAT_SRB (1<<14)
#define INTSTAT_INTLATCH (1<<0)
/* Indication / Interrupt Mask
* Annoyingly the bits to be set in the indication and interrupt enable
* do not match with the actual bits received in the interrupt, although
* they are in the same order.
* The mapping for the indication / interrupt are:
* Bit Indication / Interrupt
* 0 HostError
* 1 txcomplete
* 2 updneeded
* 3 rxcomplete
* 4 intrequested
* 5 macerror
* 6 dncomplete
* 7 upcomplete
* 8 txunderrun
* 9 asbf
* 10 srbr
* 11 arbc
*
* The only ones we don't want to receive are txcomplete and rxcomplete
* we use dncomplete and upcomplete instead.
*/
#define INT_MASK 0xFF5
/* Note the subtle difference here, IND and INT */
#define SETINDENABLE (8<<12)
#define SETINTENABLE (7<<12)
#define SRBBIT (1<<10)
#define ASBBIT (1<<9)
#define ARBBIT (1<<11)
#define SRB 0xDFE90
#define ASB 0xDFED0
#define ARB 0xD0000
#define SCRATCH 0xDFEF0
#define INT_REQUEST 0x6000 /* (6 << 12) */
#define ACK_INTERRUPT 0x6800 /* (13 <<11) */
#define GLOBAL_RESET 0x00
#define DNDISABLE 0x5000
#define DNENABLE 0x4800
#define DNSTALL 0x3002
#define DNRESET 0x5800
#define DNUNSTALL 0x3003
#define UPRESET 0x2800
#define UPSTALL 0x3000
#define UPUNSTALL 0x3001
#define SETCONFIG 0x4000
#define SETTXSTARTTHRESH 0x9800
/* Received Interrupts */
#define ASBFINT (1<<13)
#define SRBRINT (1<<14)
#define ARBCINT (1<<15)
#define TXUNDERRUN (1<<11)
#define UPCOMPINT (1<<10)
#define DNCOMPINT (1<<9)
#define HARDERRINT (1<<7)
#define RXCOMPLETE (1<<4)
#define TXCOMPINT (1<<2)
#define HOSTERRINT (1<<1)
/* Receive descriptor bits */
#define RXOVERRUN cpu_to_le32(1<<19)
#define RXFC cpu_to_le32(1<<21)
#define RXAR cpu_to_le32(1<<22)
#define RXUPDCOMPLETE cpu_to_le32(1<<23)
#define RXUPDFULL cpu_to_le32(1<<24)
#define RXUPLASTFRAG cpu_to_le32(1<<31)
/* Transmit descriptor bits */
#define TXDNCOMPLETE cpu_to_le32(1<<16)
#define TXTXINDICATE cpu_to_le32(1<<27)
#define TXDPDEMPTY cpu_to_le32(1<<29)
#define TXDNINDICATE cpu_to_le32(1<<31)
#define TXDNFRAGLAST cpu_to_le32(1<<31)
/* Interrupts to Acknowledge */
#define LATCH_ACK 1
#define TXCOMPACK (1<<1)
#define INTREQACK (1<<2)
#define DNCOMPACK (1<<3)
#define UPCOMPACK (1<<4)
#define ASBFACK (1<<5)
#define SRBRACK (1<<6)
#define ARBCACK (1<<7)
#define XL_IO_SPACE 128
#define SRB_COMMAND_SIZE 50
/* Adapter Commands */
#define REQUEST_INT 0x00
#define MODIFY_OPEN_PARMS 0x01
#define RESTORE_OPEN_PARMS 0x02
#define OPEN_NIC 0x03
#define CLOSE_NIC 0x04
#define SET_SLEEP_MODE 0x05
#define SET_GROUP_ADDRESS 0x06
#define SET_FUNC_ADDRESS 0x07
#define READ_LOG 0x08
#define SET_MULTICAST_MODE 0x0C
#define CHANGE_WAKEUP_PATTERN 0x0D
#define GET_STATISTICS 0x13
#define SET_RECEIVE_MODE 0x1F
/* ARB Commands */
#define RECEIVE_DATA 0x81
#define RING_STATUS_CHANGE 0x84
/* ASB Commands */
#define ASB_RECEIVE_DATE 0x81
/* Defines for LAN STATUS CHANGE reports */
#define LSC_SIG_LOSS 0x8000
#define LSC_HARD_ERR 0x4000
#define LSC_SOFT_ERR 0x2000
#define LSC_TRAN_BCN 0x1000
#define LSC_LWF 0x0800
#define LSC_ARW 0x0400
#define LSC_FPE 0x0200
#define LSC_RR 0x0100
#define LSC_CO 0x0080
#define LSC_SS 0x0040
#define LSC_RING_REC 0x0020
#define LSC_SR_CO 0x0010
#define LSC_FDX_MODE 0x0004
#define XL_MAX_ADAPTERS 8 /* 0x08 __MODULE_STRING can't hand 0xnn */