aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_logmsg.h
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-08-02 11:10:09 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-08-01 13:21:26 -0400
commite8b62011d88d6fdba585fb2bb77c9274a63cadab (patch)
tree838c3abee73ec571456ae3ae83e51ecbed8e4a64 /drivers/scsi/lpfc/lpfc_logmsg.h
parent3de2a653a127c468284c48e233719dc39769e354 (diff)
[SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro
Rework the lpfc_printf_log() macro so that logging is enabled on a per-vport basis. Used to be on a physical-port basis, thus logging with large numbers of vports became a mess. Required redefinition of the macro, and an update of every use. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_logmsg.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_logmsg.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_logmsg.h b/drivers/scsi/lpfc/lpfc_logmsg.h
index 8a6ceffeabcf..626e4d878725 100644
--- a/drivers/scsi/lpfc/lpfc_logmsg.h
+++ b/drivers/scsi/lpfc/lpfc_logmsg.h
@@ -33,6 +33,12 @@
33#define LOG_VPORT 0x4000 /* NPIV events */ 33#define LOG_VPORT 0x4000 /* NPIV events */
34#define LOG_ALL_MSG 0xffff /* LOG all messages */ 34#define LOG_ALL_MSG 0xffff /* LOG all messages */
35 35
36#define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \
37 { if (((mask) &(vport)->cfg_log_verbose) || (level[1] <= '3')) \
38 dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \
39 fmt, (vport)->phba->brd_no, vport->vpi, ##arg); }
40
36#define lpfc_printf_log(phba, level, mask, fmt, arg...) \ 41#define lpfc_printf_log(phba, level, mask, fmt, arg...) \
37 { if (((mask) &(phba)->cfg_log_verbose) || (level[1] <= '3')) \ 42 { if (((mask) &(phba)->pport->cfg_log_verbose) || (level[1] <= '3')) \
38 dev_printk(level, &((phba)->pcidev)->dev, fmt, ##arg); } 43 dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
44 fmt, phba->brd_no, ##arg); }