diff options
Diffstat (limited to 'drivers/scsi/bfa/include/bfa_svc.h')
-rw-r--r-- | drivers/scsi/bfa/include/bfa_svc.h | 101 |
1 files changed, 57 insertions, 44 deletions
diff --git a/drivers/scsi/bfa/include/bfa_svc.h b/drivers/scsi/bfa/include/bfa_svc.h index 268d956bad89..1349b99a3c6d 100644 --- a/drivers/scsi/bfa/include/bfa_svc.h +++ b/drivers/scsi/bfa/include/bfa_svc.h | |||
@@ -26,6 +26,7 @@ struct bfa_fcxp_s; | |||
26 | #include <defs/bfa_defs_pport.h> | 26 | #include <defs/bfa_defs_pport.h> |
27 | #include <defs/bfa_defs_rport.h> | 27 | #include <defs/bfa_defs_rport.h> |
28 | #include <defs/bfa_defs_qos.h> | 28 | #include <defs/bfa_defs_qos.h> |
29 | #include <defs/bfa_defs_fcport.h> | ||
29 | #include <cs/bfa_sm.h> | 30 | #include <cs/bfa_sm.h> |
30 | #include <bfa.h> | 31 | #include <bfa.h> |
31 | 32 | ||
@@ -35,7 +36,7 @@ struct bfa_fcxp_s; | |||
35 | struct bfa_rport_info_s { | 36 | struct bfa_rport_info_s { |
36 | u16 max_frmsz; /* max rcv pdu size */ | 37 | u16 max_frmsz; /* max rcv pdu size */ |
37 | u32 pid:24, /* remote port ID */ | 38 | u32 pid:24, /* remote port ID */ |
38 | lp_tag:8; | 39 | lp_tag:8; /* tag */ |
39 | u32 local_pid:24, /* local port ID */ | 40 | u32 local_pid:24, /* local port ID */ |
40 | cisc:8; /* CIRO supported */ | 41 | cisc:8; /* CIRO supported */ |
41 | u8 fc_class; /* supported FC classes. enum fc_cos */ | 42 | u8 fc_class; /* supported FC classes. enum fc_cos */ |
@@ -54,7 +55,7 @@ struct bfa_rport_s { | |||
54 | void *rport_drv; /* fcs/driver rport object */ | 55 | void *rport_drv; /* fcs/driver rport object */ |
55 | u16 fw_handle; /* firmware rport handle */ | 56 | u16 fw_handle; /* firmware rport handle */ |
56 | u16 rport_tag; /* BFA rport tag */ | 57 | u16 rport_tag; /* BFA rport tag */ |
57 | struct bfa_rport_info_s rport_info; /* rport info from *fcs/driver */ | 58 | struct bfa_rport_info_s rport_info; /* rport info from fcs/driver */ |
58 | struct bfa_reqq_wait_s reqq_wait; /* to wait for room in reqq */ | 59 | struct bfa_reqq_wait_s reqq_wait; /* to wait for room in reqq */ |
59 | struct bfa_cb_qe_s hcb_qe; /* BFA callback qelem */ | 60 | struct bfa_cb_qe_s hcb_qe; /* BFA callback qelem */ |
60 | struct bfa_rport_hal_stats_s stats; /* BFA rport statistics */ | 61 | struct bfa_rport_hal_stats_s stats; /* BFA rport statistics */ |
@@ -101,7 +102,7 @@ struct bfa_uf_buf_s { | |||
101 | struct bfa_uf_s { | 102 | struct bfa_uf_s { |
102 | struct list_head qe; /* queue element */ | 103 | struct list_head qe; /* queue element */ |
103 | struct bfa_s *bfa; /* bfa instance */ | 104 | struct bfa_s *bfa; /* bfa instance */ |
104 | u16 uf_tag; /* identifying tag f/w messages */ | 105 | u16 uf_tag; /* identifying tag fw msgs */ |
105 | u16 vf_id; | 106 | u16 vf_id; |
106 | u16 src_rport_handle; | 107 | u16 src_rport_handle; |
107 | u16 rsvd; | 108 | u16 rsvd; |
@@ -127,7 +128,7 @@ struct bfa_lps_s { | |||
127 | u8 reqq; /* lport request queue */ | 128 | u8 reqq; /* lport request queue */ |
128 | u8 alpa; /* ALPA for loop topologies */ | 129 | u8 alpa; /* ALPA for loop topologies */ |
129 | u32 lp_pid; /* lport port ID */ | 130 | u32 lp_pid; /* lport port ID */ |
130 | bfa_boolean_t fdisc; /* send FDISC instead of FLOGI*/ | 131 | bfa_boolean_t fdisc; /* send FDISC instead of FLOGI */ |
131 | bfa_boolean_t auth_en; /* enable authentication */ | 132 | bfa_boolean_t auth_en; /* enable authentication */ |
132 | bfa_boolean_t auth_req; /* authentication required */ | 133 | bfa_boolean_t auth_req; /* authentication required */ |
133 | bfa_boolean_t npiv_en; /* NPIV is allowed by peer */ | 134 | bfa_boolean_t npiv_en; /* NPIV is allowed by peer */ |
@@ -151,60 +152,69 @@ struct bfa_lps_s { | |||
151 | bfa_eproto_status_t ext_status; | 152 | bfa_eproto_status_t ext_status; |
152 | }; | 153 | }; |
153 | 154 | ||
155 | #define BFA_FCPORT(_bfa) (&((_bfa)->modules.port)) | ||
156 | |||
154 | /* | 157 | /* |
155 | * bfa pport API functions | 158 | * bfa pport API functions |
156 | */ | 159 | */ |
157 | bfa_status_t bfa_pport_enable(struct bfa_s *bfa); | 160 | bfa_status_t bfa_fcport_enable(struct bfa_s *bfa); |
158 | bfa_status_t bfa_pport_disable(struct bfa_s *bfa); | 161 | bfa_status_t bfa_fcport_disable(struct bfa_s *bfa); |
159 | bfa_status_t bfa_pport_cfg_speed(struct bfa_s *bfa, | 162 | bfa_status_t bfa_fcport_cfg_speed(struct bfa_s *bfa, |
160 | enum bfa_pport_speed speed); | 163 | enum bfa_pport_speed speed); |
161 | enum bfa_pport_speed bfa_pport_get_speed(struct bfa_s *bfa); | 164 | enum bfa_pport_speed bfa_fcport_get_speed(struct bfa_s *bfa); |
162 | bfa_status_t bfa_pport_cfg_topology(struct bfa_s *bfa, | 165 | bfa_status_t bfa_fcport_cfg_topology(struct bfa_s *bfa, |
163 | enum bfa_pport_topology topo); | 166 | enum bfa_pport_topology topo); |
164 | enum bfa_pport_topology bfa_pport_get_topology(struct bfa_s *bfa); | 167 | enum bfa_pport_topology bfa_fcport_get_topology(struct bfa_s *bfa); |
165 | bfa_status_t bfa_pport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa); | 168 | bfa_status_t bfa_fcport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa); |
166 | bfa_boolean_t bfa_pport_get_hardalpa(struct bfa_s *bfa, u8 *alpa); | 169 | bfa_boolean_t bfa_fcport_get_hardalpa(struct bfa_s *bfa, u8 *alpa); |
167 | u8 bfa_pport_get_myalpa(struct bfa_s *bfa); | 170 | u8 bfa_fcport_get_myalpa(struct bfa_s *bfa); |
168 | bfa_status_t bfa_pport_clr_hardalpa(struct bfa_s *bfa); | 171 | bfa_status_t bfa_fcport_clr_hardalpa(struct bfa_s *bfa); |
169 | bfa_status_t bfa_pport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxsize); | 172 | bfa_status_t bfa_fcport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxsize); |
170 | u16 bfa_pport_get_maxfrsize(struct bfa_s *bfa); | 173 | u16 bfa_fcport_get_maxfrsize(struct bfa_s *bfa); |
171 | u32 bfa_pport_mypid(struct bfa_s *bfa); | 174 | u32 bfa_fcport_mypid(struct bfa_s *bfa); |
172 | u8 bfa_pport_get_rx_bbcredit(struct bfa_s *bfa); | 175 | u8 bfa_fcport_get_rx_bbcredit(struct bfa_s *bfa); |
173 | bfa_status_t bfa_pport_trunk_enable(struct bfa_s *bfa, u8 bitmap); | 176 | bfa_status_t bfa_fcport_trunk_enable(struct bfa_s *bfa, u8 bitmap); |
174 | bfa_status_t bfa_pport_trunk_disable(struct bfa_s *bfa); | 177 | bfa_status_t bfa_fcport_trunk_disable(struct bfa_s *bfa); |
175 | bfa_boolean_t bfa_pport_trunk_query(struct bfa_s *bfa, u32 *bitmap); | 178 | bfa_boolean_t bfa_fcport_trunk_query(struct bfa_s *bfa, u32 *bitmap); |
176 | void bfa_pport_get_attr(struct bfa_s *bfa, struct bfa_pport_attr_s *attr); | 179 | void bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_pport_attr_s *attr); |
177 | wwn_t bfa_pport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node); | 180 | wwn_t bfa_fcport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node); |
178 | bfa_status_t bfa_pport_get_stats(struct bfa_s *bfa, | 181 | void bfa_fcport_event_register(struct bfa_s *bfa, |
179 | union bfa_pport_stats_u *stats, | ||
180 | bfa_cb_pport_t cbfn, void *cbarg); | ||
181 | bfa_status_t bfa_pport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, | ||
182 | void *cbarg); | ||
183 | void bfa_pport_event_register(struct bfa_s *bfa, | ||
184 | void (*event_cbfn) (void *cbarg, | 182 | void (*event_cbfn) (void *cbarg, |
185 | bfa_pport_event_t event), void *event_cbarg); | 183 | bfa_pport_event_t event), void *event_cbarg); |
186 | bfa_boolean_t bfa_pport_is_disabled(struct bfa_s *bfa); | 184 | bfa_boolean_t bfa_fcport_is_disabled(struct bfa_s *bfa); |
187 | void bfa_pport_cfg_qos(struct bfa_s *bfa, bfa_boolean_t on_off); | 185 | void bfa_fcport_cfg_qos(struct bfa_s *bfa, bfa_boolean_t on_off); |
188 | void bfa_pport_cfg_ratelim(struct bfa_s *bfa, bfa_boolean_t on_off); | 186 | void bfa_fcport_cfg_ratelim(struct bfa_s *bfa, bfa_boolean_t on_off); |
189 | bfa_status_t bfa_pport_cfg_ratelim_speed(struct bfa_s *bfa, | 187 | bfa_status_t bfa_fcport_cfg_ratelim_speed(struct bfa_s *bfa, |
190 | enum bfa_pport_speed speed); | 188 | enum bfa_pport_speed speed); |
191 | enum bfa_pport_speed bfa_pport_get_ratelim_speed(struct bfa_s *bfa); | 189 | enum bfa_pport_speed bfa_fcport_get_ratelim_speed(struct bfa_s *bfa); |
192 | 190 | ||
193 | void bfa_pport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit); | 191 | void bfa_fcport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit); |
194 | void bfa_pport_busy(struct bfa_s *bfa, bfa_boolean_t status); | 192 | void bfa_fcport_busy(struct bfa_s *bfa, bfa_boolean_t status); |
195 | void bfa_pport_beacon(struct bfa_s *bfa, bfa_boolean_t beacon, | 193 | void bfa_fcport_beacon(struct bfa_s *bfa, bfa_boolean_t beacon, |
196 | bfa_boolean_t link_e2e_beacon); | 194 | bfa_boolean_t link_e2e_beacon); |
197 | void bfa_cb_pport_event(void *cbarg, bfa_pport_event_t event); | 195 | void bfa_cb_pport_event(void *cbarg, bfa_pport_event_t event); |
198 | void bfa_pport_qos_get_attr(struct bfa_s *bfa, struct bfa_qos_attr_s *qos_attr); | 196 | void bfa_fcport_qos_get_attr(struct bfa_s *bfa, |
199 | void bfa_pport_qos_get_vc_attr(struct bfa_s *bfa, | 197 | struct bfa_qos_attr_s *qos_attr); |
198 | void bfa_fcport_qos_get_vc_attr(struct bfa_s *bfa, | ||
200 | struct bfa_qos_vc_attr_s *qos_vc_attr); | 199 | struct bfa_qos_vc_attr_s *qos_vc_attr); |
201 | bfa_status_t bfa_pport_get_qos_stats(struct bfa_s *bfa, | 200 | bfa_status_t bfa_fcport_get_qos_stats(struct bfa_s *bfa, |
202 | union bfa_pport_stats_u *stats, | 201 | union bfa_fcport_stats_u *stats, |
203 | bfa_cb_pport_t cbfn, void *cbarg); | 202 | bfa_cb_pport_t cbfn, void *cbarg); |
204 | bfa_status_t bfa_pport_clear_qos_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, | 203 | bfa_status_t bfa_fcport_clear_qos_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, |
205 | void *cbarg); | 204 | void *cbarg); |
206 | bfa_boolean_t bfa_pport_is_ratelim(struct bfa_s *bfa); | 205 | bfa_status_t bfa_fcport_get_fcoe_stats(struct bfa_s *bfa, |
207 | bfa_boolean_t bfa_pport_is_linkup(struct bfa_s *bfa); | 206 | union bfa_fcport_stats_u *stats, |
207 | bfa_cb_pport_t cbfn, void *cbarg); | ||
208 | bfa_status_t bfa_fcport_clear_fcoe_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, | ||
209 | void *cbarg); | ||
210 | |||
211 | bfa_boolean_t bfa_fcport_is_ratelim(struct bfa_s *bfa); | ||
212 | bfa_boolean_t bfa_fcport_is_linkup(struct bfa_s *bfa); | ||
213 | bfa_status_t bfa_fcport_get_stats(struct bfa_s *bfa, | ||
214 | union bfa_fcport_stats_u *stats, | ||
215 | bfa_cb_pport_t cbfn, void *cbarg); | ||
216 | bfa_status_t bfa_fcport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, | ||
217 | void *cbarg); | ||
208 | 218 | ||
209 | /* | 219 | /* |
210 | * bfa rport API functions | 220 | * bfa rport API functions |
@@ -293,6 +303,7 @@ void bfa_uf_free(struct bfa_uf_s *uf); | |||
293 | * bfa lport service api | 303 | * bfa lport service api |
294 | */ | 304 | */ |
295 | 305 | ||
306 | u32 bfa_lps_get_max_vport(struct bfa_s *bfa); | ||
296 | struct bfa_lps_s *bfa_lps_alloc(struct bfa_s *bfa); | 307 | struct bfa_lps_s *bfa_lps_alloc(struct bfa_s *bfa); |
297 | void bfa_lps_delete(struct bfa_lps_s *lps); | 308 | void bfa_lps_delete(struct bfa_lps_s *lps); |
298 | void bfa_lps_discard(struct bfa_lps_s *lps); | 309 | void bfa_lps_discard(struct bfa_lps_s *lps); |
@@ -315,10 +326,12 @@ wwn_t bfa_lps_get_peer_pwwn(struct bfa_lps_s *lps); | |||
315 | wwn_t bfa_lps_get_peer_nwwn(struct bfa_lps_s *lps); | 326 | wwn_t bfa_lps_get_peer_nwwn(struct bfa_lps_s *lps); |
316 | u8 bfa_lps_get_lsrjt_rsn(struct bfa_lps_s *lps); | 327 | u8 bfa_lps_get_lsrjt_rsn(struct bfa_lps_s *lps); |
317 | u8 bfa_lps_get_lsrjt_expl(struct bfa_lps_s *lps); | 328 | u8 bfa_lps_get_lsrjt_expl(struct bfa_lps_s *lps); |
329 | mac_t bfa_lps_get_lp_mac(struct bfa_lps_s *lps); | ||
318 | void bfa_cb_lps_flogi_comp(void *bfad, void *uarg, bfa_status_t status); | 330 | void bfa_cb_lps_flogi_comp(void *bfad, void *uarg, bfa_status_t status); |
319 | void bfa_cb_lps_flogo_comp(void *bfad, void *uarg); | 331 | void bfa_cb_lps_flogo_comp(void *bfad, void *uarg); |
320 | void bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status); | 332 | void bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status); |
321 | void bfa_cb_lps_fdisclogo_comp(void *bfad, void *uarg); | 333 | void bfa_cb_lps_fdisclogo_comp(void *bfad, void *uarg); |
334 | void bfa_cb_lps_cvl_event(void *bfad, void *uarg); | ||
322 | 335 | ||
323 | #endif /* __BFA_SVC_H__ */ | 336 | #endif /* __BFA_SVC_H__ */ |
324 | 337 | ||