Fix ixgbe compliation with DBG 1
Fixed ERROR_REPORTXX macros so that ixgbe compiles with #define DBG 1 MFC after: 1 week Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D5061
This commit is contained in:
parent
3593a18a91
commit
94241c6011
@ -57,6 +57,15 @@
|
||||
#define ASSERT(x) if(!(x)) panic("IXGBE: x")
|
||||
#define EWARN(H, W, S) printf(W)
|
||||
|
||||
enum {
|
||||
IXGBE_ERROR_SOFTWARE,
|
||||
IXGBE_ERROR_POLLING,
|
||||
IXGBE_ERROR_INVALID_STATE,
|
||||
IXGBE_ERROR_UNSUPPORTED,
|
||||
IXGBE_ERROR_ARGUMENT,
|
||||
IXGBE_ERROR_CAUTION,
|
||||
};
|
||||
|
||||
/* The happy-fun DELAY macro is defined in /usr/src/sys/i386/include/clock.h */
|
||||
#define usec_delay(x) DELAY(x)
|
||||
#define msec_delay(x) DELAY(1000*(x))
|
||||
@ -73,9 +82,23 @@
|
||||
#define DEBUGOUT5(S,A,B,C,D,E) printf(S "\n",A,B,C,D,E)
|
||||
#define DEBUGOUT6(S,A,B,C,D,E,F) printf(S "\n",A,B,C,D,E,F)
|
||||
#define DEBUGOUT7(S,A,B,C,D,E,F,G) printf(S "\n",A,B,C,D,E,F,G)
|
||||
#define ERROR_REPORT1(S,A) printf(S "\n",A)
|
||||
#define ERROR_REPORT2(S,A,B) printf(S "\n",A,B)
|
||||
#define ERROR_REPORT3(S,A,B,C) printf(S "\n",A,B,C)
|
||||
#define ERROR_REPORT1 ERROR_REPORT
|
||||
#define ERROR_REPORT2 ERROR_REPORT
|
||||
#define ERROR_REPORT3 ERROR_REPORT
|
||||
#define ERROR_REPORT(level, format, arg...) do { \
|
||||
switch (level) { \
|
||||
case IXGBE_ERROR_SOFTWARE: \
|
||||
case IXGBE_ERROR_CAUTION: \
|
||||
case IXGBE_ERROR_POLLING: \
|
||||
case IXGBE_ERROR_INVALID_STATE: \
|
||||
case IXGBE_ERROR_UNSUPPORTED: \
|
||||
case IXGBE_ERROR_ARGUMENT: \
|
||||
device_printf(ixgbe_dev_from_hw(hw), format, ## arg); \
|
||||
break; \
|
||||
default: \
|
||||
break; \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define DEBUGOUT(S)
|
||||
#define DEBUGOUT1(S,A)
|
||||
|
Loading…
Reference in New Issue
Block a user