aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.h')
-rw-r--r--drivers/scsi/fcoe/fcoe.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h
index a1eb8c1988b0..0d724fa0898f 100644
--- a/drivers/scsi/fcoe/fcoe.h
+++ b/drivers/scsi/fcoe/fcoe.h
@@ -40,6 +40,30 @@
40#define FCOE_MIN_XID 0x0001 /* the min xid supported by fcoe_sw */ 40#define FCOE_MIN_XID 0x0001 /* the min xid supported by fcoe_sw */
41#define FCOE_MAX_XID 0x07ef /* the max xid supported by fcoe_sw */ 41#define FCOE_MAX_XID 0x07ef /* the max xid supported by fcoe_sw */
42 42
43unsigned int fcoe_debug_logging;
44module_param_named(debug_logging, fcoe_debug_logging, int, S_IRUGO|S_IWUSR);
45MODULE_PARM_DESC(debug_logging, "a bit mask of logging levels");
46
47#define FCOE_LOGGING 0x01 /* General logging, not categorized */
48#define FCOE_NETDEV_LOGGING 0x02 /* Netdevice logging */
49
50#define FCOE_CHECK_LOGGING(LEVEL, CMD) \
51do { \
52 if (unlikely(fcoe_debug_logging & LEVEL)) \
53 do { \
54 CMD; \
55 } while (0); \
56} while (0);
57
58#define FCOE_DBG(fmt, args...) \
59 FCOE_CHECK_LOGGING(FCOE_LOGGING, \
60 printk(KERN_INFO "fcoe: " fmt, ##args);)
61
62#define FCOE_NETDEV_DBG(netdev, fmt, args...) \
63 FCOE_CHECK_LOGGING(FCOE_NETDEV_LOGGING, \
64 printk(KERN_INFO "fcoe: %s" fmt, \
65 netdev->name, ##args);)
66
43/* 67/*
44 * this percpu struct for fcoe 68 * this percpu struct for fcoe
45 */ 69 */