/*
* This file is provided under a CDDLv1 license. When using or
* redistributing this file, you may do so under this license.
* In redistributing this file this license must be included
* and no other modification of this header file is permitted.
*
* CDDL LICENSE SUMMARY
*
* Copyright(c) 1999 - 2009 Intel Corporation. All rights reserved.
*
* The contents of this file are subject to the terms of Version
* 1.0 of the Common Development and Distribution License (the "License").
*
* You should have received a copy of the License with this software.
* You can obtain a copy of the License at
* See the License for the specific language governing permissions
* and limitations under the License.
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms of the CDDLv1.
*
* Copyright 2016 Joyent, Inc.
*/
#ifndef _E1000_OSDEP_H
#define _E1000_OSDEP_H
#ifdef __cplusplus
extern "C" {
#endif
#include "e1000g_debug.h"
#ifdef E1000G_DEBUG
#define DEBUGOUT(S) \
#define DEBUGOUT1(S, A) \
#define DEBUGOUT2(S, A, B) \
#define DEBUGOUT3(S, A, B, C) \
#define DEBUGFUNC(F) \
#else
#define DEBUGOUT(S)
#define DEBUGOUT1(S, A)
#define DEBUGOUT2(S, A, B)
#define DEBUGOUT3(S, A, B, C)
#define DEBUGFUNC(F)
#endif
#define false 0
#define true 1
#define FALSE false
#define TRUE true
/* PHY Extended Status Register */
/*
* required by shared code
*/
/*
* Note, for all of the following register defines, it's important that these be
* in do {} while loops that only run a single time. Previously they were formed
* as normal blocks. Unfortunately this would fail in the following form which
* is used in the common code:
*
* if (cond)
* E1000_WRITE_REG
* else
* ...
*
* When the E1000_WRITE_REG macros was missing the do keyword, the compiler
* would end up associating the outer brace of the block with the if statement
* and thus the else clause would get left behind.
*/
do { \
value); \
else \
value); \
} while (0)
do {\
value); \
else \
} while (0)
((offset) << 2))) : \
((offset) << 2))))
typedef boolean_t bool;
struct e1000g_osdep {
};
/* Shared Code Mutex Defines */
#ifdef __sparc /* on SPARC, use only memory-mapped routines */
#else /* on x86, use port io routines */
reg); \
val); \
}
#endif /* __sparc */
#ifdef __cplusplus
}
#endif
#endif /* _E1000_OSDEP_H */