Print this page
XXXX Intel X540 support

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ixgbe/ixgbe_osdep.h
          +++ new/usr/src/uts/common/io/ixgbe/ixgbe_osdep.h
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
  24   24   */
  25   25  
  26   26  /*
  27   27   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  28   28   */
       29 +/*
       30 + * Copyright (c) 2012, Joyent, Inc. All rights reserved.
       31 + */
  29   32  
  30   33  #ifndef _IXGBE_OSDEP_H
  31   34  #define _IXGBE_OSDEP_H
  32   35  
  33   36  #ifdef __cplusplus
  34   37  extern "C" {
  35   38  #endif
  36   39  
  37   40  #include <sys/types.h>
  38   41  #include <sys/byteorder.h>
↓ open down ↓ 8 lines elided ↑ open up ↑
  47   50  #include <sys/modctl.h>
  48   51  #include <sys/errno.h>
  49   52  #include <sys/ddi.h>
  50   53  #include <sys/dditypes.h>
  51   54  #include <sys/sunddi.h>
  52   55  #include <sys/pci.h>
  53   56  #include <sys/atomic.h>
  54   57  #include <sys/note.h>
  55   58  #include "ixgbe_debug.h"
  56   59  
       60 +/* Cheesy hack for EWARN() */
       61 +#define EWARN(H, W, S) printf(W)
       62 +
  57   63  /* function declarations */
  58   64  struct ixgbe_hw;
  59   65  uint16_t ixgbe_read_pci_cfg(struct ixgbe_hw *, uint32_t);
  60   66  void ixgbe_write_pci_cfg(struct ixgbe_hw *, uint32_t, uint32_t);
  61   67  
  62   68  #define usec_delay(x)           drv_usecwait(x)
  63   69  #define msec_delay(x)           drv_usecwait(x * 1000)
  64   70  
  65   71  #define OS_DEP(hw)              ((struct ixgbe_osdep *)((hw)->back))
  66   72  
↓ open down ↓ 26 lines elided ↑ open up ↑
  93   99              (uint32_t *)((uintptr_t)(a)->hw_addr + reg))
  94  100  
  95  101  #define IXGBE_READ_REG_ARRAY(a, reg, index)     \
  96  102          IXGBE_READ_REG(a, ((reg) + ((index) << 2)))
  97  103  
  98  104  #define msec_delay_irq  msec_delay
  99  105  #define IXGBE_HTONL     htonl
 100  106  #define IXGBE_NTOHL     ntohl
 101  107  #define IXGBE_NTOHS     ntohs
 102  108  
 103      -#define UNREFERENCED_PARAMETER(x)       _NOTE(ARGUNUSED(x))
      109 +#ifdef _BIG_ENDIAN
      110 +#define IXGBE_CPU_TO_LE32       BSWAP_32 
      111 +#define IXGBE_LE32_TO_CPUS      BSWAP_32
      112 +#else
      113 +#define IXGBE_CPU_TO_LE32(x)    (x)
      114 +#define IXGBE_LE32_TO_CPUS(x)   (x) 
      115 +#endif  /* _BIG_ENDIAN */
 104  116  
      117 +#define UNREFERENCED_PARAMETER(x)               _NOTE(ARGUNUSED(x))
      118 +#define UNREFERENCED_1PARAMETER(_p)             UNREFERENCED_PARAMETER(_p)
      119 +#define UNREFERENCED_2PARAMETER(_p, _q)         _NOTE(ARGUNUSED(_p, _q))
      120 +#define UNREFERENCED_3PARAMETER(_p, _q, _r)     _NOTE(ARGUNUSED(_p, _q, _r))
      121 +#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) _NOTE(ARGUNUSED(_p, _q,_r, _s))
      122 +
      123 +
      124 +
 105  125  typedef int8_t          s8;
 106  126  typedef int16_t         s16;
 107  127  typedef int32_t         s32;
 108  128  typedef int64_t         s64;
 109  129  typedef uint8_t         u8;
 110  130  typedef uint16_t        u16;
 111  131  typedef uint32_t        u32;
 112  132  typedef uint64_t        u64;
 113  133  typedef boolean_t       bool;
 114  134  
↓ open down ↓ 11 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX