ql4_dbg.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * QLogic iSCSI HBA Driver
  4. * Copyright (c) 2003-2012 QLogic Corporation
  5. */
  6. /*
  7. * Driver debug definitions.
  8. */
  9. /* #define QL_DEBUG */ /* DEBUG messages */
  10. /* #define QL_DEBUG_LEVEL_3 */ /* Output function tracing */
  11. /* #define QL_DEBUG_LEVEL_4 */
  12. /* #define QL_DEBUG_LEVEL_5 */
  13. /* #define QL_DEBUG_LEVEL_7 */
  14. /* #define QL_DEBUG_LEVEL_9 */
  15. #define QL_DEBUG_LEVEL_2 /* ALways enable error messagess */
  16. #if defined(QL_DEBUG)
  17. #define DEBUG(x) do {x;} while (0);
  18. #else
  19. #define DEBUG(x) do {} while (0);
  20. #endif
  21. #if defined(QL_DEBUG_LEVEL_2)
  22. #define DEBUG2(x) do {if(ql4xextended_error_logging == 2) x;} while (0);
  23. #define DEBUG2_3(x) do {x;} while (0);
  24. #else /* */
  25. #define DEBUG2(x) do {} while (0);
  26. #endif /* */
  27. #if defined(QL_DEBUG_LEVEL_3)
  28. #define DEBUG3(x) do {if(ql4xextended_error_logging == 3) x;} while (0);
  29. #else /* */
  30. #define DEBUG3(x) do {} while (0);
  31. #if !defined(QL_DEBUG_LEVEL_2)
  32. #define DEBUG2_3(x) do {} while (0);
  33. #endif /* */
  34. #endif /* */
  35. #if defined(QL_DEBUG_LEVEL_4)
  36. #define DEBUG4(x) do {x;} while (0);
  37. #else /* */
  38. #define DEBUG4(x) do {} while (0);
  39. #endif /* */
  40. #if defined(QL_DEBUG_LEVEL_5)
  41. #define DEBUG5(x) do {x;} while (0);
  42. #else /* */
  43. #define DEBUG5(x) do {} while (0);
  44. #endif /* */
  45. #if defined(QL_DEBUG_LEVEL_7)
  46. #define DEBUG7(x) do {x; } while (0)
  47. #else /* */
  48. #define DEBUG7(x) do {} while (0)
  49. #endif /* */
  50. #if defined(QL_DEBUG_LEVEL_9)
  51. #define DEBUG9(x) do {x;} while (0);
  52. #else /* */
  53. #define DEBUG9(x) do {} while (0);
  54. #endif /* */