PM / sleep: Asynchronous threads for suspend_noirq
[linux/fpc-iii.git] / drivers / scsi / bnx2fc / bnx2fc_debug.c
blob0cbee1b23ee23c3c79c73dca6e9ba8aba80fd118
1 #include "bnx2fc.h"
3 void BNX2FC_IO_DBG(const struct bnx2fc_cmd *io_req, const char *fmt, ...)
5 struct va_format vaf;
6 va_list args;
8 if (likely(!(bnx2fc_debug_level & LOG_IO)))
9 return;
11 va_start(args, fmt);
13 vaf.fmt = fmt;
14 vaf.va = &args;
16 if (io_req && io_req->port && io_req->port->lport &&
17 io_req->port->lport->host)
18 shost_printk(KERN_INFO, io_req->port->lport->host,
19 PFX "xid:0x%x %pV",
20 io_req->xid, &vaf);
21 else
22 pr_info("NULL %pV", &vaf);
24 va_end(args);
27 void BNX2FC_TGT_DBG(const struct bnx2fc_rport *tgt, const char *fmt, ...)
29 struct va_format vaf;
30 va_list args;
32 if (likely(!(bnx2fc_debug_level & LOG_TGT)))
33 return;
35 va_start(args, fmt);
37 vaf.fmt = fmt;
38 vaf.va = &args;
40 if (tgt && tgt->port && tgt->port->lport && tgt->port->lport->host &&
41 tgt->rport)
42 shost_printk(KERN_INFO, tgt->port->lport->host,
43 PFX "port:%x %pV",
44 tgt->rport->port_id, &vaf);
45 else
46 pr_info("NULL %pV", &vaf);
48 va_end(args);
51 void BNX2FC_HBA_DBG(const struct fc_lport *lport, const char *fmt, ...)
53 struct va_format vaf;
54 va_list args;
56 if (likely(!(bnx2fc_debug_level & LOG_HBA)))
57 return;
59 va_start(args, fmt);
61 vaf.fmt = fmt;
62 vaf.va = &args;
64 if (lport && lport->host)
65 shost_printk(KERN_INFO, lport->host, PFX "%pV", &vaf);
66 else
67 pr_info("NULL %pV", &vaf);
69 va_end(args);