diff options
Diffstat (limited to 'drivers/scsi/bfa/include/defs/bfa_defs_adapter.h')
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_adapter.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h b/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h new file mode 100644 index 00000000000..8c208fc8e32 --- /dev/null +++ b/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 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 | #ifndef __BFA_DEFS_ADAPTER_H__ | ||
18 | #define __BFA_DEFS_ADAPTER_H__ | ||
19 | |||
20 | #include <protocol/types.h> | ||
21 | #include <defs/bfa_defs_version.h> | ||
22 | #include <defs/bfa_defs_mfg.h> | ||
23 | |||
24 | /** | ||
25 | * BFA adapter level attributes. | ||
26 | */ | ||
27 | enum { | ||
28 | BFA_ADAPTER_SERIAL_NUM_LEN = STRSZ(BFA_MFG_SERIALNUM_SIZE), | ||
29 | /* | ||
30 | *!< adapter serial num length | ||
31 | */ | ||
32 | BFA_ADAPTER_MODEL_NAME_LEN = 16, /* model name length */ | ||
33 | BFA_ADAPTER_MODEL_DESCR_LEN = 128, /* model description length */ | ||
34 | BFA_ADAPTER_MFG_NAME_LEN = 8, /* manufacturer name length */ | ||
35 | BFA_ADAPTER_SYM_NAME_LEN = 64, /* adapter symbolic name length */ | ||
36 | BFA_ADAPTER_OS_TYPE_LEN = 64, /* adapter os type length */ | ||
37 | }; | ||
38 | |||
39 | struct bfa_adapter_attr_s { | ||
40 | char manufacturer[BFA_ADAPTER_MFG_NAME_LEN]; | ||
41 | char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN]; | ||
42 | u32 rsvd1; | ||
43 | char model[BFA_ADAPTER_MODEL_NAME_LEN]; | ||
44 | char model_descr[BFA_ADAPTER_MODEL_DESCR_LEN]; | ||
45 | wwn_t pwwn; | ||
46 | char node_symname[FC_SYMNAME_MAX]; | ||
47 | char hw_ver[BFA_VERSION_LEN]; | ||
48 | char fw_ver[BFA_VERSION_LEN]; | ||
49 | char optrom_ver[BFA_VERSION_LEN]; | ||
50 | char os_type[BFA_ADAPTER_OS_TYPE_LEN]; | ||
51 | struct bfa_mfg_vpd_s vpd; | ||
52 | struct mac_s mac; | ||
53 | |||
54 | u8 nports; | ||
55 | u8 max_speed; | ||
56 | u8 prototype; | ||
57 | char asic_rev; | ||
58 | |||
59 | u8 pcie_gen; | ||
60 | u8 pcie_lanes_orig; | ||
61 | u8 pcie_lanes; | ||
62 | u8 cna_capable; | ||
63 | }; | ||
64 | |||
65 | /** | ||
66 | * BFA adapter level events | ||
67 | * Arguments below are in BFAL context from Mgmt | ||
68 | * BFA_PORT_AEN_ADD: [in]: None [out]: serial_num, pwwn, nports | ||
69 | * BFA_PORT_AEN_REMOVE: [in]: pwwn [out]: serial_num, pwwn, nports | ||
70 | */ | ||
71 | enum bfa_adapter_aen_event { | ||
72 | BFA_ADAPTER_AEN_ADD = 1, /* New Adapter found event */ | ||
73 | BFA_ADAPTER_AEN_REMOVE = 2, /* Adapter removed event */ | ||
74 | }; | ||
75 | |||
76 | struct bfa_adapter_aen_data_s { | ||
77 | char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN]; | ||
78 | u32 nports; /* Number of NPorts */ | ||
79 | wwn_t pwwn; /* WWN of one of its physical port */ | ||
80 | }; | ||
81 | |||
82 | #endif /* __BFA_DEFS_ADAPTER_H__ */ | ||