Deleted Added
full compact
if_edvar.h (199380) if_edvar.h (260050)
1/*-
2 * Copyright (c) 1995, David Greenman
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*-
2 * Copyright (c) 1995, David Greenman
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/dev/ed/if_edvar.h 199380 2009-11-17 14:23:09Z jhb $
27 * $FreeBSD: head/sys/dev/ed/if_edvar.h 260050 2013-12-29 19:21:59Z marius $
28 */
29
30#ifndef SYS_DEV_ED_IF_EDVAR_H
28 */
29
30#ifndef SYS_DEV_ED_IF_EDVAR_H
31#define SYS_DEV_ED_IF_EDVAR_H
31#define SYS_DEV_ED_IF_EDVAR_H
32
33#include <dev/mii/mii_bitbang.h>
34
32/*
33 * ed_softc: per line info and status
34 */
35struct ed_softc {
36 struct ifnet *ifp;
37 struct ifmedia ifmedia; /* Media info */
38 device_t dev;
39 struct mtx sc_mtx;

--- 17 unchanged lines hidden (view full) ---

57 bus_space_tag_t mem_bst;
58 bus_space_handle_t mem_bsh;
59 struct resource* irq_res; /* resource for irq */
60 void* irq_handle; /* handle for irq handler */
61 int (*sc_media_ioctl)(struct ed_softc *sc, struct ifreq *ifr,
62 u_long command);
63 void (*sc_mediachg)(struct ed_softc *);
64 device_t miibus; /* MII bus for cards with MII. */
35/*
36 * ed_softc: per line info and status
37 */
38struct ed_softc {
39 struct ifnet *ifp;
40 struct ifmedia ifmedia; /* Media info */
41 device_t dev;
42 struct mtx sc_mtx;

--- 17 unchanged lines hidden (view full) ---

60 bus_space_tag_t mem_bst;
61 bus_space_handle_t mem_bsh;
62 struct resource* irq_res; /* resource for irq */
63 void* irq_handle; /* handle for irq handler */
64 int (*sc_media_ioctl)(struct ed_softc *sc, struct ifreq *ifr,
65 u_long command);
66 void (*sc_mediachg)(struct ed_softc *);
67 device_t miibus; /* MII bus for cards with MII. */
65 void (*mii_writebits)(struct ed_softc *, u_int, int);
66 u_int (*mii_readbits)(struct ed_softc *, int);
68 mii_bitbang_ops_t mii_bitbang_ops;
67 struct callout tick_ch;
68 void (*sc_tick)(struct ed_softc *);
69 void (*readmem)(struct ed_softc *sc, bus_size_t src, uint8_t *dst,
70 uint16_t amount);
71 u_short (*sc_write_mbufs)(struct ed_softc *, struct mbuf *, bus_size_t);
72
73 int tx_timer;
74 int nic_offset; /* NIC (DS8390) I/O bus address offset */

--- 29 unchanged lines hidden (view full) ---

104 u_char rec_page_start; /* first page of RX ring-buffer */
105 u_char rec_page_stop; /* last page of RX ring-buffer */
106 u_char next_packet; /* pointer to next unread RX packet */
107 u_int tx_mem; /* Total amount of RAM for tx */
108 u_int rx_mem; /* Total amount of RAM for rx */
109 struct ifmib_iso_8802_3 mibdata; /* stuff for network mgmt */
110};
111
69 struct callout tick_ch;
70 void (*sc_tick)(struct ed_softc *);
71 void (*readmem)(struct ed_softc *sc, bus_size_t src, uint8_t *dst,
72 uint16_t amount);
73 u_short (*sc_write_mbufs)(struct ed_softc *, struct mbuf *, bus_size_t);
74
75 int tx_timer;
76 int nic_offset; /* NIC (DS8390) I/O bus address offset */

--- 29 unchanged lines hidden (view full) ---

106 u_char rec_page_start; /* first page of RX ring-buffer */
107 u_char rec_page_stop; /* last page of RX ring-buffer */
108 u_char next_packet; /* pointer to next unread RX packet */
109 u_int tx_mem; /* Total amount of RAM for tx */
110 u_int rx_mem; /* Total amount of RAM for rx */
111 struct ifmib_iso_8802_3 mibdata; /* stuff for network mgmt */
112};
113
114#define ed_nic_barrier(sc, port, length, flags) \
115 bus_space_barrier(sc->port_bst, sc->port_bsh, \
116 (sc)->nic_offset + (port), (length), (flags))
117
112#define ed_nic_inb(sc, port) \
113 bus_space_read_1(sc->port_bst, sc->port_bsh, (sc)->nic_offset + (port))
114
115#define ed_nic_outb(sc, port, value) \
116 bus_space_write_1(sc->port_bst, sc->port_bsh, \
117 (sc)->nic_offset + (port), (value))
118
119#define ed_nic_inw(sc, port) \

--- 22 unchanged lines hidden (view full) ---

142#define ed_nic_insl(sc, port, addr, count) \
143 bus_space_read_multi_4(sc->port_bst, sc->port_bsh, \
144 (sc)->nic_offset + (port), (uint32_t *)(addr), (count))
145
146#define ed_nic_outsl(sc, port, addr, count) \
147 bus_space_write_multi_4(sc->port_bst, sc->port_bsh, \
148 (sc)->nic_offset + (port), (uint32_t *)(addr), (count))
149
118#define ed_nic_inb(sc, port) \
119 bus_space_read_1(sc->port_bst, sc->port_bsh, (sc)->nic_offset + (port))
120
121#define ed_nic_outb(sc, port, value) \
122 bus_space_write_1(sc->port_bst, sc->port_bsh, \
123 (sc)->nic_offset + (port), (value))
124
125#define ed_nic_inw(sc, port) \

--- 22 unchanged lines hidden (view full) ---

148#define ed_nic_insl(sc, port, addr, count) \
149 bus_space_read_multi_4(sc->port_bst, sc->port_bsh, \
150 (sc)->nic_offset + (port), (uint32_t *)(addr), (count))
151
152#define ed_nic_outsl(sc, port, addr, count) \
153 bus_space_write_multi_4(sc->port_bst, sc->port_bsh, \
154 (sc)->nic_offset + (port), (uint32_t *)(addr), (count))
155
156#define ed_asic_barrier(sc, port, length, flags) \
157 bus_space_barrier(sc->port_bst, sc->port_bsh, \
158 (sc)->asic_offset + (port), (length), (flags))
159
150#define ed_asic_inb(sc, port) \
151 bus_space_read_1(sc->port_bst, sc->port_bsh, \
152 (sc)->asic_offset + (port))
153
154#define ed_asic_outb(sc, port, value) \
155 bus_space_write_1(sc->port_bst, sc->port_bsh, \
156 (sc)->asic_offset + (port), (value))
157

--- 135 unchanged lines hidden ---
160#define ed_asic_inb(sc, port) \
161 bus_space_read_1(sc->port_bst, sc->port_bsh, \
162 (sc)->asic_offset + (port))
163
164#define ed_asic_outb(sc, port, value) \
165 bus_space_write_1(sc->port_bst, sc->port_bsh, \
166 (sc)->asic_offset + (port), (value))
167

--- 135 unchanged lines hidden ---