1*e3976af5SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2afaf5a2dSDavid Somayajulu /* 3afaf5a2dSDavid Somayajulu * QLogic iSCSI HBA Driver 4c68cdbf0SVikas Chaudhary * Copyright (c) 2003-2012 QLogic Corporation 5afaf5a2dSDavid Somayajulu */ 6afaf5a2dSDavid Somayajulu 7afaf5a2dSDavid Somayajulu /* 8afaf5a2dSDavid Somayajulu * Driver debug definitions. 9afaf5a2dSDavid Somayajulu */ 10afaf5a2dSDavid Somayajulu /* #define QL_DEBUG */ /* DEBUG messages */ 11afaf5a2dSDavid Somayajulu /* #define QL_DEBUG_LEVEL_3 */ /* Output function tracing */ 12afaf5a2dSDavid Somayajulu /* #define QL_DEBUG_LEVEL_4 */ 13afaf5a2dSDavid Somayajulu /* #define QL_DEBUG_LEVEL_5 */ 1433338e31SVikas Chaudhary /* #define QL_DEBUG_LEVEL_7 */ 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) 2511010fecSAndrew 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) 3211010fecSAndrew 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 5133338e31SVikas Chaudhary #if defined(QL_DEBUG_LEVEL_7) 5233338e31SVikas Chaudhary #define DEBUG7(x) do {x; } while (0) 5333338e31SVikas Chaudhary #else /* */ 5433338e31SVikas Chaudhary #define DEBUG7(x) do {} while (0) 5533338e31SVikas Chaudhary #endif /* */ 5633338e31SVikas Chaudhary 57afaf5a2dSDavid Somayajulu #if defined(QL_DEBUG_LEVEL_9) 58afaf5a2dSDavid Somayajulu #define DEBUG9(x) do {x;} while (0); 59afaf5a2dSDavid Somayajulu #else /* */ 60afaf5a2dSDavid Somayajulu #define DEBUG9(x) do {} while (0); 61afaf5a2dSDavid Somayajulu #endif /* */ 62