aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_debug.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-13 23:35:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-13 23:35:54 -0500
commitd83763f4a6adb2f417c3288ee903982985ae949c (patch)
tree610a7cfd32935ce4b555dc832c26ddeb13dcd003 /drivers/scsi/mpt2sas/mpt2sas_debug.h
parent9aa3d651a9199103eb6451aeb0ac1b66a6d770a6 (diff)
parent0a5149ba02bdf75281b8bc94cf6dfa94c527fa6f (diff)
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull final round of SCSI updates from James Bottomley: "Sorry for the delay in this patch which was mostly caused by getting the merger of the mpt2/mpt3sas driver, which was seen as an essential item of maintenance work to do before the drivers diverge too much. Unfortunately, this caused a compile failure (detected by linux-next), which then had to be fixed up and incubated. In addition to the mpt2/3sas rework, there are updates from pm80xx, lpfc, bnx2fc, hpsa, ipr, aacraid, megaraid_sas, storvsc and ufs plus an assortment of changes including some year 2038 issues, a fix for a remove before detach issue in some drivers and a couple of other minor issues" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (141 commits) mpt3sas: fix inline markers on non inline function declarations sd: Clear PS bit before Mode Select. ibmvscsi: set max_lun to 32 ibmvscsi: display default value for max_id, max_lun and max_channel. mptfusion: don't allow negative bytes in kbuf_alloc_2_sgl() scsi: pmcraid: replace struct timeval with ktime_get_real_seconds() mvumi: 64bit value for seconds_since1970 be2iscsi: Fix bogus WARN_ON length check scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice mpt3sas: Bump mpt3sas driver version to 09.102.00.00 mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBAs mpt2sas, mpt3sas: Update the driver versions mpt3sas: setpci reset kernel oops fix mpt3sas: Added OEM Gen2 PnP ID branding names mpt3sas: Refcount fw_events and fix unsafe list usage mpt3sas: Refcount sas_device objects and fix unsafe list usage mpt3sas: sysfs attribute to report Backup Rail Monitor Status mpt3sas: Ported WarpDrive product SSS6200 support mpt3sas: fix for driver fails EEH, recovery from injected pci bus error mpt3sas: Manage MSI-X vectors according to HBA device type ...
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_debug.h')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_debug.h182
1 files changed, 0 insertions, 182 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_debug.h b/drivers/scsi/mpt2sas/mpt2sas_debug.h
deleted file mode 100644
index 277120d45648..000000000000
--- a/drivers/scsi/mpt2sas/mpt2sas_debug.h
+++ /dev/null
@@ -1,182 +0,0 @@
1/*
2 * Logging Support for MPT (Message Passing Technology) based controllers
3 *
4 * This code is based on drivers/scsi/mpt2sas/mpt2_debug.c
5 * Copyright (C) 2007-2014 LSI Corporation
6 * Copyright (C) 20013-2014 Avago Technologies
7 * (mailto: MPT-FusionLinux.pdl@avagotech.com)
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * NO WARRANTY
20 * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
21 * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
22 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
23 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
24 * solely responsible for determining the appropriateness of using and
25 * distributing the Program and assumes all risks associated with its
26 * exercise of rights under this Agreement, including but not limited to
27 * the risks and costs of program errors, damage to or loss of data,
28 * programs or equipment, and unavailability or interruption of operations.
29
30 * DISCLAIMER OF LIABILITY
31 * NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
32 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
34 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
35 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
36 * USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
37 * HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
38
39 * You should have received a copy of the GNU General Public License
40 * along with this program; if not, write to the Free Software
41 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
42 * USA.
43 */
44
45#ifndef MPT2SAS_DEBUG_H_INCLUDED
46#define MPT2SAS_DEBUG_H_INCLUDED
47
48#define MPT_DEBUG 0x00000001
49#define MPT_DEBUG_MSG_FRAME 0x00000002
50#define MPT_DEBUG_SG 0x00000004
51#define MPT_DEBUG_EVENTS 0x00000008
52#define MPT_DEBUG_EVENT_WORK_TASK 0x00000010
53#define MPT_DEBUG_INIT 0x00000020
54#define MPT_DEBUG_EXIT 0x00000040
55#define MPT_DEBUG_FAIL 0x00000080
56#define MPT_DEBUG_TM 0x00000100
57#define MPT_DEBUG_REPLY 0x00000200
58#define MPT_DEBUG_HANDSHAKE 0x00000400
59#define MPT_DEBUG_CONFIG 0x00000800
60#define MPT_DEBUG_DL 0x00001000
61#define MPT_DEBUG_RESET 0x00002000
62#define MPT_DEBUG_SCSI 0x00004000
63#define MPT_DEBUG_IOCTL 0x00008000
64#define MPT_DEBUG_CSMISAS 0x00010000
65#define MPT_DEBUG_SAS 0x00020000
66#define MPT_DEBUG_TRANSPORT 0x00040000
67#define MPT_DEBUG_TASK_SET_FULL 0x00080000
68
69#define MPT_DEBUG_TARGET_MODE 0x00100000
70
71
72/*
73 * CONFIG_SCSI_MPT2SAS_LOGGING - enabled in Kconfig
74 */
75
76#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
77#define MPT_CHECK_LOGGING(IOC, CMD, BITS) \
78{ \
79 if (IOC->logging_level & BITS) \
80 CMD; \
81}
82#else
83#define MPT_CHECK_LOGGING(IOC, CMD, BITS)
84#endif /* CONFIG_SCSI_MPT2SAS_LOGGING */
85
86
87/*
88 * debug macros
89 */
90
91#define dprintk(IOC, CMD) \
92 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG)
93
94#define dsgprintk(IOC, CMD) \
95 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SG)
96
97#define devtprintk(IOC, CMD) \
98 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_EVENTS)
99
100#define dewtprintk(IOC, CMD) \
101 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_EVENT_WORK_TASK)
102
103#define dinitprintk(IOC, CMD) \
104 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_INIT)
105
106#define dexitprintk(IOC, CMD) \
107 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_EXIT)
108
109#define dfailprintk(IOC, CMD) \
110 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_FAIL)
111
112#define dtmprintk(IOC, CMD) \
113 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_TM)
114
115#define dreplyprintk(IOC, CMD) \
116 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_REPLY)
117
118#define dhsprintk(IOC, CMD) \
119 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_HANDSHAKE)
120
121#define dcprintk(IOC, CMD) \
122 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_CONFIG)
123
124#define ddlprintk(IOC, CMD) \
125 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_DL)
126
127#define drsprintk(IOC, CMD) \
128 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_RESET)
129
130#define dsprintk(IOC, CMD) \
131 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SCSI)
132
133#define dctlprintk(IOC, CMD) \
134 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_IOCTL)
135
136#define dcsmisasprintk(IOC, CMD) \
137 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_CSMISAS)
138
139#define dsasprintk(IOC, CMD) \
140 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SAS)
141
142#define dsastransport(IOC, CMD) \
143 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SAS_WIDE)
144
145#define dmfprintk(IOC, CMD) \
146 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_MSG_FRAME)
147
148#define dtsfprintk(IOC, CMD) \
149 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_TASK_SET_FULL)
150
151#define dtransportprintk(IOC, CMD) \
152 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_TRANSPORT)
153
154#define dTMprintk(IOC, CMD) \
155 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_TARGET_MODE)
156
157/* inline functions for dumping debug data*/
158#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
159/**
160 * _debug_dump_mf - print message frame contents
161 * @mpi_request: pointer to message frame
162 * @sz: number of dwords
163 */
164static inline void
165_debug_dump_mf(void *mpi_request, int sz)
166{
167 int i;
168 __le32 *mfp = (__le32 *)mpi_request;
169
170 printk(KERN_INFO "mf:\n\t");
171 for (i = 0; i < sz; i++) {
172 if (i && ((i % 8) == 0))
173 printk("\n\t");
174 printk("%08x ", le32_to_cpu(mfp[i]));
175 }
176 printk("\n");
177}
178#else
179#define _debug_dump_mf(mpi_request, sz)
180#endif /* CONFIG_SCSI_MPT2SAS_LOGGING */
181
182#endif /* MPT2SAS_DEBUG_H_INCLUDED */