1 |
|
/****************************************************************************** |
2 |
|
|
3 |
< |
Copyright (c) 2001-2014, Intel Corporation |
3 |
> |
Copyright (c) 2001-2015, Intel Corporation |
4 |
|
All rights reserved. |
5 |
|
|
6 |
|
Redistribution and use in source and binary forms, with or without |
30 |
|
POSSIBILITY OF SUCH DAMAGE. |
31 |
|
|
32 |
|
******************************************************************************/ |
33 |
< |
/*$FreeBSD: stable/9/sys/dev/e1000/e1000_osdep.h 269647 2014-08-06 22:15:01Z jfv $*/ |
33 |
> |
/*$FreeBSD: stable/10/sys/dev/e1000/e1000_osdep.h 296055 2016-02-25 19:15:06Z erj $*/ |
34 |
|
|
35 |
|
|
36 |
|
#ifndef _FREEBSD_OS_H_ |
60 |
|
#define ASSERT(x) if(!(x)) panic("EM: x") |
61 |
|
|
62 |
|
#define usec_delay(x) DELAY(x) |
63 |
< |
#define usec_delay_irq(x) DELAY(x) |
63 |
> |
#define usec_delay_irq(x) usec_delay(x) |
64 |
|
#define msec_delay(x) DELAY(1000*(x)) |
65 |
|
#define msec_delay_irq(x) DELAY(1000*(x)) |
66 |
|
|
67 |
< |
#define DEBUGFUNC(F) DEBUGOUT(F); |
68 |
< |
#define DEBUGOUT(S) do {} while (0) |
69 |
< |
#define DEBUGOUT1(S,A) do {} while (0) |
70 |
< |
#define DEBUGOUT2(S,A,B) do {} while (0) |
71 |
< |
#define DEBUGOUT3(S,A,B,C) do {} while (0) |
72 |
< |
#define DEBUGOUT7(S,A,B,C,D,E,F,G) do {} while (0) |
67 |
> |
/* Enable/disable debugging statements in shared code */ |
68 |
> |
#define DBG 0 |
69 |
|
|
70 |
+ |
#define DEBUGOUT(...) \ |
71 |
+ |
do { if (DBG) printf(__VA_ARGS__); } while (0) |
72 |
+ |
#define DEBUGOUT1(...) DEBUGOUT(__VA_ARGS__) |
73 |
+ |
#define DEBUGOUT2(...) DEBUGOUT(__VA_ARGS__) |
74 |
+ |
#define DEBUGOUT3(...) DEBUGOUT(__VA_ARGS__) |
75 |
+ |
#define DEBUGOUT7(...) DEBUGOUT(__VA_ARGS__) |
76 |
+ |
#define DEBUGFUNC(F) DEBUGOUT(F "\n") |
77 |
+ |
|
78 |
|
#define STATIC static |
79 |
|
#define FALSE 0 |
80 |
|
#define TRUE 1 |
77 |
– |
#ifndef __bool_true_false_are_defined |
78 |
– |
#define false FALSE |
79 |
– |
#define true TRUE |
80 |
– |
#endif |
81 |
|
#define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ |
82 |
|
#define PCI_COMMAND_REGISTER PCIR_COMMAND |
83 |
|
|
99 |
|
typedef int32_t s32; |
100 |
|
typedef int16_t s16; |
101 |
|
typedef int8_t s8; |
102 |
– |
#ifndef __bool_true_false_are_defined |
103 |
– |
typedef boolean_t bool; |
104 |
– |
#endif |
102 |
|
|
103 |
|
#define __le16 u16 |
104 |
|
#define __le32 u32 |