Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lpfc_nl.h
Go to the documentation of this file.
1 /*******************************************************************
2  * This file is part of the Emulex Linux Device Driver for *
3  * Fibre Channel Host Bus Adapters. *
4  * Copyright (C) 2010 Emulex. All rights reserved. *
5  * EMULEX and SLI are trademarks of Emulex. *
6  * www.emulex.com *
7  * *
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  *******************************************************************/
20 
21 /* Event definitions for RegisterForEvent */
22 #define FC_REG_LINK_EVENT 0x0001 /* link up / down events */
23 #define FC_REG_RSCN_EVENT 0x0002 /* RSCN events */
24 #define FC_REG_CT_EVENT 0x0004 /* CT request events */
25 #define FC_REG_DUMP_EVENT 0x0010 /* Dump events */
26 #define FC_REG_TEMPERATURE_EVENT 0x0020 /* temperature events */
27 #define FC_REG_VPORTRSCN_EVENT 0x0040 /* Vport RSCN events */
28 #define FC_REG_ELS_EVENT 0x0080 /* lpfc els events */
29 #define FC_REG_FABRIC_EVENT 0x0100 /* lpfc fabric events */
30 #define FC_REG_SCSI_EVENT 0x0200 /* lpfc scsi events */
31 #define FC_REG_BOARD_EVENT 0x0400 /* lpfc board events */
32 #define FC_REG_ADAPTER_EVENT 0x0800 /* lpfc adapter events */
33 #define FC_REG_EVENT_MASK (FC_REG_LINK_EVENT | \
34  FC_REG_RSCN_EVENT | \
35  FC_REG_CT_EVENT | \
36  FC_REG_DUMP_EVENT | \
37  FC_REG_TEMPERATURE_EVENT | \
38  FC_REG_VPORTRSCN_EVENT | \
39  FC_REG_ELS_EVENT | \
40  FC_REG_FABRIC_EVENT | \
41  FC_REG_SCSI_EVENT | \
42  FC_REG_BOARD_EVENT | \
43  FC_REG_ADAPTER_EVENT)
44 /* Temperature events */
45 #define LPFC_CRIT_TEMP 0x1
46 #define LPFC_THRESHOLD_TEMP 0x2
47 #define LPFC_NORMAL_TEMP 0x3
48 /*
49  * All net link event payloads will begin with and event type
50  * and subcategory. The event type must come first.
51  * The subcategory further defines the data that follows in the rest
52  * of the payload. Each category will have its own unique header plus
53  * any additional data unique to the subcategory.
54  * The payload sent via the fc transport is one-way driver->application.
55  */
56 
57 /* RSCN event header */
60  uint32_t payload_length; /* RSCN data length in bytes */
62 };
63 
64 /* els event header */
70 };
71 
72 /* subcategory codes for FC_REG_ELS_EVENT */
73 #define LPFC_EVENT_PLOGI_RCV 0x01
74 #define LPFC_EVENT_PRLO_RCV 0x02
75 #define LPFC_EVENT_ADISC_RCV 0x04
76 #define LPFC_EVENT_LSRJT_RCV 0x08
77 #define LPFC_EVENT_LOGO_RCV 0x10
78 
79 /* special els lsrjt event */
85 };
86 
87 /* special els logo event */
91 };
92 
93 /* fabric event header */
99 };
100 
101 /* subcategory codes for FC_REG_FABRIC_EVENT */
102 #define LPFC_EVENT_FABRIC_BUSY 0x01
103 #define LPFC_EVENT_PORT_BUSY 0x02
104 #define LPFC_EVENT_FCPRDCHKERR 0x04
105 
106 /* special case fabric fcprdchkerr event */
112 };
113 
114 
115 /* scsi event header */
122 };
123 
124 /* subcategory codes for FC_REG_SCSI_EVENT */
125 #define LPFC_EVENT_QFULL 0x0001
126 #define LPFC_EVENT_DEVBSY 0x0002
127 #define LPFC_EVENT_CHECK_COND 0x0004
128 #define LPFC_EVENT_LUNRESET 0x0008
129 #define LPFC_EVENT_TGTRESET 0x0010
130 #define LPFC_EVENT_BUSRESET 0x0020
131 #define LPFC_EVENT_VARQUEDEPTH 0x0040
132 
133 /* special case scsi varqueuedepth event */
138 };
139 
140 /* special case scsi check condition event */
147 };
148 
149 /* event codes for FC_REG_BOARD_EVENT */
150 #define LPFC_EVENT_PORTINTERR 0x01
151 
152 /* board event header */
156 };
157 
158 
159 /* event codes for FC_REG_ADAPTER_EVENT */
160 #define LPFC_EVENT_ARRIVAL 0x01
161 
162 /* adapter event header */
166 };
167 
168 
169 /* event codes for temp_event */
170 #define LPFC_CRIT_TEMP 0x1
171 #define LPFC_THRESHOLD_TEMP 0x2
172 #define LPFC_NORMAL_TEMP 0x3
173 
174 struct temp_event {
178 };
179