1*6621Sbt150084 /* 2*6621Sbt150084 * CDDL HEADER START 3*6621Sbt150084 * 4*6621Sbt150084 * Copyright(c) 2007-2008 Intel Corporation. All rights reserved. 5*6621Sbt150084 * The contents of this file are subject to the terms of the 6*6621Sbt150084 * Common Development and Distribution License (the "License"). 7*6621Sbt150084 * You may not use this file except in compliance with the License. 8*6621Sbt150084 * 9*6621Sbt150084 * You can obtain a copy of the license at: 10*6621Sbt150084 * http://www.opensolaris.org/os/licensing. 11*6621Sbt150084 * See the License for the specific language governing permissions 12*6621Sbt150084 * and limitations under the License. 13*6621Sbt150084 * 14*6621Sbt150084 * When using or redistributing this file, you may do so under the 15*6621Sbt150084 * License only. No other modification of this header is permitted. 16*6621Sbt150084 * 17*6621Sbt150084 * If applicable, add the following below this CDDL HEADER, with the 18*6621Sbt150084 * fields enclosed by brackets "[]" replaced with your own identifying 19*6621Sbt150084 * information: Portions Copyright [yyyy] [name of copyright owner] 20*6621Sbt150084 * 21*6621Sbt150084 * CDDL HEADER END 22*6621Sbt150084 */ 23*6621Sbt150084 24*6621Sbt150084 /* 25*6621Sbt150084 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 26*6621Sbt150084 * Use is subject to license terms of the CDDL. 27*6621Sbt150084 */ 28*6621Sbt150084 29*6621Sbt150084 #ifndef _IXGBE_DEBUG_H 30*6621Sbt150084 #define _IXGBE_DEBUG_H 31*6621Sbt150084 32*6621Sbt150084 #pragma ident "%Z%%M% %I% %E% SMI" 33*6621Sbt150084 34*6621Sbt150084 #ifdef __cplusplus 35*6621Sbt150084 extern "C" { 36*6621Sbt150084 #endif 37*6621Sbt150084 38*6621Sbt150084 39*6621Sbt150084 #ifdef DEBUG 40*6621Sbt150084 #define IXGBE_DEBUG 41*6621Sbt150084 #endif 42*6621Sbt150084 43*6621Sbt150084 #ifdef IXGBE_DEBUG 44*6621Sbt150084 45*6621Sbt150084 #define IXGBE_DEBUGLOG_0(adapter, fmt) \ 46*6621Sbt150084 ixgbe_log((adapter), (fmt)) 47*6621Sbt150084 #define IXGBE_DEBUGLOG_1(adapter, fmt, d1) \ 48*6621Sbt150084 ixgbe_log((adapter), (fmt), (d1)) 49*6621Sbt150084 #define IXGBE_DEBUGLOG_2(adapter, fmt, d1, d2) \ 50*6621Sbt150084 ixgbe_log((adapter), (fmt), (d1), (d2)) 51*6621Sbt150084 #define IXGBE_DEBUGLOG_3(adapter, fmt, d1, d2, d3) \ 52*6621Sbt150084 ixgbe_log((adapter), (fmt), (d1), (d2), (d3)) 53*6621Sbt150084 #define IXGBE_DEBUGLOG_6(adapter, fmt, d1, d2, d3, d4, d5, d6) \ 54*6621Sbt150084 ixgbe_log((adapter), (fmt), (d1), (d2), (d3), (d4), (d5), (d6)) 55*6621Sbt150084 56*6621Sbt150084 #define IXGBE_DEBUG_STAT_COND(val, cond) if (cond) (val)++; 57*6621Sbt150084 #define IXGBE_DEBUG_STAT(val) (val)++; 58*6621Sbt150084 59*6621Sbt150084 #else 60*6621Sbt150084 61*6621Sbt150084 #define IXGBE_DEBUGLOG_0(adapter, fmt) 62*6621Sbt150084 #define IXGBE_DEBUGLOG_1(adapter, fmt, d1) 63*6621Sbt150084 #define IXGBE_DEBUGLOG_2(adapter, fmt, d1, d2) 64*6621Sbt150084 #define IXGBE_DEBUGLOG_3(adapter, fmt, d1, d2, d3) 65*6621Sbt150084 #define IXGBE_DEBUGLOG_6(adapter, fmt, d1, d2, d3, d4, d5, d6) 66*6621Sbt150084 67*6621Sbt150084 #define IXGBE_DEBUG_STAT_COND(val, cond) 68*6621Sbt150084 #define IXGBE_DEBUG_STAT(val) 69*6621Sbt150084 70*6621Sbt150084 #endif /* IXGBE_DEBUG */ 71*6621Sbt150084 72*6621Sbt150084 #define IXGBE_STAT(val) (val)++; 73*6621Sbt150084 74*6621Sbt150084 #ifdef IXGBE_DEBUG 75*6621Sbt150084 76*6621Sbt150084 void ixgbe_pci_dump(void *); 77*6621Sbt150084 void ixgbe_dump_interrupt(void *, char *); 78*6621Sbt150084 void ixgbe_dump_addr(void *, char *, const uint8_t *); 79*6621Sbt150084 80*6621Sbt150084 #endif /* IXGBE_DEBUG */ 81*6621Sbt150084 82*6621Sbt150084 extern void ixgbe_log(void *, const char *, ...); 83*6621Sbt150084 84*6621Sbt150084 #ifdef __cplusplus 85*6621Sbt150084 } 86*6621Sbt150084 #endif 87*6621Sbt150084 88*6621Sbt150084 #endif /* _IXGBE_DEBUG_H */ 89