1afaf5a2dSDavid Somayajulu /* 2afaf5a2dSDavid Somayajulu * QLogic iSCSI HBA Driver 3afaf5a2dSDavid Somayajulu * Copyright (c) 2003-2006 QLogic Corporation 4afaf5a2dSDavid Somayajulu * 5afaf5a2dSDavid Somayajulu * See LICENSE.qla4xxx for copyright and licensing details. 6afaf5a2dSDavid Somayajulu */ 7afaf5a2dSDavid Somayajulu 8afaf5a2dSDavid Somayajulu /* 9afaf5a2dSDavid Somayajulu * Driver debug definitions. 10afaf5a2dSDavid Somayajulu */ 11afaf5a2dSDavid Somayajulu /* #define QL_DEBUG */ /* DEBUG messages */ 12afaf5a2dSDavid Somayajulu /* #define QL_DEBUG_LEVEL_3 */ /* Output function tracing */ 13afaf5a2dSDavid Somayajulu /* #define QL_DEBUG_LEVEL_4 */ 14afaf5a2dSDavid Somayajulu /* #define QL_DEBUG_LEVEL_5 */ 15afaf5a2dSDavid Somayajulu /* #define QL_DEBUG_LEVEL_9 */ 16afaf5a2dSDavid Somayajulu 17afaf5a2dSDavid Somayajulu #define QL_DEBUG_LEVEL_2 /* ALways enable error messagess */ 18afaf5a2dSDavid Somayajulu #if defined(QL_DEBUG) 19afaf5a2dSDavid Somayajulu #define DEBUG(x) do {x;} while (0); 20afaf5a2dSDavid Somayajulu #else 21afaf5a2dSDavid Somayajulu #define DEBUG(x) do {} while (0); 22afaf5a2dSDavid Somayajulu #endif 23afaf5a2dSDavid Somayajulu 24afaf5a2dSDavid Somayajulu #if defined(QL_DEBUG_LEVEL_2) 25*11010fecSAndrew Vasquez #define DEBUG2(x) do {if(ql4xextended_error_logging == 2) x;} while (0); 26afaf5a2dSDavid Somayajulu #define DEBUG2_3(x) do {x;} while (0); 27afaf5a2dSDavid Somayajulu #else /* */ 28afaf5a2dSDavid Somayajulu #define DEBUG2(x) do {} while (0); 29afaf5a2dSDavid Somayajulu #endif /* */ 30afaf5a2dSDavid Somayajulu 31afaf5a2dSDavid Somayajulu #if defined(QL_DEBUG_LEVEL_3) 32*11010fecSAndrew Vasquez #define DEBUG3(x) do {if(ql4xextended_error_logging == 3) x;} while (0); 33afaf5a2dSDavid Somayajulu #else /* */ 34afaf5a2dSDavid Somayajulu #define DEBUG3(x) do {} while (0); 35afaf5a2dSDavid Somayajulu #if !defined(QL_DEBUG_LEVEL_2) 36afaf5a2dSDavid Somayajulu #define DEBUG2_3(x) do {} while (0); 37afaf5a2dSDavid Somayajulu #endif /* */ 38afaf5a2dSDavid Somayajulu #endif /* */ 39afaf5a2dSDavid Somayajulu #if defined(QL_DEBUG_LEVEL_4) 40afaf5a2dSDavid Somayajulu #define DEBUG4(x) do {x;} while (0); 41afaf5a2dSDavid Somayajulu #else /* */ 42afaf5a2dSDavid Somayajulu #define DEBUG4(x) do {} while (0); 43afaf5a2dSDavid Somayajulu #endif /* */ 44afaf5a2dSDavid Somayajulu 45afaf5a2dSDavid Somayajulu #if defined(QL_DEBUG_LEVEL_5) 46afaf5a2dSDavid Somayajulu #define DEBUG5(x) do {x;} while (0); 47afaf5a2dSDavid Somayajulu #else /* */ 48afaf5a2dSDavid Somayajulu #define DEBUG5(x) do {} while (0); 49afaf5a2dSDavid Somayajulu #endif /* */ 50afaf5a2dSDavid Somayajulu 51afaf5a2dSDavid Somayajulu #if defined(QL_DEBUG_LEVEL_9) 52afaf5a2dSDavid Somayajulu #define DEBUG9(x) do {x;} while (0); 53afaf5a2dSDavid Somayajulu #else /* */ 54afaf5a2dSDavid Somayajulu #define DEBUG9(x) do {} while (0); 55afaf5a2dSDavid Somayajulu #endif /* */ 56