1 /*******************************************************************************
2 *Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
4 *Redistribution and use in source and binary forms, with or without modification, are permitted provided
5 *that the following conditions are met:
6 *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
8 *2. Redistributions in binary form must reproduce the above copyright notice,
9 *this list of conditions and the following disclaimer in the documentation and/or other materials provided
10 *with the distribution.
12 *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18 *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19 *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
23 *******************************************************************************/
24 /***************************************************************************
26 Version Control Information:
28 $RCSfile: osdebug.h,v $
32 ***************************************************************************/
37 #ifdef AGTIAPI_KDB_ENABLE
38 #include <linux/kdb.h>
41 /***************************************************************************
42 OS_ASSERT : This macro is used when an internal error is detected.
43 ***************************************************************************/
44 #ifdef AGTIAPI_KDB_ENABLE
45 #define OS_ASSERT(expr, message) \
49 printf("ASSERT: %s", message); \
50 printf(" - file %s, line %d\n", __FILE__, __LINE__); \
56 #define OS_ASSERT(expr, message) \
60 printf("ASSERT: %s", message); \
61 printf(" - file %s, line %d\n", __FILE__, __LINE__); \
66 #define AG_ERROR_MSG(mask, val, format) \
77 #ifdef TD_DEBUG_ENABLE
78 #define TIDEBUG_MSG(mask, val, format) \
85 if (!(mask & 0x80000000)) \
98 #define TIDEBUG_MSG0(format) \
103 #define TIDEBUG_MSG(mask, val, format)
104 #define TIDEBUG_MSG0(format)
107 /***************************************************************************
108 FC debug - The following is used for FC specific debug.
109 **************************************************************************/
110 #ifdef AG_PROTOCOL_FC
111 #ifndef fcEnableTraceFunctions
112 #define fcEnableTraceFunctions 1
115 #ifndef fcEnableTraceFunctions
116 #define fcEnableTraceFunctions 0
119 #endif /* AG_PROTOCOL_FC */
121 #endif /* #ifndef __OSDEBUG_H__ */