e1000g_debug.h revision 25f2d433de915875c8393f0b0dc14aa155997ad0
/*
* 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 - 2007 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms of the CDDLv1.
*/
#ifndef _E1000G_DEBUG_H
#define _E1000G_DEBUG_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Debug message control
* Debug Levels:
* 0x000 - (0) no messages
* 0x001 - (1) Errors
* 0x002 - (2) Warnings
* 0x004 - (4) Information
* 0x008 - (8) Subroutine calls and control flow
* 0x010 - (16) I/O Data (verbose!)
* "set e1000g:e1000g_debug=<value>"
* "set e1000g:e1000g_log_mode=<value>"
* it you must reboot for the change to take effect.
*
* It turns on diagnostics if DEBUG is defined (DEBUG also
* enables other debugging code as ASSERT statements...
*/
#ifdef DEBUG
#define E1000G_DEBUG
#endif
/*
* By default it will print only to log
*/
#define E1000G_LOG_DISPLAY 0x1
#define E1000G_LOG_PRINT 0x2
#define E1000G_LOG_ALL 0x3
#ifdef E1000G_DEBUG
#else
#define E1000G_DEBUG_STAT(val)
#endif /* E1000G_DEBUG */
#define NAMELEN 31
#define BUFSZ 256
#ifdef E1000G_DEBUG
extern int e1000g_debug;
#endif
extern int e1000g_log_mode;
#ifdef __cplusplus
}
#endif
#endif /* _E1000G_DEBUG_H */