diff options
author | Robert Love <robert.w.love@intel.com> | 2012-11-27 01:53:24 -0500 |
---|---|---|
committer | Robert Love <robert.w.love@intel.com> | 2012-12-14 13:38:54 -0500 |
commit | 3993de6183885a099163b9562a2ea9c07b994a0e (patch) | |
tree | 9953a7fc4ce080923d9b7070d7b6c48819c14639 /drivers/scsi | |
parent | ef60f674344cdb6d1da199f6b8d7d7016813cc6f (diff) |
libfcoe: Add fcoe_sysfs debug logging level
Add a macro to print fcoe_sysfs debug statements.
Signed-off-by: Robert Love <robert.w.love@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/fcoe/fcoe_sysfs.c | 7 | ||||
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.h | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c index e6fce2862a33..9c74374b53cd 100644 --- a/drivers/scsi/fcoe/fcoe_sysfs.c +++ b/drivers/scsi/fcoe/fcoe_sysfs.c | |||
@@ -24,6 +24,13 @@ | |||
24 | 24 | ||
25 | #include <scsi/fcoe_sysfs.h> | 25 | #include <scsi/fcoe_sysfs.h> |
26 | 26 | ||
27 | /* | ||
28 | * OK to include local libfcoe.h for debug_logging, but cannot include | ||
29 | * <scsi/libfcoe.h> otherwise non-netdev based fcoe solutions would have | ||
30 | * have to include more than fcoe_sysfs.h. | ||
31 | */ | ||
32 | #include "libfcoe.h" | ||
33 | |||
27 | static atomic_t ctlr_num; | 34 | static atomic_t ctlr_num; |
28 | static atomic_t fcf_num; | 35 | static atomic_t fcf_num; |
29 | 36 | ||
diff --git a/drivers/scsi/fcoe/libfcoe.h b/drivers/scsi/fcoe/libfcoe.h index 6af5fc3a17d8..63d8faedca9f 100644 --- a/drivers/scsi/fcoe/libfcoe.h +++ b/drivers/scsi/fcoe/libfcoe.h | |||
@@ -2,9 +2,10 @@ | |||
2 | #define _FCOE_LIBFCOE_H_ | 2 | #define _FCOE_LIBFCOE_H_ |
3 | 3 | ||
4 | extern unsigned int libfcoe_debug_logging; | 4 | extern unsigned int libfcoe_debug_logging; |
5 | #define LIBFCOE_LOGGING 0x01 /* General logging, not categorized */ | 5 | #define LIBFCOE_LOGGING 0x01 /* General logging, not categorized */ |
6 | #define LIBFCOE_FIP_LOGGING 0x02 /* FIP logging */ | 6 | #define LIBFCOE_FIP_LOGGING 0x02 /* FIP logging */ |
7 | #define LIBFCOE_TRANSPORT_LOGGING 0x04 /* FCoE transport logging */ | 7 | #define LIBFCOE_TRANSPORT_LOGGING 0x04 /* FCoE transport logging */ |
8 | #define LIBFCOE_SYSFS_LOGGING 0x08 /* fcoe_sysfs logging */ | ||
8 | 9 | ||
9 | #define LIBFCOE_CHECK_LOGGING(LEVEL, CMD) \ | 10 | #define LIBFCOE_CHECK_LOGGING(LEVEL, CMD) \ |
10 | do { \ | 11 | do { \ |
@@ -28,4 +29,8 @@ do { \ | |||
28 | printk(KERN_INFO "%s: " fmt, \ | 29 | printk(KERN_INFO "%s: " fmt, \ |
29 | __func__, ##args);) | 30 | __func__, ##args);) |
30 | 31 | ||
32 | #define LIBFCOE_SYSFS_DBG(cdev, fmt, args...) \ | ||
33 | LIBFCOE_CHECK_LOGGING(LIBFCOE_SYSFS_LOGGING, \ | ||
34 | pr_info("ctlr_%d: " fmt, cdev->id, ##args);) | ||
35 | |||
31 | #endif /* _FCOE_LIBFCOE_H_ */ | 36 | #endif /* _FCOE_LIBFCOE_H_ */ |