1 /*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for *
3 * Fibre Channel Host Bus Adapters. *
4 * Copyright (C) 2007-2011 Emulex. All rights reserved. *
5 * EMULEX and SLI are trademarks of Emulex. *
8 * This program is free software; you can redistribute it and/or *
9 * 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. *
19 *******************************************************************/
21 #ifndef _H_LPFC_DEBUG_FS
22 #define _H_LPFC_DEBUG_FS
24 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
26 /* size of output line, for discovery_trace and slow_ring_trace */
27 #define LPFC_DEBUG_TRC_ENTRY_SIZE 100
29 /* nodelist output buffer size */
30 #define LPFC_NODELIST_SIZE 8192
31 #define LPFC_NODELIST_ENTRY_SIZE 120
33 /* dumpHBASlim output buffer size */
34 #define LPFC_DUMPHBASLIM_SIZE 4096
36 /* dumpHostSlim output buffer size */
37 #define LPFC_DUMPHOSTSLIM_SIZE 4096
39 /* hbqinfo output buffer size */
40 #define LPFC_HBQINFO_SIZE 8192
42 /* rdPciConf output buffer size */
43 #define LPFC_PCI_CFG_SIZE 4096
44 #define LPFC_PCI_CFG_RD_BUF_SIZE (LPFC_PCI_CFG_SIZE/2)
45 #define LPFC_PCI_CFG_RD_SIZE (LPFC_PCI_CFG_SIZE/4)
47 /* queue info output buffer size */
48 #define LPFC_QUE_INFO_GET_BUF_SIZE 2048
50 #define SIZE_U8 sizeof(uint8_t)
51 #define SIZE_U16 sizeof(uint16_t)
52 #define SIZE_U32 sizeof(uint32_t)
57 #define LPFC_IDIAG_OP_RD 1
58 #define LPFC_IDIAG_OP_WR 2
63 struct lpfc_debugfs_trc
{
72 struct lpfc_idiag_offset
{
76 #define LPFC_IDIAG_CMD_DATA_SIZE 4
77 struct lpfc_idiag_cmd
{
79 #define LPFC_IDIAG_CMD_PCICFG_RD 0x00000001
80 #define LPFC_IDIAG_CMD_PCICFG_WR 0x00000002
81 #define LPFC_IDIAG_CMD_PCICFG_ST 0x00000003
82 #define LPFC_IDIAG_CMD_PCICFG_CL 0x00000004
83 uint32_t data
[LPFC_IDIAG_CMD_DATA_SIZE
];
88 struct lpfc_idiag_cmd cmd
;
89 struct lpfc_idiag_offset offset
;
93 /* Mask for discovery_trace */
94 #define LPFC_DISC_TRC_ELS_CMD 0x1 /* Trace ELS commands */
95 #define LPFC_DISC_TRC_ELS_RSP 0x2 /* Trace ELS response */
96 #define LPFC_DISC_TRC_ELS_UNSOL 0x4 /* Trace ELS rcv'ed */
97 #define LPFC_DISC_TRC_ELS_ALL 0x7 /* Trace ELS */
98 #define LPFC_DISC_TRC_MBOX_VPORT 0x8 /* Trace vport MBOXs */
99 #define LPFC_DISC_TRC_MBOX 0x10 /* Trace other MBOXs */
100 #define LPFC_DISC_TRC_MBOX_ALL 0x18 /* Trace all MBOXs */
101 #define LPFC_DISC_TRC_CT 0x20 /* Trace disc CT requests */
102 #define LPFC_DISC_TRC_DSM 0x40 /* Trace DSM events */
103 #define LPFC_DISC_TRC_RPORT 0x80 /* Trace rport events */
104 #define LPFC_DISC_TRC_NODE 0x100 /* Trace ndlp state changes */
106 #define LPFC_DISC_TRC_DISCOVERY 0xef /* common mask for general
108 #endif /* H_LPFC_DEBUG_FS */