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/pci/if_lmc_types.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 /*      $NetBSD: if_lmc_types.h,v 1.5 2002/05/09 00:58:45 matt Exp $    */
    2 
    3 /*-
    4  * Copyright (c) 1997-1999 LAN Media Corporation (LMC)
    5  * All rights reserved.  www.lanmedia.com
    6  *
    7  * This code is written by Michael Graff <graff@vix.com> for LMC.
    8  * The code is derived from permitted modifications to software created
    9  * by Matt Thomas (matt@3am-software.com).
   10  *
   11  * Redistribution and use in source and binary forms, with or without
   12  * modification, are permitted provided that the following conditions
   13  * are met:
   14  * 1. Redistributions of source code must retain the above copyright
   15  *    notice, this list of conditions and the following disclaimer.
   16  * 2. Redistributions in binary form must reproduce the above
   17  *    copyright notice, this list of conditions and the following disclaimer
   18  *    in the documentation and/or other materials provided with the
   19  *    distribution.
   20  * 3. All marketing or advertising materials mentioning features or
   21  *    use of this software must display the following acknowledgement:
   22  *      This product includes software developed by LAN Media Corporation
   23  *      and its contributors.
   24  * 4. Neither the name of LAN Media Corporation nor the names of its
   25  *    contributors may be used to endorse or promote products derived
   26  *    from this software without specific prior written permission.
   27  *
   28  * THIS SOFTWARE IS PROVIDED BY LAN MEDIA CORPORATION AND CONTRIBUTORS
   29  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   31  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   32  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   33  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   34  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   35  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   36  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   37  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
   38  * THE POSSIBILITY OF SUCH DAMAGE.
   39  */
   40 
   41 #ifndef LMC_TYPES_H
   42 #define LMC_TYPES_H
   43 
   44 /*
   45  * NetBSD uses _KERNEL, FreeBSD uses KERNEL.
   46  */
   47 #if defined(_KERNEL) && defined(__NetBSD__)
   48 #define LMC_IS_KERNEL
   49 #endif
   50 #if defined(KERNEL) && defined(__FreeBSD__)
   51 #define LMC_IS_KERNEL
   52 #endif
   53 #if defined(__KERNEL__) && defined(linux)
   54 #define LMC_IS_KERNEL
   55 #endif
   56 
   57 #if defined(LMC_IS_KERNEL)
   58 
   59 /*
   60  * LMC has weird endianness issues, so we can't use the tulip_desc_t.
   61  */
   62 typedef struct {
   63     u_int32_t d_status;
   64     u_int32_t d_ctl;
   65     u_int32_t d_addr1;
   66     u_int32_t d_addr2;
   67 } lmc_desc_t;
   68 
   69 #define LMC_CTL_FLGS(x)         (((x)>>22)&0x3ff)
   70 #define LMC_CTL_LEN2(x)         (((x)>>11)&0x7ff)
   71 #define LMC_CTL_LEN1(x)         ((x)&0x7ff)
   72 #define LMC_CTL(f,l1,l2)        ((((f)&0x3ff)<<22)|(((l2)&0x7ff)<<11)|((l1)&0x7ff))
   73 
   74 #if defined(__NetBSD__)
   75 typedef bus_addr_t lmc_csrptr_t;
   76 #else
   77 typedef volatile u_int32_t *lmc_csrptr_t;
   78 #endif
   79 
   80 #if defined(__NetBSD__)
   81 #define lmc_intrfunc_t  int
   82 #endif /* __NetBSD__ */
   83 
   84 #if defined(__FreeBSD__)
   85 #define lmc_intrfunc_t  void
   86 #endif /* __FreeBSD__ */
   87 
   88 #if defined(__bsdi__)
   89 #define lmc_intrfunc_t  int
   90 #endif /* __bsdi__ */
   91 
   92 typedef struct lmc___softc lmc_softc_t;
   93 typedef struct lmc___media lmc_media_t;
   94 typedef struct lmc_ringinfo lmc_ringinfo_t;
   95 
   96 #endif /* LMC_IS_KERNEL */
   97 
   98 typedef struct lmc___ctl lmc_ctl_t;
   99 
  100 #endif /* LMC_TYPES_H */

Cache object: 6d9d595a2c5a0538be9354db41114891


[ 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.