drivers/scsi/mpi3mr/mpi3mr_debug.h

Source file repositories/reference/linux-study-clean/drivers/scsi/mpi3mr/mpi3mr_debug.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/mpi3mr/mpi3mr_debug.h
Extension
.h
Size
5050 bytes
Lines
198
Domain
Driver Families
Bucket
drivers/scsi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef MPI3SAS_DEBUG_H_INCLUDED

#define MPI3SAS_DEBUG_H_INCLUDED

/*
 * debug levels
 */

#define MPI3_DEBUG_EVENT		0x00000001
#define MPI3_DEBUG_EVENT_WORK_TASK	0x00000002
#define MPI3_DEBUG_INIT		0x00000004
#define MPI3_DEBUG_EXIT		0x00000008
#define MPI3_DEBUG_TM			0x00000010
#define MPI3_DEBUG_RESET		0x00000020
#define MPI3_DEBUG_SCSI_ERROR		0x00000040
#define MPI3_DEBUG_REPLY		0x00000080
#define MPI3_DEBUG_CFG_ERROR		0x00000100
#define MPI3_DEBUG_TRANSPORT_ERROR	0x00000200
#define MPI3_DEBUG_BSG_ERROR		0x00008000
#define MPI3_DEBUG_BSG_INFO		0x00010000
#define MPI3_DEBUG_SCSI_INFO		0x00020000
#define MPI3_DEBUG_CFG_INFO		0x00040000
#define MPI3_DEBUG_TRANSPORT_INFO	0x00080000
#define MPI3_DEBUG			0x01000000
#define MPI3_DEBUG_SG			0x02000000


/*
 * debug macros
 */

#define ioc_err(ioc, fmt, ...) \
	pr_err("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_notice(ioc, fmt, ...) \
	pr_notice("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_warn(ioc, fmt, ...) \
	pr_warn("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_info(ioc, fmt, ...) \
	pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__)

#define dprint(ioc, fmt, ...) \
	do { \
		if (ioc->logging_level & MPI3_DEBUG) \
			pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \
	} while (0)

#define dprint_event_th(ioc, fmt, ...) \
	do { \
		if (ioc->logging_level & MPI3_DEBUG_EVENT) \
			pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \
	} while (0)

#define dprint_event_bh(ioc, fmt, ...) \
	do { \
		if (ioc->logging_level & MPI3_DEBUG_EVENT_WORK_TASK) \
			pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \
	} while (0)

#define dprint_init(ioc, fmt, ...) \
	do { \
		if (ioc->logging_level & MPI3_DEBUG_INIT) \
			pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \
	} while (0)

#define dprint_exit(ioc, fmt, ...) \
	do { \
		if (ioc->logging_level & MPI3_DEBUG_EXIT) \
			pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \
	} while (0)

#define dprint_tm(ioc, fmt, ...) \
	do { \
		if (ioc->logging_level & MPI3_DEBUG_TM) \
			pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \
	} while (0)

#define dprint_reply(ioc, fmt, ...) \
	do { \
		if (ioc->logging_level & MPI3_DEBUG_REPLY) \
			pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \
	} while (0)

#define dprint_reset(ioc, fmt, ...) \
	do { \
		if (ioc->logging_level & MPI3_DEBUG_RESET) \
			pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \
	} while (0)

#define dprint_scsi_info(ioc, fmt, ...) \
	do { \

Annotation

Implementation Notes