Print this page
NEX-5717 import QLogic 16G FC drivers
Reviewed by: Steve Peng <steve.peng@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/sys/fibre-channel/fca/qlc/ql_apps.h
+++ new/usr/src/uts/common/sys/fibre-channel/fca/qlc/ql_apps.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
|
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 -/* Copyright 2009 QLogic Corporation */
22 +/* Copyright 2015 QLogic Corporation */
23 23
24 24 /*
25 25 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 26 * Use is subject to license terms.
27 27 */
28 28
29 29 #ifndef _QL_APPS_H
30 30 #define _QL_APPS_H
31 31
32 32 /*
33 33 * ISP2xxx Solaris Fibre Channel Adapter (FCA) driver header file.
34 34 *
35 35 * ***********************************************************************
36 36 * * **
37 37 * * NOTICE **
38 - * * COPYRIGHT (C) 1996-2009 QLOGIC CORPORATION **
38 + * * COPYRIGHT (C) 1996-2015 QLOGIC CORPORATION **
39 39 * * ALL RIGHTS RESERVED **
40 40 * * **
41 41 * ***********************************************************************
42 42 *
43 43 */
44 44
45 45 #ifdef __cplusplus
46 46 extern "C" {
47 47 #endif
48 48
49 49 #include <sys/scsi/scsi_types.h>
50 50
51 51 /* f/w trace sizes */
52 52 #define FWEXTSIZE (0x4000 * 4) /* bytes - 16kb multiples */
53 53 #define FWFCESIZE (0x4000 * 4) /* bytes - 16kb multiples */
54 54
55 55 /*
56 56 * ISP8100 Extended Initialization Control Block
57 57 */
58 58 typedef struct ql_ext_icb_8100 {
59 59 uint8_t version[2];
60 60 /*
61 61 * BIT 0 = FCF VLAN ID Match
62 62 * BIT 1 = FCF Fabric Name Match
63 63 * BIT 2-7 = Reserved
64 64 */
65 65 uint8_t fcf_vlan_match;
66 66 uint8_t reserved_6[3];
67 67 uint8_t fcf_vlan_id[2];
68 68 uint8_t fcf_fabric_name[8];
69 69 uint8_t reserved_7[14];
70 70 uint8_t spma_proposed_mac_address[6];
71 71 uint8_t reserved_8[28];
72 72 } ql_ext_icb_8100_t;
73 73
74 74 /*
75 75 * Name: Adapter Revsion Level Structure
76 76 *
77 77 * Purpose: Supply various revision levels of h/w and driver
78 78 *
79 79 * Used by:
80 80 * qlctest utility
81 81 *
82 82 */
83 83 typedef struct ql_adapter_revlvl {
84 84 uint16_t isp2200; /* 2200 chip rev level */
85 85 uint16_t risc; /* risc rev level */
86 86 uint16_t frmbfr; /* frame buffer rev level */
87 87 uint16_t riscrom; /* risc rom rev level */
88 88 char qlddv[16]; /* ql driver version string */
89 89 } ql_adapter_revlvl_t;
90 90
91 91 /*
92 92 * Name: Application Mailbox Interface Structure
93 93 *
94 94 * Purpose: Used to pass mailbox data between app and driver.
95 95 *
96 96 * Used by:
97 97 * qlctest utility
98 98 *
99 99 */
100 100 typedef struct app_mbx_cmd {
101 101 uint16_t mb[32];
102 102 uint8_t reserved1[32];
103 103 } app_mbx_cmd_t;
104 104
105 105 /*
|
↓ open down ↓ |
57 lines elided |
↑ open up ↑ |
106 106 * Name: Diagnostic Loopback Parameter Structure
107 107 *
108 108 * Purpose: Used for loopback parameter data
109 109 *
110 110 * Used by:
111 111 * qlctest utility
112 112 *
113 113 */
114 114 #ifndef apps_64bit
115 115 typedef struct lbp {
116 - uint16_t options;
117 - uint32_t transfer_count;
118 - uint16_t transfer_segment_count;
119 - uint16_t receive_segment_count;
120 - uint32_t transfer_data_address;
121 - uint32_t receive_data_address;
122 - uint32_t iteration_count;
116 + uint16_t options;
117 + uint32_t transfer_count;
118 + uint16_t transfer_segment_count;
119 + uint16_t receive_segment_count;
120 + uint32_t transfer_data_address;
121 + uint32_t receive_data_address;
122 + uint32_t iteration_count;
123 123 } lbp_t;
124 124 #else
125 125 typedef struct lbp {
126 - uint16_t options;
127 - uint32_t transfer_count;
128 - uint16_t transfer_segment_count;
129 - uint16_t receive_segment_count;
130 - uint64_t transfer_data_address;
131 - uint64_t receive_data_address;
132 - uint32_t iteration_count;
126 + uint16_t options;
127 + uint32_t transfer_count;
128 + uint16_t transfer_segment_count;
129 + uint16_t receive_segment_count;
130 + uint64_t transfer_data_address;
131 + uint64_t receive_data_address;
132 + uint32_t iteration_count;
133 133 } lbp_t;
134 134 #endif
135 135
136 136 /*
137 137 * Defines used by:
138 138 * qlctest utility
139 139 *
140 140 * Prupose:
141 141 * diag switch clause hooks provided for requested diagnostic
142 142 * functionality (Check command Queue, Revision Level, Firmwware
143 143 * Checksum, Self Test, Loopback Mailbox, Loopback Data, Execute
144 144 * Firmware and send ECHO.
145 145 */
146 146 #define QL_DIAG_CHKCMDQUE 0
147 147 #define QL_DIAG_FMWCHKSUM 1
148 148 #define QL_DIAG_SLFTST 2
149 149 #define QL_DIAG_REVLVL 3
150 150 #define QL_DIAG_LPBMBX 4
151 151 #define QL_DIAG_LPBDTA 5
152 152 #define QL_DIAG_EXEFMW 6
153 153 #define QL_GET_ADAPTER_FEATURE_BITS 7
154 154 #define QL_SET_ADAPTER_FEATURE_BITS 8
155 155 #define QL_SET_ADAPTER_NVRAM_DEFAULTS 9
156 156 #define QL_DIAG_ECHO 10
157 157
158 158 /*
159 159 * Defines used for:
160 160 * qladm utility
161 161 * qlctest utility
162 162 *
163 163 * Purpose:
164 164 * Driver IOCTL numbers for nvram dump/load, and driverop
165 165 * functions. NB: 300 --> 399 are reserved for qla2x00 foapi's
166 166 */
167 167 #define QL_UTIL_LOAD 100
168 168 #define QL_UTIL_DUMP 101
169 169 #define QL_FOAPI_START 300
170 170 #define QL_FOAPI_END 399
|
↓ open down ↓ |
28 lines elided |
↑ open up ↑ |
171 171 #define QL_ADM_OP 402
172 172
173 173 /*
174 174 * Purpose:
175 175 * QLA_ADM_OP command definitions
176 176 *
177 177 * Used by:
178 178 * qladm utility
179 179 * qlctest utility
180 180 */
181 -typedef enum ql_adm_cmd {
181 +typedef enum ql_adm_cmd {
182 182 QL_EXTENDED_LOGGING,
183 183 QL_ADAPTER_INFO,
184 184 QL_DEVICE_LIST,
185 185 QL_LOOP_RESET,
186 186 QL_FW_DUMP,
187 + QL_FW_DUMP_TRIGGER,
188 + QL_BEACON_ENABLE,
189 + QL_BEACON_DISABLE,
187 190 QL_NVRAM_LOAD,
188 191 QL_NVRAM_DUMP,
189 192 QL_FLASH_LOAD,
190 193 QL_PROP_UPDATE_INT,
191 194 QL_UPDATE_PROPERTIES,
192 195 QL_VPD_LOAD,
193 196 QL_VPD_DUMP,
194 197 QL_VPD_GETTAG,
195 198 QL_UPD_FWMODULE
196 199 } ql_adm_cmd_t;
197 200
198 201 /*
199 202 * Purpose:
200 203 * QLA_ADM_OP Parameter Interface Structure
201 204 *
202 205 * Used by:
203 206 * qladm utility
204 207 * qlctest utility
205 208 */
206 209 typedef struct ql_adm_op {
207 210 uint64_t buffer;
208 211 uint32_t length;
209 212 uint32_t option;
210 213 ql_adm_cmd_t cmd; /* driver_op command */
211 214 } ql_adm_op_t;
212 215
213 216 /*
214 217 * Purpose:
215 218 * QLA_ADM_OP parameter data structure
216 219 *
217 220 * Used by:
218 221 * qladm utility
219 222 * qlctest utility
220 223 */
221 224 #define MAX_PROP_LENGTH 256
222 225 typedef struct ql_adapter_info {
223 226 uint8_t wwpn[8];
224 227 uint32_t d_id;
225 228 uint32_t flash_size;
226 229 uint16_t device_id;
227 230 char fw_ver[MAX_PROP_LENGTH];
228 231 char fcode_ver[MAX_PROP_LENGTH];
229 232 char driver_ver[MAX_PROP_LENGTH];
230 233 } ql_adapter_info_t;
231 234
232 235 /*
233 236 * Purpose:
234 237 * QLA_ADM_OP data types (Fibre channel port types)
235 238 *
236 239 * Used by:
237 240 * qladm utility
238 241 * qlctest utility
239 242 */
240 243 typedef enum ql_port_type {
241 244 FCT_UNKNOWN,
242 245 FCT_TAPE,
243 246 FCT_INITIATOR,
244 247 FCT_TARGET
245 248 } ql_port_type_t;
246 249
247 250 /*
248 251 * Purpose:
249 252 * QLA_ADM_OP Device Information Structure
250 253 *
251 254 * Used by:
252 255 * qladm utility
253 256 * qlctest utility
254 257 */
255 258 typedef struct ql_device_info {
256 259 uint8_t wwpn[8];
257 260 uint32_t address;
258 261 ql_port_type_t type;
259 262 uint16_t loop_id;
260 263 } ql_device_info_t;
261 264
262 265 #ifdef __cplusplus
263 266 }
264 267 #endif
265 268
266 269 #endif /* _QL_APPS_H */
|
↓ open down ↓ |
70 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX