Ignore machine-check MSRs
[freebsd-src/fkvm-freebsd.git] / sys / dev / ie / if_ievar.h
blob35fb836c5c41dc0687e2812fd99eeb4fad199952
1 /*-
2 * $FreeBSD$
3 */
5 enum ie_hardware {
6 IE_NONE,
7 IE_STARLAN10,
8 IE_EN100,
9 IE_SLFIBER,
10 IE_3C507,
11 IE_NI5210,
12 IE_EE16,
13 IE_UNKNOWN
17 * Ethernet status, per interface.
19 struct ie_softc {
20 struct ifnet *ifp;
21 void (*ie_reset_586) (struct ie_softc *);
22 void (*ie_chan_attn) (struct ie_softc *);
23 enum ie_hardware hard_type;
24 int hard_vers;
25 u_char enaddr[6];
27 device_t dev;
29 struct resource * io_res;
30 int io_rid;
31 bus_space_tag_t io_bt;
32 bus_space_handle_t io_bh;
34 struct resource * irq_res;
35 int irq_rid;
36 void * irq_ih;
38 struct resource * mem_res;
39 int mem_rid;
40 bus_space_tag_t mem_bt;
41 bus_space_handle_t mem_bh;
43 u_int port; /* i/o base address for this interface */
44 caddr_t iomem; /* memory size */
45 caddr_t iomembot; /* memory base address */
46 unsigned iosize;
47 int bus_use; /* 0 means 16bit, 1 means 8 bit adapter */
49 int want_mcsetup;
50 int promisc;
51 int nframes;
52 int nrxbufs;
53 int ntxbufs;
54 volatile struct ie_int_sys_conf_ptr *iscp;
55 volatile struct ie_sys_ctl_block *scb;
56 volatile struct ie_recv_frame_desc **rframes; /* nframes worth */
57 volatile struct ie_recv_buf_desc **rbuffs; /* nrxbufs worth */
58 volatile u_char **cbuffs; /* nrxbufs worth */
59 int rfhead, rftail, rbhead, rbtail;
61 volatile struct ie_xmit_cmd **xmit_cmds; /* ntxbufs worth */
62 volatile struct ie_xmit_buf **xmit_buffs; /* ntxbufs worth */
63 volatile u_char **xmit_cbuffs; /* ntxbufs worth */
64 int xmit_count;
66 struct ie_en_addr mcast_addrs[MAXMCAST + 1];
67 int mcast_count;
69 u_short irq_encoded; /* encoded interrupt on IEE16 */
71 struct mtx lock;
73 #define PORT(sc) sc->port
74 #define MEM(sc) sc->iomem
76 #define IE_LOCK(sc) mtx_lock(&(sc)->lock)
77 #define IE_UNLOCK(sc) mtx_unlock(&(sc)->lock)
78 #define IE_ASSERT_LOCKED(sc) mtx_assert(&(sc)->lock, MA_OWNED)
80 void ie_intr (void *);
81 int ie_alloc_resources (device_t);
82 void ie_release_resources (device_t);
83 int ie_attach (device_t);
84 int ie_detach (device_t);
86 void el_reset_586 (struct ie_softc *);
87 void el_chan_attn (struct ie_softc *);
89 void sl_reset_586 (struct ie_softc *);
90 void sl_chan_attn (struct ie_softc *);
92 void ee16_reset_586 (struct ie_softc *);
93 void ee16_chan_attn (struct ie_softc *);
94 void ee16_shutdown (struct ie_softc *);
96 void sl_read_ether (struct ie_softc *, unsigned char *);
97 int check_ie_present (struct ie_softc *);