if_levar.h revision 1.2 1 /* $NetBSD: if_levar.h,v 1.2 1995/07/27 04:39:08 mycroft Exp $ */
2
3 /*
4 * LANCE Ethernet driver header file
5 *
6 * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
7 *
8 * Copyright (C) 1993, Paul Richards. This software may be used, modified,
9 * copied, distributed, and sold, in both source and binary form provided
10 * that the above copyright and these terms are retained. Under no
11 * circumstances is the author responsible for the proper functioning
12 * of this software, nor does the author assume any responsibility
13 * for damages incurred with its use.
14 */
15
16 /* Board types */
17 #define BICC 1
18 #define BICC_RDP 0xc
19 #define BICC_RAP 0xe
20
21 #define NE2100 2
22 #define PCnet_ISA 4
23 #define PCnet_PCI 5
24 #define NE2100_RDP 0x10
25 #define NE2100_RAP 0x12
26
27 #define DEPCA 3
28 #define DEPCA_CSR 0x0
29 #define DEPCA_CSR_SHE 0x80 /* Shared memory enabled */
30 #define DEPCA_CSR_SWAP32 0x40 /* Byte swapped */
31 #define DEPCA_CSR_DUM 0x08 /* rev E compatibility */
32 #define DEPCA_CSR_IM 0x04 /* Interrupt masked */
33 #define DEPCA_CSR_IEN 0x02 /* Interrupt enabled */
34 #define DEPCA_CSR_NORMAL \
35 (DEPCA_CSR_SHE | DEPCA_CSR_DUM | DEPCA_CSR_IEN)
36 #define DEPCA_RDP 0x4
37 #define DEPCA_RAP 0x6
38 #define DEPCA_ADP 0xc
39
40 /*
41 * Ethernet software status per interface.
42 *
43 * Each interface is referenced by a network interface structure,
44 * arpcom.ac_if, which the routing code uses to locate the interface.
45 * This structure contains the output queue for the interface, its address, ...
46 */
47 struct le_softc {
48 struct device sc_dev; /* base structure */
49 struct arpcom sc_arpcom; /* Ethernet common part */
50
51 void (*sc_copytodesc)(); /* Copy to descriptor */
52 void (*sc_copyfromdesc)(); /* Copy from descriptor */
53
54 void (*sc_copytobuf)(); /* Copy to buffer */
55 void (*sc_copyfrombuf)(); /* Copy from buffer */
56 void (*sc_zerobuf)(); /* and Zero bytes in buffer */
57
58 u_int16_t sc_conf3; /* CSR3 value */
59
60 void *sc_mem; /* base address of RAM -- CPU's view */
61 u_long sc_addr; /* base address of RAM -- LANCE's view */
62 u_long sc_memsize; /* size of RAM */
63
64 int sc_nrbuf; /* number of receive buffers */
65 int sc_ntbuf; /* number of transmit buffers */
66 int sc_last_rd;
67 int sc_first_td, sc_last_td, sc_no_td;
68
69 int sc_initaddr;
70 int sc_rmdaddr;
71 int sc_tmdaddr;
72 int sc_rbufaddr;
73 int sc_tbufaddr;
74
75 #ifdef LEDEBUG
76 int sc_debug;
77 #endif
78
79 void *sc_ih;
80 int sc_card;
81 int sc_rap, sc_rdp; /* LANCE registers */
82 };
83