blob: 39fd2b843bec917f08993f32b3b7a3a9a0dbbeb3 [file] [log] [blame]
dea31012005-04-17 16:05:31 -05001/*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for *
James.Smart@Emulex.Comc44ce172005-06-25 10:34:39 -04003 * Fibre Channel Host Bus Adapters. *
James Smart7f5f3d02008-02-08 18:50:14 -05004 * Copyright (C) 2004-2008 Emulex. All rights reserved. *
James.Smart@Emulex.Comc44ce172005-06-25 10:34:39 -04005 * EMULEX and SLI are trademarks of Emulex. *
dea31012005-04-17 16:05:31 -05006 * www.emulex.com *
7 * *
8 * This program is free software; you can redistribute it and/or *
James.Smart@Emulex.Comc44ce172005-06-25 10:34:39 -04009 * modify it under the terms of version 2 of the GNU General *
10 * Public License as published by the Free Software Foundation. *
11 * This program is distributed in the hope that it will be useful. *
12 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
13 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
14 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
15 * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
16 * TO BE LEGALLY INVALID. See the GNU General Public License for *
17 * more details, a copy of which can be found in the file COPYING *
18 * included with this package. *
dea31012005-04-17 16:05:31 -050019 *******************************************************************/
20
dea31012005-04-17 16:05:31 -050021#define LOG_ELS 0x1 /* ELS events */
22#define LOG_DISCOVERY 0x2 /* Link discovery events */
23#define LOG_MBOX 0x4 /* Mailbox events */
24#define LOG_INIT 0x8 /* Initialization events */
25#define LOG_LINK_EVENT 0x10 /* Link events */
26#define LOG_IP 0x20 /* IP traffic history */
27#define LOG_FCP 0x40 /* FCP traffic history */
28#define LOG_NODE 0x80 /* Node table events */
James Smart57127f12007-10-27 13:37:05 -040029#define LOG_TEMP 0x100 /* Temperature sensor events */
dea31012005-04-17 16:05:31 -050030#define LOG_MISC 0x400 /* Miscellaneous events */
31#define LOG_SLI 0x800 /* SLI events */
James Smartc7743952006-12-02 13:34:42 -050032#define LOG_FCP_ERROR 0x1000 /* log errors, not underruns */
dea31012005-04-17 16:05:31 -050033#define LOG_LIBDFC 0x2000 /* Libdfc events */
James Smart92d7f7b2007-06-17 19:56:38 -050034#define LOG_VPORT 0x4000 /* NPIV events */
dea31012005-04-17 16:05:31 -050035#define LOG_ALL_MSG 0xffff /* LOG all messages */
36
James Smarte8b62012007-08-02 11:10:09 -040037#define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \
James Smart7f5f3d02008-02-08 18:50:14 -050038 do { \
James Smarte8b62012007-08-02 11:10:09 -040039 { if (((mask) &(vport)->cfg_log_verbose) || (level[1] <= '3')) \
40 dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \
James Smart7f5f3d02008-02-08 18:50:14 -050041 fmt, (vport)->phba->brd_no, vport->vpi, ##arg); } \
42 } while (0)
James Smarte8b62012007-08-02 11:10:09 -040043
dea31012005-04-17 16:05:31 -050044#define lpfc_printf_log(phba, level, mask, fmt, arg...) \
James Smart7f5f3d02008-02-08 18:50:14 -050045 do { \
James Smarte8b62012007-08-02 11:10:09 -040046 { if (((mask) &(phba)->pport->cfg_log_verbose) || (level[1] <= '3')) \
47 dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
James Smart7f5f3d02008-02-08 18:50:14 -050048 fmt, phba->brd_no, ##arg); } \
49 } while (0)