Path: blob/master/drivers/infiniband/hw/ipath/ipath_debug.h
15112 views
/*1* Copyright (c) 2006, 2007 QLogic Corporation. All rights reserved.2* Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.3*4* This software is available to you under a choice of one of two5* licenses. You may choose to be licensed under the terms of the GNU6* General Public License (GPL) Version 2, available from the file7* COPYING in the main directory of this source tree, or the8* OpenIB.org BSD license below:9*10* Redistribution and use in source and binary forms, with or11* without modification, are permitted provided that the following12* conditions are met:13*14* - Redistributions of source code must retain the above15* copyright notice, this list of conditions and the following16* disclaimer.17*18* - Redistributions in binary form must reproduce the above19* copyright notice, this list of conditions and the following20* disclaimer in the documentation and/or other materials21* provided with the distribution.22*23* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,24* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF25* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND26* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS27* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN28* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN29* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE30* SOFTWARE.31*/3233#ifndef _IPATH_DEBUG_H34#define _IPATH_DEBUG_H3536#ifndef _IPATH_DEBUGGING /* debugging enabled or not */37#define _IPATH_DEBUGGING 138#endif3940#if _IPATH_DEBUGGING4142/*43* Mask values for debugging. The scheme allows us to compile out any44* of the debug tracing stuff, and if compiled in, to enable or disable45* dynamically. This can be set at modprobe time also:46* modprobe infinipath.ko infinipath_debug=747*/4849#define __IPATH_INFO 0x1 /* generic low verbosity stuff */50#define __IPATH_DBG 0x2 /* generic debug */51#define __IPATH_TRSAMPLE 0x8 /* generate trace buffer sample entries */52/* leave some low verbosity spots open */53#define __IPATH_VERBDBG 0x40 /* very verbose debug */54#define __IPATH_PKTDBG 0x80 /* print packet data */55/* print process startup (init)/exit messages */56#define __IPATH_PROCDBG 0x10057/* print mmap/fault stuff, not using VDBG any more */58#define __IPATH_MMDBG 0x20059#define __IPATH_ERRPKTDBG 0x40060#define __IPATH_USER_SEND 0x1000 /* use user mode send */61#define __IPATH_KERNEL_SEND 0x2000 /* use kernel mode send */62#define __IPATH_EPKTDBG 0x4000 /* print ethernet packet data */63#define __IPATH_IPATHDBG 0x10000 /* Ethernet (IPATH) gen debug */64#define __IPATH_IPATHWARN 0x20000 /* Ethernet (IPATH) warnings */65#define __IPATH_IPATHERR 0x40000 /* Ethernet (IPATH) errors */66#define __IPATH_IPATHPD 0x80000 /* Ethernet (IPATH) packet dump */67#define __IPATH_IPATHTABLE 0x100000 /* Ethernet (IPATH) table dump */68#define __IPATH_LINKVERBDBG 0x200000 /* very verbose linkchange debug */6970#else /* _IPATH_DEBUGGING */7172/*73* define all of these even with debugging off, for the few places that do74* if(infinipath_debug & _IPATH_xyzzy), but in a way that will make the75* compiler eliminate the code76*/7778#define __IPATH_INFO 0x0 /* generic low verbosity stuff */79#define __IPATH_DBG 0x0 /* generic debug */80#define __IPATH_TRSAMPLE 0x0 /* generate trace buffer sample entries */81#define __IPATH_VERBDBG 0x0 /* very verbose debug */82#define __IPATH_PKTDBG 0x0 /* print packet data */83#define __IPATH_PROCDBG 0x0 /* process startup (init)/exit messages */84/* print mmap/fault stuff, not using VDBG any more */85#define __IPATH_MMDBG 0x086#define __IPATH_EPKTDBG 0x0 /* print ethernet packet data */87#define __IPATH_IPATHDBG 0x0 /* Ethernet (IPATH) table dump on */88#define __IPATH_IPATHWARN 0x0 /* Ethernet (IPATH) warnings on */89#define __IPATH_IPATHERR 0x0 /* Ethernet (IPATH) errors on */90#define __IPATH_IPATHPD 0x0 /* Ethernet (IPATH) packet dump on */91#define __IPATH_IPATHTABLE 0x0 /* Ethernet (IPATH) packet dump on */92#define __IPATH_LINKVERBDBG 0x0 /* very verbose linkchange debug */9394#endif /* _IPATH_DEBUGGING */9596#define __IPATH_VERBOSEDBG __IPATH_VERBDBG9798#endif /* _IPATH_DEBUG_H */99100101