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.
18 #ifndef __BFI_FABRIC_H__
19 #define __BFI_FABRIC_H__
25 enum bfi_fabric_h2i_msgs
{
26 BFI_FABRIC_H2I_CREATE_REQ
= 1,
27 BFI_FABRIC_H2I_DELETE_REQ
= 2,
28 BFI_FABRIC_H2I_SETAUTH
= 3,
31 enum bfi_fabric_i2h_msgs
{
32 BFI_FABRIC_I2H_CREATE_RSP
= BFA_I2HM(1),
33 BFI_FABRIC_I2H_DELETE_RSP
= BFA_I2HM(2),
34 BFI_FABRIC_I2H_SETAUTH_RSP
= BFA_I2HM(3),
35 BFI_FABRIC_I2H_ONLINE
= BFA_I2HM(4),
36 BFI_FABRIC_I2H_OFFLINE
= BFA_I2HM(5),
39 struct bfi_fabric_create_req_s
{
40 bfi_mhdr_t mh
; /* common msg header */
41 u8 vf_en
; /* virtual fabric enable */
43 u16 vf_id
; /* virtual fabric ID */
44 wwn_t pwwn
; /* port name */
45 wwn_t nwwn
; /* node name */
48 struct bfi_fabric_create_rsp_s
{
49 bfi_mhdr_t mh
; /* common msg header */
50 u16 bfa_handle
; /* host fabric handle */
51 u8 status
; /* fabric create status */
55 struct bfi_fabric_delete_req_s
{
56 bfi_mhdr_t mh
; /* common msg header */
57 u16 fw_handle
; /* firmware fabric handle */
61 struct bfi_fabric_delete_rsp_s
{
62 bfi_mhdr_t mh
; /* common msg header */
63 u16 bfa_handle
; /* host fabric handle */
64 u8 status
; /* fabric deletion status */
68 #define BFI_FABRIC_AUTHSECRET_LEN 64
69 struct bfi_fabric_setauth_req_s
{
70 bfi_mhdr_t mh
; /* common msg header */
71 u16 fw_handle
; /* f/w handle of fabric */
74 u8 secret
[BFI_FABRIC_AUTHSECRET_LEN
];
77 union bfi_fabric_h2i_msg_u
{
79 struct bfi_fabric_create_req_s
*create_req
;
80 struct bfi_fabric_delete_req_s
*delete_req
;
83 union bfi_fabric_i2h_msg_u
{
85 struct bfi_fabric_create_rsp_s
*create_rsp
;
86 struct bfi_fabric_delete_rsp_s
*delete_rsp
;
91 #endif /* __BFI_FABRIC_H__ */