Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3993de61 authored by Robert Love's avatar Robert Love
Browse files

libfcoe: Add fcoe_sysfs debug logging level



Add a macro to print fcoe_sysfs debug statements.

Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
parent ef60f674
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -24,6 +24,13 @@

#include <scsi/fcoe_sysfs.h>

/*
 * OK to include local libfcoe.h for debug_logging, but cannot include
 * <scsi/libfcoe.h> otherwise non-netdev based fcoe solutions would have
 * have to include more than fcoe_sysfs.h.
 */
#include "libfcoe.h"

static atomic_t ctlr_num;
static atomic_t fcf_num;

+8 −3
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ extern unsigned int libfcoe_debug_logging;
#define LIBFCOE_LOGGING	          0x01 /* General logging, not categorized */
#define LIBFCOE_FIP_LOGGING       0x02 /* FIP logging */
#define LIBFCOE_TRANSPORT_LOGGING 0x04 /* FCoE transport logging */
#define LIBFCOE_SYSFS_LOGGING     0x08 /* fcoe_sysfs logging */

#define LIBFCOE_CHECK_LOGGING(LEVEL, CMD)		\
do {							\
@@ -28,4 +29,8 @@ do { \
			      printk(KERN_INFO "%s: " fmt,		\
				     __func__, ##args);)

#define LIBFCOE_SYSFS_DBG(cdev, fmt, args...)				\
	LIBFCOE_CHECK_LOGGING(LIBFCOE_SYSFS_LOGGING,			\
			      pr_info("ctlr_%d: " fmt, cdev->id, ##args);)

#endif /* _FCOE_LIBFCOE_H_ */