2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
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
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.
17 #ifndef __BFA_DEFS_ADAPTER_H__
18 #define __BFA_DEFS_ADAPTER_H__
20 #include <protocol/types.h>
21 #include <defs/bfa_defs_version.h>
22 #include <defs/bfa_defs_mfg.h>
25 * BFA adapter level attributes.
28 BFA_ADAPTER_SERIAL_NUM_LEN
= STRSZ(BFA_MFG_SERIALNUM_SIZE
),
30 *!< adapter serial num length
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 */
39 struct bfa_adapter_attr_s
{
40 char manufacturer
[BFA_ADAPTER_MFG_NAME_LEN
];
41 char serial_num
[BFA_ADAPTER_SERIAL_NUM_LEN
];
43 char model
[BFA_ADAPTER_MODEL_NAME_LEN
];
44 char model_descr
[BFA_ADAPTER_MODEL_DESCR_LEN
];
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
;
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
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 */
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 */
82 #endif /* __BFA_DEFS_ADAPTER_H__ */