Print this page
XXXX Intel X540 support
        
@@ -24,10 +24,13 @@
  */
 
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  */
+/*
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ */
 
 #ifndef _IXGBE_OSDEP_H
 #define _IXGBE_OSDEP_H
 
 #ifdef __cplusplus
@@ -52,10 +55,13 @@
 #include <sys/pci.h>
 #include <sys/atomic.h>
 #include <sys/note.h>
 #include "ixgbe_debug.h"
 
+/* Cheesy hack for EWARN() */
+#define EWARN(H, W, S) printf(W)
+
 /* function declarations */
 struct ixgbe_hw;
 uint16_t ixgbe_read_pci_cfg(struct ixgbe_hw *, uint32_t);
 void ixgbe_write_pci_cfg(struct ixgbe_hw *, uint32_t, uint32_t);
 
@@ -98,12 +104,26 @@
 #define msec_delay_irq  msec_delay
 #define IXGBE_HTONL     htonl
 #define IXGBE_NTOHL     ntohl
 #define IXGBE_NTOHS     ntohs
 
+#ifdef _BIG_ENDIAN
+#define IXGBE_CPU_TO_LE32       BSWAP_32 
+#define IXGBE_LE32_TO_CPUS      BSWAP_32
+#else
+#define IXGBE_CPU_TO_LE32(x)    (x)
+#define IXGBE_LE32_TO_CPUS(x)   (x) 
+#endif  /* _BIG_ENDIAN */
+
 #define UNREFERENCED_PARAMETER(x)       _NOTE(ARGUNUSED(x))
+#define UNREFERENCED_1PARAMETER(_p)             UNREFERENCED_PARAMETER(_p)
+#define UNREFERENCED_2PARAMETER(_p, _q)         _NOTE(ARGUNUSED(_p, _q))
+#define UNREFERENCED_3PARAMETER(_p, _q, _r)     _NOTE(ARGUNUSED(_p, _q, _r))
+#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) _NOTE(ARGUNUSED(_p, _q,_r, _s))
 
+
+
 typedef int8_t          s8;
 typedef int16_t         s16;
 typedef int32_t         s32;
 typedef int64_t         s64;
 typedef uint8_t         u8;