if_epvar.h (117700) | if_epvar.h (121206) |
---|---|
1/* 2 * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: 1. Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 2. The name 8 * of the author may not be used to endorse or promote products derived from --- 5 unchanged lines hidden (view full) --- 14 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 16 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 17 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 18 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 19 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 20 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21 * | 1/* 2 * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: 1. Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 2. The name 8 * of the author may not be used to endorse or promote products derived from --- 5 unchanged lines hidden (view full) --- 14 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 16 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 17 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 18 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 19 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 20 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21 * |
22 * $FreeBSD: head/sys/dev/ep/if_epvar.h 117700 2003-07-17 19:37:56Z markm $ | 22 * $FreeBSD: head/sys/dev/ep/if_epvar.h 121206 2003-10-18 15:22:43Z imp $ |
23 */ 24 25struct ep_board { 26 u_short prod_id; /* product ID */ 27 int cmd_off; /* command offset (bit shift) */ 28 int mii_trans; /* activate MII transiever */ 29 u_short res_cfg; /* resource configuration */ 30}; --- 5 unchanged lines hidden (view full) --- 36 struct arpcom arpcom; /* Ethernet common part */ 37 struct ifmedia ifmedia; /* media info */ 38 39 device_t dev; 40 41 struct resource *iobase; 42 struct resource *irq; 43 | 23 */ 24 25struct ep_board { 26 u_short prod_id; /* product ID */ 27 int cmd_off; /* command offset (bit shift) */ 28 int mii_trans; /* activate MII transiever */ 29 u_short res_cfg; /* resource configuration */ 30}; --- 5 unchanged lines hidden (view full) --- 36 struct arpcom arpcom; /* Ethernet common part */ 37 struct ifmedia ifmedia; /* media info */ 38 39 device_t dev; 40 41 struct resource *iobase; 42 struct resource *irq; 43 |
44 bus_space_handle_t ep_bhandle; 45 bus_space_tag_t ep_btag; | 44 bus_space_handle_t bst; 45 bus_space_tag_t bsh; |
46 void *ep_intrhand; 47 | 46 void *ep_intrhand; 47 |
48 int ep_io_addr; /* i/o bus address */ 49 | |
50 u_short ep_connectors; /* Connectors on this card. */ 51 u_char ep_connector; /* Configured connector. */ 52 53 struct mbuf *top; 54 struct mbuf *mcur; 55 short cur_len; 56 57 int stat; /* some flags */ --- 19 unchanged lines hidden (view full) --- 77int ep_alloc(device_t); 78void ep_free(device_t); 79int ep_detach(device_t); 80void ep_get_media(struct ep_softc *); 81int ep_attach(struct ep_softc *); 82void ep_intr(void *); 83int get_e(struct ep_softc *, u_int16_t, u_int16_t *); 84int ep_get_macaddr(struct ep_softc *, u_char *); | 48 u_short ep_connectors; /* Connectors on this card. */ 49 u_char ep_connector; /* Configured connector. */ 50 51 struct mbuf *top; 52 struct mbuf *mcur; 53 short cur_len; 54 55 int stat; /* some flags */ --- 19 unchanged lines hidden (view full) --- 75int ep_alloc(device_t); 76void ep_free(device_t); 77int ep_detach(device_t); 78void ep_get_media(struct ep_softc *); 79int ep_attach(struct ep_softc *); 80void ep_intr(void *); 81int get_e(struct ep_softc *, u_int16_t, u_int16_t *); 82int ep_get_macaddr(struct ep_softc *, u_char *); |
83 84#define EP_READ_1(sc, off) (bus_space_read_1((sc)->bsh, (sc)->bst, off)) 85#define EP_READ_2(sc, off) (bus_space_read_2((sc)->bsh, (sc)->bst, off)) 86#define EP_WRITE_1(sc, off, val) \ 87 bus_space_write_1(sc->bsh, sc->bst, off, val) 88#define EP_WRITE_2(sc, off, val) \ 89 bus_space_write_2(sc->bsh, sc->bst, off, val) 90#define EP_WRITE_MULTI_1(sc, off, addr, count) \ 91 bus_space_write_multi_1(sc->bsh, sc->bst, off, addr, count) 92#define EP_WRITE_MULTI_2(sc, off, addr, count) \ 93 bus_space_write_multi_2(sc->bsh, sc->bst, off, addr, count) 94#define EP_WRITE_MULTI_4(sc, off, addr, count) \ 95 bus_space_write_multi_4(sc->bsh, sc->bst, off, addr, count) 96#define EP_READ_MULTI_1(sc, off, addr, count) \ 97 bus_space_read_multi_1(sc->bsh, sc->bst, off, addr, count) 98#define EP_READ_MULTI_2(sc, off, addr, count) \ 99 bus_space_read_multi_2(sc->bsh, sc->bst, off, addr, count) 100#define EP_READ_MULTI_4(sc, off, addr, count) \ 101 bus_space_read_multi_4(sc->bsh, sc->bst, off, addr, count) |
|