ixgbe/base: disable laser control if manageability enabled
[dpdk.git] / lib / librte_pmd_ixgbe / ixgbe / ixgbe_osdep.h
index fe7ac49..d602cbc 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2010, Intel Corporation 
+  Copyright (c) 2001-2012, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
 #include <rte_byteorder.h>
 
 #include "../ixgbe_logs.h"
-
-/* Remove some compiler warnings for the files in this dir */
-#ifdef __INTEL_COMPILER
-#pragma warning(disable:2259) /* Conversion may lose significant bits */
-#pragma warning(disable:869)  /* Parameter was never referenced */
-#pragma warning(disable:181)  /* Arg incompatible with format string */
-#pragma warning(disable:1419) /* External declaration in primary source file */
-#pragma warning(disable:111)  /* Statement is unreachable */
-#pragma warning(disable:981)  /* Operands are evaluated in unspecified order */
-#else
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-#pragma GCC diagnostic ignored "-Wformat"
-#pragma GCC diagnostic ignored "-Wuninitialized"
-#pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#if (((__GNUC__) >= 4) && ((__GNUC_MINOR__) >= 7))
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#endif
-#endif
+#include "../ixgbe_bypass_defines.h"
 
 #define ASSERT(x) if(!(x)) rte_panic("IXGBE: x")
 
 #define DEBUGOUT6(S, args...)   DEBUGOUT(S, ##args)
 #define DEBUGOUT7(S, args...)   DEBUGOUT(S, ##args)
 
+#define ERROR_REPORT1(e, S, args...)   DEBUGOUT(S, ##args)
+#define ERROR_REPORT2  DEBUGOUT2
+#define ERROR_REPORT3  DEBUGOUT3
+
 #define FALSE               0
 #define TRUE                1
 
+#define false               0
+#define true                1
+#define min(a,b)       RTE_MIN(a,b) 
+
+#define EWARN(hw, S, args...)     DEBUGOUT1(S, ##args)
+
 /* Bunch of defines for shared code bogosity */
-#define UNREFERENCED_PARAMETER(_p)
-#define UNREFERENCED_1PARAMETER(_p)
+#define UNREFERENCED_PARAMETER(_p)  
+#define UNREFERENCED_1PARAMETER(_p) 
 #define UNREFERENCED_2PARAMETER(_p, _q)
-#define UNREFERENCED_3PARAMETER(_p, _q, _r)
-#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s)
-
+#define UNREFERENCED_3PARAMETER(_p, _q, _r) 
+#define UNREFERENCED_4PARAMETER(_p, _q, _r, _s) 
 
+#define STATIC static
 #define IXGBE_NTOHL(_i)        rte_be_to_cpu_32(_i)
 #define IXGBE_NTOHS(_i)        rte_be_to_cpu_16(_i)
+#define IXGBE_CPU_TO_LE32(_i)  rte_cpu_to_le_32(_i)
+#define IXGBE_LE32_TO_CPUS(_i) rte_le_to_cpu_32(_i)
 
 typedef uint8_t                u8;
 typedef int8_t         s8;
 typedef uint16_t       u16;
+typedef int16_t        s16; 
 typedef uint32_t       u32;
 typedef int32_t                s32;
 typedef uint64_t       u64;
@@ -125,7 +121,7 @@ static inline uint32_t ixgbe_read_addr(volatile void* addr)
        IXGBE_PCI_REG_ADDR((hw), (reg) + ((index) << 2))
 
 /* Not implemented !! */
-#define IXGBE_READ_PCIE_WORD(hw, reg) 0
+#define IXGBE_READ_PCIE_WORD(hw, reg) 0        
 #define IXGBE_WRITE_PCIE_WORD(hw, reg, value) do { } while(0)
 
 #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS)