15779Sxy150489 /* 25779Sxy150489 * CDDL HEADER START 35779Sxy150489 * 4*8955SChenlu.Chen@Sun.COM * Copyright(c) 2007-2009 Intel Corporation. All rights reserved. 55779Sxy150489 * The contents of this file are subject to the terms of the 65779Sxy150489 * Common Development and Distribution License (the "License"). 75779Sxy150489 * You may not use this file except in compliance with the License. 85779Sxy150489 * 95779Sxy150489 * You can obtain a copy of the license at: 105779Sxy150489 * http://www.opensolaris.org/os/licensing. 115779Sxy150489 * See the License for the specific language governing permissions 125779Sxy150489 * and limitations under the License. 135779Sxy150489 * 145779Sxy150489 * When using or redistributing this file, you may do so under the 155779Sxy150489 * License only. No other modification of this header is permitted. 165779Sxy150489 * 175779Sxy150489 * If applicable, add the following below this CDDL HEADER, with the 185779Sxy150489 * fields enclosed by brackets "[]" replaced with your own identifying 195779Sxy150489 * information: Portions Copyright [yyyy] [name of copyright owner] 205779Sxy150489 * 215779Sxy150489 * CDDL HEADER END 225779Sxy150489 */ 235779Sxy150489 245779Sxy150489 /* 25*8955SChenlu.Chen@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 265779Sxy150489 * Use is subject to license terms of the CDDL. 275779Sxy150489 */ 285779Sxy150489 295779Sxy150489 #ifndef _IGB_DEBUG_H 305779Sxy150489 #define _IGB_DEBUG_H 315779Sxy150489 325779Sxy150489 #ifdef __cplusplus 335779Sxy150489 extern "C" { 345779Sxy150489 #endif 355779Sxy150489 365779Sxy150489 375779Sxy150489 #ifdef DEBUG 385779Sxy150489 #define IGB_DEBUG 395779Sxy150489 #endif 405779Sxy150489 415779Sxy150489 #ifdef IGB_DEBUG 425779Sxy150489 435779Sxy150489 #define IGB_DEBUGLOG_0(adapter, fmt) \ 445779Sxy150489 igb_log((adapter), (fmt)) 455779Sxy150489 #define IGB_DEBUGLOG_1(adapter, fmt, d1) \ 465779Sxy150489 igb_log((adapter), (fmt), (d1)) 475779Sxy150489 #define IGB_DEBUGLOG_2(adapter, fmt, d1, d2) \ 485779Sxy150489 igb_log((adapter), (fmt), (d1), (d2)) 495779Sxy150489 #define IGB_DEBUGLOG_3(adapter, fmt, d1, d2, d3) \ 505779Sxy150489 igb_log((adapter), (fmt), (d1), (d2), (d3)) 515779Sxy150489 52*8955SChenlu.Chen@Sun.COM #define IGB_DEBUG_STAT_COND(val, cond) if (cond) (val)++ 53*8955SChenlu.Chen@Sun.COM #define IGB_DEBUG_STAT(val) (val)++ 545779Sxy150489 555779Sxy150489 #else 565779Sxy150489 575779Sxy150489 #define IGB_DEBUGLOG_0(adapter, fmt) 585779Sxy150489 #define IGB_DEBUGLOG_1(adapter, fmt, d1) 595779Sxy150489 #define IGB_DEBUGLOG_2(adapter, fmt, d1, d2) 605779Sxy150489 #define IGB_DEBUGLOG_3(adapter, fmt, d1, d2, d3) 615779Sxy150489 625779Sxy150489 #define IGB_DEBUG_STAT_COND(val, cond) 635779Sxy150489 #define IGB_DEBUG_STAT(val) 645779Sxy150489 655779Sxy150489 #endif /* IGB_DEBUG */ 665779Sxy150489 67*8955SChenlu.Chen@Sun.COM #define IGB_STAT(val) (val)++ 685779Sxy150489 695779Sxy150489 #ifdef IGB_DEBUG 705779Sxy150489 715779Sxy150489 void pci_dump(void *); 725779Sxy150489 735779Sxy150489 #endif /* IGB_DEBUG */ 745779Sxy150489 755779Sxy150489 extern void igb_log(void *, const char *, ...); 765779Sxy150489 775779Sxy150489 #ifdef __cplusplus 785779Sxy150489 } 795779Sxy150489 #endif 805779Sxy150489 815779Sxy150489 #endif /* _IGB_DEBUG_H */ 82