emlxs.c (82527734) emlxs.c (8f23e9fa)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
8 * You can obtain a copy of the license at
9 * http://www.opensource.org/licenses/cddl1.txt.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright 2009 Emulex. All rights reserved.
23 * Copyright (c) 2004-2011 Emulex. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#define DUMP_SUPPORT
28
29#include <emlxs_mdb.h>
30#include <emlxs_msg.h>
31#include <emlxs_dump.h>
32#include <emlxs_device.h>
33
34/*
35 * MDB module linkage information:
36 */
37
38static const mdb_dcmd_t dcmds[] =
39{
24 * Use is subject to license terms.
25 */
26
27#define DUMP_SUPPORT
28
29#include <emlxs_mdb.h>
30#include <emlxs_msg.h>
31#include <emlxs_dump.h>
32#include <emlxs_device.h>
33
34/*
35 * MDB module linkage information:
36 */
37
38static const mdb_dcmd_t dcmds[] =
39{
40 { "emlxs_msgbuf", "<instance>", "dumps the emlxs driver internal " \
41 "message buffer", emlxs_msgbuf, emlxs_msgbuf_help},
42 { "emlxs_dump", "<type> <instance>", "dumps the emlxs driver " \
43 "firmware core", emlxs_dump, emlxs_dump_help},
40 { DRIVER_NAME"_msgbuf", "<instance>", "dumps the "DRIVER_NAME
41 " driver internal message buffer", emlxs_msgbuf, emlxs_msgbuf_help},
42 { DRIVER_NAME"_dump", "<type> <instance>", "dumps the "DRIVER_NAME
43 " driver firmware core", emlxs_dump, emlxs_dump_help},
44 { NULL }
45};
46
47static const mdb_modinfo_t modinfo =
48{
49 MDB_API_VERSION,
50 dcmds,
51 NULL

--- 195 unchanged lines hidden (view full) ---

247 DRIVER_NAME, entry.instance, entry.vpi);
248 }
249
250 /* Generate the message string */
251 if (msg.buffer[0] != 0) {
252 if (entry.buffer[0] != 0) {
253 mdb_snprintf(merge, sizeof (merge),
254 "[%Y:%03d:%03d:%03d] "
44 { NULL }
45};
46
47static const mdb_modinfo_t modinfo =
48{
49 MDB_API_VERSION,
50 dcmds,
51 NULL

--- 195 unchanged lines hidden (view full) ---

247 DRIVER_NAME, entry.instance, entry.vpi);
248 }
249
250 /* Generate the message string */
251 if (msg.buffer[0] != 0) {
252 if (entry.buffer[0] != 0) {
253 mdb_snprintf(merge, sizeof (merge),
254 "[%Y:%03d:%03d:%03d] "
255 "%6d:[%1X.%04X]%s:%7s:%4d: %s\n(%s)\n",
255 "%6d:[%1X.%04X]%s:%7s:%4d:\n%s\n(%s)\n",
256 entry.id_time.tv_sec,
257 (int)entry.id_time.tv_nsec/1000000,
258 (int)(entry.id_time.tv_nsec/1000)%1000,
259 (int)entry.id_time.tv_nsec%1000,
260 entry.id, entry.fileno,
261 entry.line, driver, level, msg.id,
262 msg.buffer, entry.buffer);
263
264 } else {
265 mdb_snprintf(merge, sizeof (merge),
266 "[%Y:%03d:%03d:%03d] "
256 entry.id_time.tv_sec,
257 (int)entry.id_time.tv_nsec/1000000,
258 (int)(entry.id_time.tv_nsec/1000)%1000,
259 (int)entry.id_time.tv_nsec%1000,
260 entry.id, entry.fileno,
261 entry.line, driver, level, msg.id,
262 msg.buffer, entry.buffer);
263
264 } else {
265 mdb_snprintf(merge, sizeof (merge),
266 "[%Y:%03d:%03d:%03d] "
267 "%6d:[%1X.%04X]%s:%7s:%4d: %s\n",
267 "%6d:[%1X.%04X]%s:%7s:%4d:\n%s\n",
268 entry.id_time.tv_sec,
269 (int)entry.id_time.tv_nsec/1000000,
270 (int)(entry.id_time.tv_nsec/1000)%1000,
271 (int)entry.id_time.tv_nsec%1000,
272 entry.id, entry.fileno,
273 entry.line, driver, level, msg.id,
274 msg.buffer);
275 }

--- 8 unchanged lines hidden (view full) ---

284 (int)entry.id_time.tv_nsec%1000,
285 entry.id, entry.fileno,
286 entry.line, driver, level, msg.id,
287 entry.buffer);
288
289 } else {
290 mdb_snprintf(merge, sizeof (merge),
291 "[%Y:%03d:%03d:%03d] "
268 entry.id_time.tv_sec,
269 (int)entry.id_time.tv_nsec/1000000,
270 (int)(entry.id_time.tv_nsec/1000)%1000,
271 (int)entry.id_time.tv_nsec%1000,
272 entry.id, entry.fileno,
273 entry.line, driver, level, msg.id,
274 msg.buffer);
275 }

--- 8 unchanged lines hidden (view full) ---

284 (int)entry.id_time.tv_nsec%1000,
285 entry.id, entry.fileno,
286 entry.line, driver, level, msg.id,
287 entry.buffer);
288
289 } else {
290 mdb_snprintf(merge, sizeof (merge),
291 "[%Y:%03d:%03d:%03d] "
292 "%6d:[%1X.%04X]%s:%7s:%4d: %s\n",
292 "%6d:[%1X.%04X]%s:%7s:%4d:\n%s\n",
293 entry.id_time.tv_sec,
294 (int)entry.id_time.tv_nsec/1000000,
295 (int)(entry.id_time.tv_nsec/1000)%1000,
296 (int)entry.id_time.tv_nsec%1000,
297 entry.id, entry.fileno,
298 entry.line, driver, level, msg.id,
299 msg.buffer);
300 }

--- 359 unchanged lines hidden ---
293 entry.id_time.tv_sec,
294 (int)entry.id_time.tv_nsec/1000000,
295 (int)(entry.id_time.tv_nsec/1000)%1000,
296 (int)entry.id_time.tv_nsec%1000,
297 entry.id, entry.fileno,
298 entry.line, driver, level, msg.id,
299 msg.buffer);
300 }

--- 359 unchanged lines hidden ---