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 __BFA_PORT_PRIV_H__
19 #define __BFA_PORT_PRIV_H__
21 #include <defs/bfa_defs_pport.h>
22 #include <bfi/bfi_pport.h>
23 #include "bfa_intr_priv.h"
26 * BFA physical port data structure
29 struct bfa_s
*bfa
; /* parent BFA instance */
30 bfa_sm_t sm
; /* port state machine */
31 wwn_t nwwn
; /* node wwn of physical port */
32 wwn_t pwwn
; /* port wwn of physical oprt */
33 enum bfa_pport_speed speed_sup
;
34 /* supported speeds */
35 enum bfa_pport_speed speed
; /* current speed */
36 enum bfa_pport_topology topology
; /* current topology */
37 u8 myalpa
; /* my ALPA in LOOP topology */
39 struct bfa_pport_cfg_s cfg
; /* current port configuration */
40 struct bfa_qos_attr_s qos_attr
; /* QoS Attributes */
41 struct bfa_qos_vc_attr_s qos_vc_attr
; /* VC info from ELP */
42 struct bfa_reqq_wait_s reqq_wait
;
43 /* to wait for room in reqq */
44 struct bfa_reqq_wait_s svcreq_wait
;
45 /* to wait for room in reqq */
46 struct bfa_reqq_wait_s stats_reqq_wait
;
47 /* to wait for room in reqq (stats) */
49 void (*event_cbfn
) (void *cbarg
,
50 bfa_pport_event_t event
);
52 union bfi_pport_i2h_msg_u i2hmsg
;
54 void *bfad
; /* BFA driver handle */
55 struct bfa_cb_qe_s hcb_qe
; /* BFA callback queue elem */
56 enum bfa_pport_linkstate hcb_event
;
57 /* link event for callback */
58 u32 msgtag
; /* fimrware msg tag for reply */
61 union bfa_pport_stats_u
*stats
; /* pport stats */
64 struct bfa_timer_s timer
; /* timer */
65 union bfa_pport_stats_u
*stats_ret
;
66 /* driver stats location */
67 bfa_status_t stats_status
;
68 /* stats/statsclr status */
69 bfa_boolean_t stats_busy
;
70 /* outstanding stats/statsclr */
71 bfa_boolean_t stats_qfull
;
72 bfa_boolean_t diag_busy
;
73 /* diag busy status */
75 /* port beacon status */
76 bfa_boolean_t link_e2e_beacon
;
77 /* link beacon status */
78 bfa_cb_pport_t stats_cbfn
;
79 /* driver callback function */
81 /* *!< user callback arg */
84 #define BFA_PORT_MOD(__bfa) (&(__bfa)->modules.pport)
89 void bfa_pport_isr(struct bfa_s
*bfa
, struct bfi_msg_s
*msg
);
90 #endif /* __BFA_PORT_PRIV_H__ */