ql_debug.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright 2008 QLogic Corporation */
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _QL_DEBUG_H
#define _QL_DEBUG_H
/*
* ISP2xxx Solaris Fibre Channel Adapter (FCA) driver header file.
*
* ***********************************************************************
* * **
* * NOTICE **
* * COPYRIGHT (C) 1996-2008 QLOGIC CORPORATION **
* * ALL RIGHTS RESERVED **
* * **
* ***********************************************************************
*
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Driver debug definitions in makefile.
*
* QL_DEBUG_LEVEL_1=0x1
* QL_DEBUG_LEVEL_2=0x2 Output error msgs.
* QL_DEBUG_LEVEL_3=0x4 Output function trace msgs.
* QL_DEBUG_LEVEL_4=0x8 Output NVRAM trace msgs.
* QL_DEBUG_LEVEL_5=0x10 Output ring trace msgs.
* QL_DEBUG_LEVEL_6=0x20 Output WATCHDOG timer trace.
* QL_DEBUG_LEVEL_7=0x40
* QL_DEBUG_LEVEL_8=0x80 Output ring staturation msgs.
* QL_DEBUG_LEVEL_9=0x100 Output IOCTL trace.
* QL_DEBUG_LEVEL_10=0x200
* QL_DEBUG_LEVEL_11=0x400
* QL_DEBUG_LEVEL_12=0x1000
* QL_DEBUG_LEVEL_13=0x2000
* QL_DEBUG_LEVEL_14=0x4000
* QL_DEBUG_LEVEL_15=0x8000
*/
void ql_el_msg(ql_adapter_state_t *, const char *, int, ...);
uint16_t);
#if (QL_DEBUG & 0xffff)
#define QL_DEBUG_ROUTINES
#define QL_BANG
#define QL_QUESTION
#define QL_CAROT
#else
#define QL_BANG "!"
#define QL_QUESTION "?"
#define QL_CAROT "^"
#endif
/*
* Macros.
*/
}
#define EL_BUF_LEN 256
#define DEBUG_STK_DEPTH 24
#if QL_DEBUG & 1
#define QL_DEBUG_LEVEL_1
#else
#define QL_PRINT_1(...)
#endif
#ifdef QL_DEBUG_ROUTINES
#define QL_DEBUG_LEVEL_2
#else
#define QL_PRINT_2(...)
#endif
#if QL_DEBUG & 4
#define QL_DEBUG_LEVEL_3
#else
#define QL_PRINT_3(...)
#endif
#if QL_DEBUG & 8
#define QL_DEBUG_LEVEL_4
#else
#define QL_PRINT_4(...)
#endif
#if QL_DEBUG & 0x10
#define QL_DEBUG_LEVEL_5
#else
#define QL_PRINT_5(...)
#endif
#if QL_DEBUG & 0x20
#define QL_DEBUG_LEVEL_6
#else
#define QL_PRINT_6(...)
#endif
#if QL_DEBUG & 0x40
#define QL_DEBUG_LEVEL_7
#else
#define QL_PRINT_7(...)
#endif
#if QL_DEBUG & 0x80
#define QL_DEBUG_LEVEL_8
#else
#define QL_PRINT_8(...)
#endif
#if QL_DEBUG & 0x104
#else
#define QL_PRINT_9(...)
#endif
#if QL_DEBUG & 0x200
#define QL_DEBUG_LEVEL_10
#else
#define QL_PRINT_10(...)
#endif
#if QL_DEBUG & 0x400
#define QL_DEBUG_LEVEL_11
#else
#define QL_PRINT_11(...)
#endif
#if QL_DEBUG & 0x800
#define QL_DEBUG_LEVEL_12
#else
#define QL_PRINT_12(...)
#endif
#if QL_DEBUG & 0x1000
#define QL_DEBUG_LEVEL_13
#else
#define QL_PRINT_13(...)
#endif
#if QL_DEBUG & 0x2000
#define QL_DEBUG_LEVEL_14
#else
#define QL_PRINT_14(...)
#endif
#if QL_DEBUG & 0x4000
#define QL_DEBUG_LEVEL_15
#else
#define QL_PRINT_15(...)
#endif
#if QL_DEBUG & 0x8000
#define QL_DEBUG_LEVEL_16
#else
#define QL_PRINT_16(...)
#endif
#ifdef __cplusplus
}
#endif
#endif /* _QL_DEBUG_H */