aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c501.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/net/3c501.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/net/3c501.h')
-rw-r--r--drivers/net/3c501.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/drivers/net/3c501.h b/drivers/net/3c501.h
new file mode 100644
index 000000000000..adb0588a4d79
--- /dev/null
+++ b/drivers/net/3c501.h
@@ -0,0 +1,93 @@
1
2/*
3 * Index to functions.
4 */
5
6static int el1_probe1(struct net_device *dev, int ioaddr);
7static int el_open(struct net_device *dev);
8static void el_timeout(struct net_device *dev);
9static int el_start_xmit(struct sk_buff *skb, struct net_device *dev);
10static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs);
11static void el_receive(struct net_device *dev);
12static void el_reset(struct net_device *dev);
13static int el1_close(struct net_device *dev);
14static struct net_device_stats *el1_get_stats(struct net_device *dev);
15static void set_multicast_list(struct net_device *dev);
16static struct ethtool_ops netdev_ethtool_ops;
17
18#define EL1_IO_EXTENT 16
19
20#ifndef EL_DEBUG
21#define EL_DEBUG 0 /* use 0 for production, 1 for devel., >2 for debug */
22#endif /* Anything above 5 is wordy death! */
23#define debug el_debug
24static int el_debug = EL_DEBUG;
25
26/*
27 * Board-specific info in dev->priv.
28 */
29
30struct net_local
31{
32 struct net_device_stats stats;
33 int tx_pkt_start; /* The length of the current Tx packet. */
34 int collisions; /* Tx collisions this packet */
35 int loading; /* Spot buffer load collisions */
36 int txing; /* True if card is in TX mode */
37 spinlock_t lock; /* Serializing lock */
38};
39
40
41#define RX_STATUS (ioaddr + 0x06)
42#define RX_CMD RX_STATUS
43#define TX_STATUS (ioaddr + 0x07)
44#define TX_CMD TX_STATUS
45#define GP_LOW (ioaddr + 0x08)
46#define GP_HIGH (ioaddr + 0x09)
47#define RX_BUF_CLR (ioaddr + 0x0A)
48#define RX_LOW (ioaddr + 0x0A)
49#define RX_HIGH (ioaddr + 0x0B)
50#define SAPROM (ioaddr + 0x0C)
51#define AX_STATUS (ioaddr + 0x0E)
52#define AX_CMD AX_STATUS
53#define DATAPORT (ioaddr + 0x0F)
54#define TX_RDY 0x08 /* In TX_STATUS */
55
56#define EL1_DATAPTR 0x08
57#define EL1_RXPTR 0x0A
58#define EL1_SAPROM 0x0C
59#define EL1_DATAPORT 0x0f
60
61/*
62 * Writes to the ax command register.
63 */
64
65#define AX_OFF 0x00 /* Irq off, buffer access on */
66#define AX_SYS 0x40 /* Load the buffer */
67#define AX_XMIT 0x44 /* Transmit a packet */
68#define AX_RX 0x48 /* Receive a packet */
69#define AX_LOOP 0x0C /* Loopback mode */
70#define AX_RESET 0x80
71
72/*
73 * Normal receive mode written to RX_STATUS. We must intr on short packets
74 * to avoid bogus rx lockups.
75 */
76
77#define RX_NORM 0xA8 /* 0x68 == all addrs, 0xA8 only to me. */
78#define RX_PROM 0x68 /* Senior Prom, uhmm promiscuous mode. */
79#define RX_MULT 0xE8 /* Accept multicast packets. */
80#define TX_NORM 0x0A /* Interrupt on everything that might hang the chip */
81
82/*
83 * TX_STATUS register.
84 */
85
86#define TX_COLLISION 0x02
87#define TX_16COLLISIONS 0x04
88#define TX_READY 0x08
89
90#define RX_RUNT 0x08
91#define RX_MISSED 0x01 /* Missed a packet due to 3c501 braindamage. */
92#define RX_GOOD 0x30 /* Good packet 0x20, or simple overflow 0x10. */
93