Go to the documentation of this file.
23 #define FC_LIBFC_LOGGING 0x01
24 #define FC_LPORT_LOGGING 0x02
25 #define FC_DISC_LOGGING 0x04
26 #define FC_RPORT_LOGGING 0x08
27 #define FC_FCP_LOGGING 0x10
28 #define FC_EM_LOGGING 0x20
29 #define FC_EXCH_LOGGING 0x40
30 #define FC_SCSI_LOGGING 0x80
34 #define FC_CHECK_LOGGING(LEVEL, CMD) \
36 if (unlikely(fc_debug_logging & LEVEL)) \
42 #define FC_LIBFC_DBG(fmt, args...) \
43 FC_CHECK_LOGGING(FC_LIBFC_LOGGING, \
44 printk(KERN_INFO "libfc: " fmt, ##args))
46 #define FC_LPORT_DBG(lport, fmt, args...) \
47 FC_CHECK_LOGGING(FC_LPORT_LOGGING, \
48 printk(KERN_INFO "host%u: lport %6.6x: " fmt, \
49 (lport)->host->host_no, \
50 (lport)->port_id, ##args))
52 #define FC_DISC_DBG(disc, fmt, args...) \
53 FC_CHECK_LOGGING(FC_DISC_LOGGING, \
54 printk(KERN_INFO "host%u: disc: " fmt, \
55 fc_disc_lport(disc)->host->host_no, \
58 #define FC_RPORT_ID_DBG(lport, port_id, fmt, args...) \
59 FC_CHECK_LOGGING(FC_RPORT_LOGGING, \
60 printk(KERN_INFO "host%u: rport %6.6x: " fmt, \
61 (lport)->host->host_no, \
64 #define FC_RPORT_DBG(rdata, fmt, args...) \
65 FC_RPORT_ID_DBG((rdata)->local_port, (rdata)->ids.port_id, fmt, ##args)
67 #define FC_FCP_DBG(pkt, fmt, args...) \
68 FC_CHECK_LOGGING(FC_FCP_LOGGING, \
70 if ((pkt)->seq_ptr) { \
71 struct fc_exch *_ep = NULL; \
72 _ep = fc_seq_exch((pkt)->seq_ptr); \
73 printk(KERN_INFO "host%u: fcp: %6.6x: " \
74 "xid %04x-%04x: " fmt, \
75 (pkt)->lp->host->host_no, \
76 (pkt)->rport->port_id, \
77 (_ep)->oxid, (_ep)->rxid, ##args); \
79 printk(KERN_INFO "host%u: fcp: %6.6x: " fmt, \
80 (pkt)->lp->host->host_no, \
81 (pkt)->rport->port_id, ##args); \
85 #define FC_EXCH_DBG(exch, fmt, args...) \
86 FC_CHECK_LOGGING(FC_EXCH_LOGGING, \
87 printk(KERN_INFO "host%u: xid %4x: " fmt, \
88 (exch)->lp->host->host_no, \
91 #define FC_SCSI_DBG(lport, fmt, args...) \
92 FC_CHECK_LOGGING(FC_SCSI_LOGGING, \
93 printk(KERN_INFO "host%u: scsi: " fmt, \
94 (lport)->host->host_no, ##args))