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