blob: 7dbf3624d16938f60908f2548f487548fe613a6b [file] [log] [blame]
Krishna Gudipatia36c61f2010-09-15 11:50:55 -07001/*
2 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
3 * All rights reserved
4 * www.brocade.com
5 *
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License (GPL) Version 2 as
10 * published by the Free Software Foundation
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 */
17
18#ifndef __BFA_DEFS_H__
19#define __BFA_DEFS_H__
20
21#include "bfa_fc.h"
Maggie Zhangf16a1752010-12-09 19:12:32 -080022#include "bfad_drv.h"
Krishna Gudipatia36c61f2010-09-15 11:50:55 -070023
24#define BFA_MFG_SERIALNUM_SIZE 11
25#define STRSZ(_n) (((_n) + 4) & ~3)
26
Jing Huangacdc79a2010-10-18 17:15:55 -070027/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -070028 * Manufacturing card type
29 */
30enum {
31 BFA_MFG_TYPE_CB_MAX = 825, /* Crossbow card type max */
32 BFA_MFG_TYPE_FC8P2 = 825, /* 8G 2port FC card */
33 BFA_MFG_TYPE_FC8P1 = 815, /* 8G 1port FC card */
34 BFA_MFG_TYPE_FC4P2 = 425, /* 4G 2port FC card */
35 BFA_MFG_TYPE_FC4P1 = 415, /* 4G 1port FC card */
36 BFA_MFG_TYPE_CNA10P2 = 1020, /* 10G 2port CNA card */
37 BFA_MFG_TYPE_CNA10P1 = 1010, /* 10G 1port CNA card */
38 BFA_MFG_TYPE_JAYHAWK = 804, /* Jayhawk mezz card */
39 BFA_MFG_TYPE_WANCHESE = 1007, /* Wanchese mezz card */
40 BFA_MFG_TYPE_ASTRA = 807, /* Astra mezz card */
41 BFA_MFG_TYPE_LIGHTNING_P0 = 902, /* Lightning mezz card - old */
42 BFA_MFG_TYPE_LIGHTNING = 1741, /* Lightning mezz card */
Krishna Gudipati8b070b42011-06-13 15:52:40 -070043 BFA_MFG_TYPE_PROWLER_F = 1560, /* Prowler FC only cards */
44 BFA_MFG_TYPE_PROWLER_N = 1410, /* Prowler NIC only cards */
45 BFA_MFG_TYPE_PROWLER_C = 1710, /* Prowler CNA only cards */
46 BFA_MFG_TYPE_PROWLER_D = 1860, /* Prowler Dual cards */
47 BFA_MFG_TYPE_CHINOOK = 1867, /* Chinook cards */
48 BFA_MFG_TYPE_INVALID = 0, /* Invalid card type */
Krishna Gudipatia36c61f2010-09-15 11:50:55 -070049};
50
51#pragma pack(1)
52
Jing Huangacdc79a2010-10-18 17:15:55 -070053/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -070054 * Check if Mezz card
55 */
56#define bfa_mfg_is_mezz(type) (( \
57 (type) == BFA_MFG_TYPE_JAYHAWK || \
58 (type) == BFA_MFG_TYPE_WANCHESE || \
59 (type) == BFA_MFG_TYPE_ASTRA || \
60 (type) == BFA_MFG_TYPE_LIGHTNING_P0 || \
Krishna Gudipati8b070b42011-06-13 15:52:40 -070061 (type) == BFA_MFG_TYPE_LIGHTNING || \
62 (type) == BFA_MFG_TYPE_CHINOOK))
Krishna Gudipatia36c61f2010-09-15 11:50:55 -070063
Jing Huangacdc79a2010-10-18 17:15:55 -070064/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -070065 * Check if the card having old wwn/mac handling
66 */
67#define bfa_mfg_is_old_wwn_mac_model(type) (( \
68 (type) == BFA_MFG_TYPE_FC8P2 || \
69 (type) == BFA_MFG_TYPE_FC8P1 || \
70 (type) == BFA_MFG_TYPE_FC4P2 || \
71 (type) == BFA_MFG_TYPE_FC4P1 || \
72 (type) == BFA_MFG_TYPE_CNA10P2 || \
73 (type) == BFA_MFG_TYPE_CNA10P1 || \
74 (type) == BFA_MFG_TYPE_JAYHAWK || \
75 (type) == BFA_MFG_TYPE_WANCHESE))
76
77#define bfa_mfg_increment_wwn_mac(m, i) \
78do { \
79 u32 t = ((u32)(m)[0] << 16) | ((u32)(m)[1] << 8) | \
80 (u32)(m)[2]; \
81 t += (i); \
82 (m)[0] = (t >> 16) & 0xFF; \
83 (m)[1] = (t >> 8) & 0xFF; \
84 (m)[2] = t & 0xFF; \
85} while (0)
86
Jing Huangacdc79a2010-10-18 17:15:55 -070087/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -070088 * VPD data length
89 */
90#define BFA_MFG_VPD_LEN 512
91
Jing Huangacdc79a2010-10-18 17:15:55 -070092/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -070093 * VPD vendor tag
94 */
95enum {
96 BFA_MFG_VPD_UNKNOWN = 0, /* vendor unknown */
97 BFA_MFG_VPD_IBM = 1, /* vendor IBM */
98 BFA_MFG_VPD_HP = 2, /* vendor HP */
99 BFA_MFG_VPD_DELL = 3, /* vendor DELL */
100 BFA_MFG_VPD_PCI_IBM = 0x08, /* PCI VPD IBM */
101 BFA_MFG_VPD_PCI_HP = 0x10, /* PCI VPD HP */
102 BFA_MFG_VPD_PCI_DELL = 0x20, /* PCI VPD DELL */
103 BFA_MFG_VPD_PCI_BRCD = 0xf8, /* PCI VPD Brocade */
104};
105
Jing Huangacdc79a2010-10-18 17:15:55 -0700106/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700107 * All numerical fields are in big-endian format.
108 */
109struct bfa_mfg_vpd_s {
110 u8 version; /* vpd data version */
111 u8 vpd_sig[3]; /* characters 'V', 'P', 'D' */
112 u8 chksum; /* u8 checksum */
113 u8 vendor; /* vendor */
114 u8 len; /* vpd data length excluding header */
115 u8 rsv;
116 u8 data[BFA_MFG_VPD_LEN]; /* vpd data */
117};
118
119#pragma pack()
120
Jing Huangacdc79a2010-10-18 17:15:55 -0700121/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700122 * Status return values
123 */
124enum bfa_status {
125 BFA_STATUS_OK = 0, /* Success */
126 BFA_STATUS_FAILED = 1, /* Operation failed */
127 BFA_STATUS_EINVAL = 2, /* Invalid params Check input
128 * parameters */
129 BFA_STATUS_ENOMEM = 3, /* Out of resources */
130 BFA_STATUS_ETIMER = 5, /* Timer expired - Retry, if persists,
131 * contact support */
132 BFA_STATUS_EPROTOCOL = 6, /* Protocol error */
133 BFA_STATUS_DEVBUSY = 13, /* Device busy - Retry operation */
134 BFA_STATUS_UNKNOWN_LWWN = 18, /* LPORT PWWN not found */
135 BFA_STATUS_UNKNOWN_RWWN = 19, /* RPORT PWWN not found */
136 BFA_STATUS_VPORT_EXISTS = 21, /* VPORT already exists */
137 BFA_STATUS_VPORT_MAX = 22, /* Reached max VPORT supported limit */
138 BFA_STATUS_UNSUPP_SPEED = 23, /* Invalid Speed Check speed setting */
139 BFA_STATUS_INVLD_DFSZ = 24, /* Invalid Max data field size */
140 BFA_STATUS_FABRIC_RJT = 29, /* Reject from attached fabric */
141 BFA_STATUS_VPORT_WWN_BP = 46, /* WWN is same as base port's WWN */
142 BFA_STATUS_NO_FCPIM_NEXUS = 52, /* No FCP Nexus exists with the rport */
143 BFA_STATUS_IOC_FAILURE = 56, /* IOC failure - Retry, if persists
144 * contact support */
145 BFA_STATUS_INVALID_WWN = 57, /* Invalid WWN */
146 BFA_STATUS_DIAG_BUSY = 71, /* diag busy */
147 BFA_STATUS_ENOFSAVE = 78, /* No saved firmware trace */
148 BFA_STATUS_IOC_DISABLED = 82, /* IOC is already disabled */
149 BFA_STATUS_INVALID_MAC = 134, /* Invalid MAC address */
150 BFA_STATUS_PBC = 154, /* Operation not allowed for pre-boot
151 * configuration */
152 BFA_STATUS_TRUNK_ENABLED = 164, /* Trunk is already enabled on
153 * this adapter */
154 BFA_STATUS_TRUNK_DISABLED = 165, /* Trunking is disabled on
155 * the adapter */
156 BFA_STATUS_IOPROFILE_OFF = 175, /* IO profile OFF */
157 BFA_STATUS_MAX_VAL /* Unknown error code */
158};
159#define bfa_status_t enum bfa_status
160
161enum bfa_eproto_status {
162 BFA_EPROTO_BAD_ACCEPT = 0,
163 BFA_EPROTO_UNKNOWN_RSP = 1
164};
165#define bfa_eproto_status_t enum bfa_eproto_status
166
167enum bfa_boolean {
168 BFA_FALSE = 0,
169 BFA_TRUE = 1
170};
171#define bfa_boolean_t enum bfa_boolean
172
173#define BFA_STRING_32 32
174#define BFA_VERSION_LEN 64
175
Jing Huangacdc79a2010-10-18 17:15:55 -0700176/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700177 * ---------------------- adapter definitions ------------
178 */
179
Jing Huangacdc79a2010-10-18 17:15:55 -0700180/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700181 * BFA adapter level attributes.
182 */
183enum {
184 BFA_ADAPTER_SERIAL_NUM_LEN = STRSZ(BFA_MFG_SERIALNUM_SIZE),
185 /*
186 *!< adapter serial num length
187 */
188 BFA_ADAPTER_MODEL_NAME_LEN = 16, /* model name length */
189 BFA_ADAPTER_MODEL_DESCR_LEN = 128, /* model description length */
190 BFA_ADAPTER_MFG_NAME_LEN = 8, /* manufacturer name length */
191 BFA_ADAPTER_SYM_NAME_LEN = 64, /* adapter symbolic name length */
192 BFA_ADAPTER_OS_TYPE_LEN = 64, /* adapter os type length */
193};
194
195struct bfa_adapter_attr_s {
196 char manufacturer[BFA_ADAPTER_MFG_NAME_LEN];
197 char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN];
198 u32 card_type;
199 char model[BFA_ADAPTER_MODEL_NAME_LEN];
200 char model_descr[BFA_ADAPTER_MODEL_DESCR_LEN];
201 wwn_t pwwn;
202 char node_symname[FC_SYMNAME_MAX];
203 char hw_ver[BFA_VERSION_LEN];
204 char fw_ver[BFA_VERSION_LEN];
205 char optrom_ver[BFA_VERSION_LEN];
206 char os_type[BFA_ADAPTER_OS_TYPE_LEN];
207 struct bfa_mfg_vpd_s vpd;
208 struct mac_s mac;
209
210 u8 nports;
211 u8 max_speed;
212 u8 prototype;
213 char asic_rev;
214
215 u8 pcie_gen;
216 u8 pcie_lanes_orig;
217 u8 pcie_lanes;
218 u8 cna_capable;
219
220 u8 is_mezz;
221 u8 trunk_capable;
222};
223
Jing Huangacdc79a2010-10-18 17:15:55 -0700224/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700225 * ---------------------- IOC definitions ------------
226 */
227
228enum {
229 BFA_IOC_DRIVER_LEN = 16,
230 BFA_IOC_CHIP_REV_LEN = 8,
231};
232
Jing Huangacdc79a2010-10-18 17:15:55 -0700233/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700234 * Driver and firmware versions.
235 */
236struct bfa_ioc_driver_attr_s {
237 char driver[BFA_IOC_DRIVER_LEN]; /* driver name */
238 char driver_ver[BFA_VERSION_LEN]; /* driver version */
239 char fw_ver[BFA_VERSION_LEN]; /* firmware version */
240 char bios_ver[BFA_VERSION_LEN]; /* bios version */
241 char efi_ver[BFA_VERSION_LEN]; /* EFI version */
242 char ob_ver[BFA_VERSION_LEN]; /* openboot version */
243};
244
Jing Huangacdc79a2010-10-18 17:15:55 -0700245/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700246 * IOC PCI device attributes
247 */
248struct bfa_ioc_pci_attr_s {
249 u16 vendor_id; /* PCI vendor ID */
250 u16 device_id; /* PCI device ID */
251 u16 ssid; /* subsystem ID */
252 u16 ssvid; /* subsystem vendor ID */
253 u32 pcifn; /* PCI device function */
254 u32 rsvd; /* padding */
255 char chip_rev[BFA_IOC_CHIP_REV_LEN]; /* chip revision */
256};
257
Jing Huangacdc79a2010-10-18 17:15:55 -0700258/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700259 * IOC states
260 */
261enum bfa_ioc_state {
262 BFA_IOC_UNINIT = 1, /* IOC is in uninit state */
263 BFA_IOC_RESET = 2, /* IOC is in reset state */
264 BFA_IOC_SEMWAIT = 3, /* Waiting for IOC h/w semaphore */
265 BFA_IOC_HWINIT = 4, /* IOC h/w is being initialized */
266 BFA_IOC_GETATTR = 5, /* IOC is being configured */
267 BFA_IOC_OPERATIONAL = 6, /* IOC is operational */
268 BFA_IOC_INITFAIL = 7, /* IOC hardware failure */
269 BFA_IOC_FAIL = 8, /* IOC heart-beat failure */
270 BFA_IOC_DISABLING = 9, /* IOC is being disabled */
271 BFA_IOC_DISABLED = 10, /* IOC is disabled */
272 BFA_IOC_FWMISMATCH = 11, /* IOC f/w different from drivers */
273 BFA_IOC_ENABLING = 12, /* IOC is being enabled */
274};
275
Jing Huangacdc79a2010-10-18 17:15:55 -0700276/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700277 * IOC firmware stats
278 */
279struct bfa_fw_ioc_stats_s {
280 u32 enable_reqs;
281 u32 disable_reqs;
282 u32 get_attr_reqs;
283 u32 dbg_sync;
284 u32 dbg_dump;
285 u32 unknown_reqs;
286};
287
Jing Huangacdc79a2010-10-18 17:15:55 -0700288/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700289 * IOC driver stats
290 */
291struct bfa_ioc_drv_stats_s {
292 u32 ioc_isrs;
293 u32 ioc_enables;
294 u32 ioc_disables;
295 u32 ioc_hbfails;
296 u32 ioc_boots;
297 u32 stats_tmos;
298 u32 hb_count;
299 u32 disable_reqs;
300 u32 enable_reqs;
301 u32 disable_replies;
302 u32 enable_replies;
303};
304
Jing Huangacdc79a2010-10-18 17:15:55 -0700305/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700306 * IOC statistics
307 */
308struct bfa_ioc_stats_s {
309 struct bfa_ioc_drv_stats_s drv_stats; /* driver IOC stats */
310 struct bfa_fw_ioc_stats_s fw_stats; /* firmware IOC stats */
311};
312
313enum bfa_ioc_type_e {
314 BFA_IOC_TYPE_FC = 1,
315 BFA_IOC_TYPE_FCoE = 2,
316 BFA_IOC_TYPE_LL = 3,
317};
318
Jing Huangacdc79a2010-10-18 17:15:55 -0700319/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700320 * IOC attributes returned in queries
321 */
322struct bfa_ioc_attr_s {
323 enum bfa_ioc_type_e ioc_type;
324 enum bfa_ioc_state state; /* IOC state */
325 struct bfa_adapter_attr_s adapter_attr; /* HBA attributes */
326 struct bfa_ioc_driver_attr_s driver_attr; /* driver attr */
327 struct bfa_ioc_pci_attr_s pci_attr;
328 u8 port_id; /* port number */
329 u8 rsvd[7]; /* 64bit align */
330};
331
Jing Huangacdc79a2010-10-18 17:15:55 -0700332/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700333 * ---------------------- mfg definitions ------------
334 */
335
Jing Huangacdc79a2010-10-18 17:15:55 -0700336/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700337 * Checksum size
338 */
339#define BFA_MFG_CHKSUM_SIZE 16
340
341#define BFA_MFG_PARTNUM_SIZE 14
342#define BFA_MFG_SUPPLIER_ID_SIZE 10
343#define BFA_MFG_SUPPLIER_PARTNUM_SIZE 20
344#define BFA_MFG_SUPPLIER_SERIALNUM_SIZE 20
345#define BFA_MFG_SUPPLIER_REVISION_SIZE 4
Krishna Gudipati8b070b42011-06-13 15:52:40 -0700346/*
347 * Initial capability definition
348 */
349#define BFA_MFG_IC_FC 0x01
350#define BFA_MFG_IC_ETH 0x02
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700351
352#pragma pack(1)
353
Jing Huangacdc79a2010-10-18 17:15:55 -0700354/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700355 * All numerical fields are in big-endian format.
356 */
357struct bfa_mfg_block_s {
358 u8 version; /* manufacturing block version */
359 u8 mfg_sig[3]; /* characters 'M', 'F', 'G' */
360 u16 mfgsize; /* mfg block size */
361 u16 u16_chksum; /* old u16 checksum */
362 char brcd_serialnum[STRSZ(BFA_MFG_SERIALNUM_SIZE)];
363 char brcd_partnum[STRSZ(BFA_MFG_PARTNUM_SIZE)];
364 u8 mfg_day; /* manufacturing day */
365 u8 mfg_month; /* manufacturing month */
366 u16 mfg_year; /* manufacturing year */
367 wwn_t mfg_wwn; /* wwn base for this adapter */
368 u8 num_wwn; /* number of wwns assigned */
369 u8 mfg_speeds; /* speeds allowed for this adapter */
370 u8 rsv[2];
371 char supplier_id[STRSZ(BFA_MFG_SUPPLIER_ID_SIZE)];
372 char supplier_partnum[STRSZ(BFA_MFG_SUPPLIER_PARTNUM_SIZE)];
373 char
374 supplier_serialnum[STRSZ(BFA_MFG_SUPPLIER_SERIALNUM_SIZE)];
375 char
376 supplier_revision[STRSZ(BFA_MFG_SUPPLIER_REVISION_SIZE)];
377 mac_t mfg_mac; /* mac address */
378 u8 num_mac; /* number of mac addresses */
379 u8 rsv2;
380 u32 mfg_type; /* card type */
381 u8 rsv3[108];
382 u8 md5_chksum[BFA_MFG_CHKSUM_SIZE]; /* md5 checksum */
383};
384
385#pragma pack()
386
Jing Huangacdc79a2010-10-18 17:15:55 -0700387/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700388 * ---------------------- pci definitions ------------
389 */
390
Jing Huangacdc79a2010-10-18 17:15:55 -0700391/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700392 * PCI device and vendor ID information
393 */
394enum {
395 BFA_PCI_VENDOR_ID_BROCADE = 0x1657,
396 BFA_PCI_DEVICE_ID_FC_8G2P = 0x13,
397 BFA_PCI_DEVICE_ID_FC_8G1P = 0x17,
398 BFA_PCI_DEVICE_ID_CT = 0x14,
399 BFA_PCI_DEVICE_ID_CT_FC = 0x21,
Krishna Gudipati11189202011-06-13 15:50:35 -0700400 BFA_PCI_DEVICE_ID_CT2 = 0x22,
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700401};
402
Krishna Gudipati11189202011-06-13 15:50:35 -0700403#define bfa_asic_id_cb(__d) \
404 ((__d) == BFA_PCI_DEVICE_ID_FC_8G2P || \
405 (__d) == BFA_PCI_DEVICE_ID_FC_8G1P)
406#define bfa_asic_id_ct(__d) \
407 ((__d) == BFA_PCI_DEVICE_ID_CT || \
408 (__d) == BFA_PCI_DEVICE_ID_CT_FC)
409#define bfa_asic_id_ct2(__d) ((__d) == BFA_PCI_DEVICE_ID_CT2)
410#define bfa_asic_id_ctc(__d) \
411 (bfa_asic_id_ct(__d) || bfa_asic_id_ct2(__d))
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700412
Jing Huangacdc79a2010-10-18 17:15:55 -0700413/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700414 * PCI sub-system device and vendor ID information
415 */
416enum {
417 BFA_PCI_FCOE_SSDEVICE_ID = 0x14,
418};
419
Jing Huangacdc79a2010-10-18 17:15:55 -0700420/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700421 * Maximum number of device address ranges mapped through different BAR(s)
422 */
423#define BFA_PCI_ACCESS_RANGES 1
424
425/*
426 * Port speed settings. Each specific speed is a bit field. Use multiple
427 * bits to specify speeds to be selected for auto-negotiation.
428 */
429enum bfa_port_speed {
430 BFA_PORT_SPEED_UNKNOWN = 0,
431 BFA_PORT_SPEED_1GBPS = 1,
432 BFA_PORT_SPEED_2GBPS = 2,
433 BFA_PORT_SPEED_4GBPS = 4,
434 BFA_PORT_SPEED_8GBPS = 8,
435 BFA_PORT_SPEED_10GBPS = 10,
436 BFA_PORT_SPEED_16GBPS = 16,
437 BFA_PORT_SPEED_AUTO =
438 (BFA_PORT_SPEED_1GBPS | BFA_PORT_SPEED_2GBPS |
Krishna Gudipati8b070b42011-06-13 15:52:40 -0700439 BFA_PORT_SPEED_4GBPS | BFA_PORT_SPEED_8GBPS |
440 BFA_PORT_SPEED_16GBPS),
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700441};
442#define bfa_port_speed_t enum bfa_port_speed
443
444enum {
445 BFA_BOOT_BOOTLUN_MAX = 4, /* maximum boot lun per IOC */
446 BFA_PREBOOT_BOOTLUN_MAX = 8, /* maximum preboot lun per IOC */
447};
448
449#define BOOT_CFG_REV1 1
450#define BOOT_CFG_VLAN 1
451
Jing Huangacdc79a2010-10-18 17:15:55 -0700452/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700453 * Boot options setting. Boot options setting determines from where
454 * to get the boot lun information
455 */
456enum bfa_boot_bootopt {
457 BFA_BOOT_AUTO_DISCOVER = 0, /* Boot from blun provided by fabric */
458 BFA_BOOT_STORED_BLUN = 1, /* Boot from bluns stored in flash */
459 BFA_BOOT_FIRST_LUN = 2, /* Boot from first discovered blun */
460 BFA_BOOT_PBC = 3, /* Boot from pbc configured blun */
461};
462
463#pragma pack(1)
Jing Huangacdc79a2010-10-18 17:15:55 -0700464/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700465 * Boot lun information.
466 */
467struct bfa_boot_bootlun_s {
Maggie Zhangf3148782010-12-09 19:11:39 -0800468 wwn_t pwwn; /* port wwn of target */
469 struct scsi_lun lun; /* 64-bit lun */
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700470};
471#pragma pack()
472
Jing Huangacdc79a2010-10-18 17:15:55 -0700473/*
Krishna Gudipatia36c61f2010-09-15 11:50:55 -0700474 * BOOT boot configuraton
475 */
476struct bfa_boot_pbc_s {
477 u8 enable; /* enable/disable SAN boot */
478 u8 speed; /* boot speed settings */
479 u8 topology; /* boot topology setting */
480 u8 rsvd1;
481 u32 nbluns; /* number of boot luns */
482 struct bfa_boot_bootlun_s pblun[BFA_PREBOOT_BOOTLUN_MAX];
483};
484
485#endif /* __BFA_DEFS_H__ */