3 * Copyright (c) 2009, Microsoft Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
19 * Haiyang Zhang <haiyangz@microsoft.com>
20 * Hank Janssen <hjanssen@microsoft.com>
28 /* #include <linux/init.h> */
29 /* #include <linux/module.h> */
33 #define STORVSC 0x0002
35 #define INPUTVSC 0x0008
37 #define VMBUS_DRV 0x0100
38 #define STORVSC_DRV 0x0200
39 #define NETVSC_DRV 0x0400
40 #define INPUTVSC_DRV 0x0800
41 #define BLKVSC_DRV 0x1000
43 #define ALL_MODULES (VMBUS |\
59 #define DEBUG_LVL_ENTEREXIT 8
60 #define DEBUG_RING_LVL 9
62 extern unsigned int vmbus_loglevel
;
64 #define DPRINT(mod, lvl, fmt, args...) do {\
65 if ((mod & (HIWORD(vmbus_loglevel))) && \
66 (lvl <= LOWORD(vmbus_loglevel))) \
67 printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\
70 #define DPRINT_DBG(mod, fmt, args...) do {\
71 if ((mod & (HIWORD(vmbus_loglevel))) && \
72 (DEBUG_LVL <= LOWORD(vmbus_loglevel))) \
73 printk(KERN_DEBUG #mod": %s() " fmt "\n", __func__, ## args);\
76 #define DPRINT_INFO(mod, fmt, args...) do {\
77 if ((mod & (HIWORD(vmbus_loglevel))) && \
78 (INFO_LVL <= LOWORD(vmbus_loglevel))) \
79 printk(KERN_INFO #mod": " fmt "\n", ## args);\
82 #define DPRINT_WARN(mod, fmt, args...) do {\
83 if ((mod & (HIWORD(vmbus_loglevel))) && \
84 (WARNING_LVL <= LOWORD(vmbus_loglevel))) \
85 printk(KERN_WARNING #mod": WARNING! " fmt "\n", ## args);\
88 #define DPRINT_ERR(mod, fmt, args...) do {\
89 if ((mod & (HIWORD(vmbus_loglevel))) && \
90 (ERROR_LVL <= LOWORD(vmbus_loglevel))) \
91 printk(KERN_ERR #mod": %s() ERROR!! " fmt "\n", \
95 #endif /* _LOGGING_H_ */