The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/vx/if_vxvar.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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
    9  * this software without specific prior written permission
   10  *
   11  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
   12  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   13  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
   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$
   23  *
   24  October 2, 1994
   25 
   26  Modified by: Andres Vega Garcia
   27 
   28  INRIA - Sophia Antipolis, France
   29  e-mail: avega@sophia.inria.fr
   30  finger: avega@pax.inria.fr
   31 
   32  */
   33 
   34 /*
   35  * Ethernet software status per interface.
   36  */
   37 struct vx_softc {
   38     struct arpcom arpcom;       /* Ethernet common part         */
   39     int unit;                   /* unit number */
   40     bus_space_tag_t             bst;
   41     bus_space_handle_t          bsh;
   42     void                        *vx_intrhand;
   43     struct resource             *vx_irq;
   44     struct resource             *vx_res;
   45 #define MAX_MBS  8              /* # of mbufs we keep around    */
   46     struct mbuf *mb[MAX_MBS];   /* spare mbuf storage.          */
   47     int next_mb;                /* Which mbuf to use next.      */
   48     int last_mb;                /* Last mbuf.                   */
   49     char vx_connectors;         /* Connectors on this card.     */
   50     char vx_connector;          /* Connector to use.            */
   51     short tx_start_thresh;      /* Current TX_start_thresh.     */
   52     int tx_succ_ok;             /* # packets sent in sequence   */
   53                                 /* w/o underrun                 */
   54     struct callout_handle ch;   /* Callout handle for timeouts  */
   55     int buffill_pending;
   56 };
   57 
   58 #define CSR_WRITE_4(sc, reg, val)       \
   59         bus_space_write_4(sc->bst, sc->bsh, reg, val)
   60 #define CSR_WRITE_2(sc, reg, val)       \
   61         bus_space_write_2(sc->bst, sc->bsh, reg, val)
   62 #define CSR_WRITE_1(sc, reg, val)       \
   63         bus_space_write_1(sc->bst, sc->bsh, reg, val)
   64 
   65 #define CSR_READ_4(sc, reg)             \
   66         bus_space_read_4(sc->bst, sc->bsh, reg)
   67 #define CSR_READ_2(sc, reg)             \
   68         bus_space_read_2(sc->bst, sc->bsh, reg)
   69 #define CSR_READ_1(sc, reg)             \
   70         bus_space_read_1(sc->bst, sc->bsh, reg)
   71 
   72 extern void vxfree(struct vx_softc *);
   73 extern int vxattach(device_t);
   74 extern void vxstop(struct vx_softc *);
   75 extern void vxintr(void *);
   76 extern int vxbusyeeprom(struct vx_softc *);

Cache object: d26b79d713314b7dc3080ebb668ccd8c


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.