Lines Matching refs:fcport

29 BFA_MODULE(fcport);
158 static bfa_boolean_t bfa_fcport_send_enable(struct bfa_fcport_s *fcport);
159 static bfa_boolean_t bfa_fcport_send_disable(struct bfa_fcport_s *fcport);
160 static void bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport);
161 static void bfa_fcport_reset_linkinfo(struct bfa_fcport_s *fcport);
162 static void bfa_fcport_set_wwns(struct bfa_fcport_s *fcport);
164 static void bfa_fcport_scn(struct bfa_fcport_s *fcport,
176 static void bfa_fcport_sm_uninit(struct bfa_fcport_s *fcport,
178 static void bfa_fcport_sm_enabling_qwait(struct bfa_fcport_s *fcport,
180 static void bfa_fcport_sm_enabling(struct bfa_fcport_s *fcport,
182 static void bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport,
184 static void bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
186 static void bfa_fcport_sm_disabling(struct bfa_fcport_s *fcport,
188 static void bfa_fcport_sm_disabling_qwait(struct bfa_fcport_s *fcport,
190 static void bfa_fcport_sm_toggling_qwait(struct bfa_fcport_s *fcport,
192 static void bfa_fcport_sm_disabled(struct bfa_fcport_s *fcport,
194 static void bfa_fcport_sm_stopped(struct bfa_fcport_s *fcport,
196 static void bfa_fcport_sm_iocdown(struct bfa_fcport_s *fcport,
198 static void bfa_fcport_sm_iocfail(struct bfa_fcport_s *fcport,
2013 bfa_fcport_aen_post(struct bfa_fcport_s *fcport, enum bfa_port_aen_event event) in bfa_fcport_aen_post() argument
2015 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_aen_post()
2022 aen_entry->aen_data.port.ioc_type = bfa_get_type(fcport->bfa); in bfa_fcport_aen_post()
2023 aen_entry->aen_data.port.pwwn = fcport->pwwn; in bfa_fcport_aen_post()
2026 bfad_im_post_vendor_event(aen_entry, bfad, ++fcport->bfa->bfa_aen_seq, in bfa_fcport_aen_post()
2034 bfa_fcport_sm_uninit(struct bfa_fcport_s *fcport, in bfa_fcport_sm_uninit() argument
2037 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_uninit()
2044 fcport->use_flash_cfg = BFA_TRUE; in bfa_fcport_sm_uninit()
2046 if (bfa_fcport_send_enable(fcport)) { in bfa_fcport_sm_uninit()
2047 bfa_trc(fcport->bfa, BFA_TRUE); in bfa_fcport_sm_uninit()
2048 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); in bfa_fcport_sm_uninit()
2050 bfa_trc(fcport->bfa, BFA_FALSE); in bfa_fcport_sm_uninit()
2051 bfa_sm_set_state(fcport, in bfa_fcport_sm_uninit()
2069 bfa_sm_set_state(fcport, bfa_fcport_sm_disabled); in bfa_fcport_sm_uninit()
2073 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown); in bfa_fcport_sm_uninit()
2077 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_uninit()
2082 bfa_fcport_sm_enabling_qwait(struct bfa_fcport_s *fcport, in bfa_fcport_sm_enabling_qwait() argument
2086 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_enabling_qwait()
2087 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_enabling_qwait()
2091 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); in bfa_fcport_sm_enabling_qwait()
2092 bfa_fcport_send_enable(fcport); in bfa_fcport_sm_enabling_qwait()
2096 bfa_reqq_wcancel(&fcport->reqq_wait); in bfa_fcport_sm_enabling_qwait()
2097 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped); in bfa_fcport_sm_enabling_qwait()
2111 bfa_sm_set_state(fcport, bfa_fcport_sm_disabled); in bfa_fcport_sm_enabling_qwait()
2112 bfa_reqq_wcancel(&fcport->reqq_wait); in bfa_fcport_sm_enabling_qwait()
2113 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_enabling_qwait()
2115 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_enabling_qwait()
2118 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISABLE); in bfa_fcport_sm_enabling_qwait()
2130 bfa_reqq_wcancel(&fcport->reqq_wait); in bfa_fcport_sm_enabling_qwait()
2131 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown); in bfa_fcport_sm_enabling_qwait()
2135 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_enabling_qwait()
2140 bfa_fcport_sm_enabling(struct bfa_fcport_s *fcport, in bfa_fcport_sm_enabling() argument
2144 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_enabling()
2145 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_enabling()
2150 bfa_sm_set_state(fcport, bfa_fcport_sm_linkdown); in bfa_fcport_sm_enabling()
2154 bfa_fcport_update_linkinfo(fcport); in bfa_fcport_sm_enabling()
2155 bfa_sm_set_state(fcport, bfa_fcport_sm_linkup); in bfa_fcport_sm_enabling()
2157 WARN_ON(!fcport->event_cbfn); in bfa_fcport_sm_enabling()
2158 bfa_fcport_scn(fcport, BFA_PORT_LINKUP, BFA_FALSE); in bfa_fcport_sm_enabling()
2168 if (bfa_fcport_send_disable(fcport)) in bfa_fcport_sm_enabling()
2169 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling); in bfa_fcport_sm_enabling()
2171 bfa_sm_set_state(fcport, in bfa_fcport_sm_enabling()
2174 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_enabling()
2176 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_enabling()
2179 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISABLE); in bfa_fcport_sm_enabling()
2183 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped); in bfa_fcport_sm_enabling()
2187 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown); in bfa_fcport_sm_enabling()
2191 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_enabling()
2196 bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport, in bfa_fcport_sm_linkdown() argument
2199 struct bfi_fcport_event_s *pevent = fcport->event_arg.i2hmsg.event; in bfa_fcport_sm_linkdown()
2201 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_linkdown()
2203 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_linkdown()
2207 bfa_fcport_update_linkinfo(fcport); in bfa_fcport_sm_linkdown()
2208 bfa_sm_set_state(fcport, bfa_fcport_sm_linkup); in bfa_fcport_sm_linkdown()
2209 WARN_ON(!fcport->event_cbfn); in bfa_fcport_sm_linkdown()
2210 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkdown()
2212 if (!bfa_ioc_get_fcmode(&fcport->bfa->ioc)) { in bfa_fcport_sm_linkdown()
2214 bfa_trc(fcport->bfa, in bfa_fcport_sm_linkdown()
2216 bfa_trc(fcport->bfa, in bfa_fcport_sm_linkdown()
2220 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkdown()
2224 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkdown()
2229 bfa_fcport_scn(fcport, BFA_PORT_LINKUP, BFA_FALSE); in bfa_fcport_sm_linkdown()
2230 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_linkdown()
2233 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_ONLINE); in bfa_fcport_sm_linkdown()
2236 if (fcport->cfg.qos_enabled && in bfa_fcport_sm_linkdown()
2237 fcport->qos_attr.state != BFA_QOS_ONLINE) in bfa_fcport_sm_linkdown()
2238 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_QOS_NEG); in bfa_fcport_sm_linkdown()
2254 if (bfa_fcport_send_disable(fcport)) in bfa_fcport_sm_linkdown()
2255 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling); in bfa_fcport_sm_linkdown()
2257 bfa_sm_set_state(fcport, in bfa_fcport_sm_linkdown()
2260 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkdown()
2262 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_linkdown()
2265 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISABLE); in bfa_fcport_sm_linkdown()
2269 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped); in bfa_fcport_sm_linkdown()
2273 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown); in bfa_fcport_sm_linkdown()
2277 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_linkdown()
2282 bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport, in bfa_fcport_sm_linkup() argument
2286 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_linkup()
2288 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_linkup()
2298 if (bfa_fcport_send_disable(fcport)) in bfa_fcport_sm_linkup()
2299 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling); in bfa_fcport_sm_linkup()
2301 bfa_sm_set_state(fcport, in bfa_fcport_sm_linkup()
2304 bfa_fcport_reset_linkinfo(fcport); in bfa_fcport_sm_linkup()
2305 bfa_fcport_scn(fcport, BFA_PORT_LINKDOWN, BFA_FALSE); in bfa_fcport_sm_linkup()
2306 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkup()
2308 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_linkup()
2311 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_OFFLINE); in bfa_fcport_sm_linkup()
2314 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISABLE); in bfa_fcport_sm_linkup()
2318 bfa_sm_set_state(fcport, bfa_fcport_sm_linkdown); in bfa_fcport_sm_linkup()
2319 bfa_fcport_reset_linkinfo(fcport); in bfa_fcport_sm_linkup()
2320 bfa_fcport_scn(fcport, BFA_PORT_LINKDOWN, BFA_FALSE); in bfa_fcport_sm_linkup()
2321 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkup()
2323 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_linkup()
2324 if (BFA_PORT_IS_DISABLED(fcport->bfa)) { in bfa_fcport_sm_linkup()
2327 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_OFFLINE); in bfa_fcport_sm_linkup()
2332 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISCONNECT); in bfa_fcport_sm_linkup()
2337 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped); in bfa_fcport_sm_linkup()
2338 bfa_fcport_reset_linkinfo(fcport); in bfa_fcport_sm_linkup()
2339 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_linkup()
2340 if (BFA_PORT_IS_DISABLED(fcport->bfa)) { in bfa_fcport_sm_linkup()
2343 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_OFFLINE); in bfa_fcport_sm_linkup()
2348 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISCONNECT); in bfa_fcport_sm_linkup()
2353 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown); in bfa_fcport_sm_linkup()
2354 bfa_fcport_reset_linkinfo(fcport); in bfa_fcport_sm_linkup()
2355 bfa_fcport_scn(fcport, BFA_PORT_LINKDOWN, BFA_FALSE); in bfa_fcport_sm_linkup()
2356 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_linkup()
2357 if (BFA_PORT_IS_DISABLED(fcport->bfa)) { in bfa_fcport_sm_linkup()
2360 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_OFFLINE); in bfa_fcport_sm_linkup()
2365 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISCONNECT); in bfa_fcport_sm_linkup()
2370 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_linkup()
2375 bfa_fcport_sm_disabling_qwait(struct bfa_fcport_s *fcport, in bfa_fcport_sm_disabling_qwait() argument
2378 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_disabling_qwait()
2382 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling); in bfa_fcport_sm_disabling_qwait()
2383 bfa_fcport_send_disable(fcport); in bfa_fcport_sm_disabling_qwait()
2387 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped); in bfa_fcport_sm_disabling_qwait()
2388 bfa_reqq_wcancel(&fcport->reqq_wait); in bfa_fcport_sm_disabling_qwait()
2392 bfa_sm_set_state(fcport, bfa_fcport_sm_toggling_qwait); in bfa_fcport_sm_disabling_qwait()
2410 bfa_sm_set_state(fcport, bfa_fcport_sm_iocfail); in bfa_fcport_sm_disabling_qwait()
2411 bfa_reqq_wcancel(&fcport->reqq_wait); in bfa_fcport_sm_disabling_qwait()
2415 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_disabling_qwait()
2420 bfa_fcport_sm_toggling_qwait(struct bfa_fcport_s *fcport, in bfa_fcport_sm_toggling_qwait() argument
2423 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_toggling_qwait()
2427 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling); in bfa_fcport_sm_toggling_qwait()
2428 bfa_fcport_send_disable(fcport); in bfa_fcport_sm_toggling_qwait()
2429 if (bfa_fcport_send_enable(fcport)) in bfa_fcport_sm_toggling_qwait()
2430 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); in bfa_fcport_sm_toggling_qwait()
2432 bfa_sm_set_state(fcport, in bfa_fcport_sm_toggling_qwait()
2437 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped); in bfa_fcport_sm_toggling_qwait()
2438 bfa_reqq_wcancel(&fcport->reqq_wait); in bfa_fcport_sm_toggling_qwait()
2445 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling_qwait); in bfa_fcport_sm_toggling_qwait()
2457 bfa_sm_set_state(fcport, bfa_fcport_sm_iocfail); in bfa_fcport_sm_toggling_qwait()
2458 bfa_reqq_wcancel(&fcport->reqq_wait); in bfa_fcport_sm_toggling_qwait()
2462 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_toggling_qwait()
2467 bfa_fcport_sm_disabling(struct bfa_fcport_s *fcport, in bfa_fcport_sm_disabling() argument
2471 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_disabling()
2472 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_disabling()
2476 bfa_sm_set_state(fcport, bfa_fcport_sm_disabled); in bfa_fcport_sm_disabling()
2486 if (bfa_fcport_send_enable(fcport)) in bfa_fcport_sm_disabling()
2487 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); in bfa_fcport_sm_disabling()
2489 bfa_sm_set_state(fcport, in bfa_fcport_sm_disabling()
2492 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_disabling()
2494 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_disabling()
2497 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_ENABLE); in bfa_fcport_sm_disabling()
2501 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped); in bfa_fcport_sm_disabling()
2513 bfa_sm_set_state(fcport, bfa_fcport_sm_iocfail); in bfa_fcport_sm_disabling()
2517 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_disabling()
2522 bfa_fcport_sm_disabled(struct bfa_fcport_s *fcport, in bfa_fcport_sm_disabled() argument
2526 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_disabled()
2527 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_disabled()
2537 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped); in bfa_fcport_sm_disabled()
2541 if (bfa_fcport_send_enable(fcport)) in bfa_fcport_sm_disabled()
2542 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); in bfa_fcport_sm_disabled()
2544 bfa_sm_set_state(fcport, in bfa_fcport_sm_disabled()
2547 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_disabled()
2549 wwn2str(pwwn_buf, fcport->pwwn); in bfa_fcport_sm_disabled()
2552 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_ENABLE); in bfa_fcport_sm_disabled()
2562 bfa_sm_set_state(fcport, bfa_fcport_sm_iocfail); in bfa_fcport_sm_disabled()
2566 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_disabled()
2571 bfa_fcport_sm_stopped(struct bfa_fcport_s *fcport, in bfa_fcport_sm_stopped() argument
2574 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_stopped()
2578 if (bfa_fcport_send_enable(fcport)) in bfa_fcport_sm_stopped()
2579 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); in bfa_fcport_sm_stopped()
2581 bfa_sm_set_state(fcport, in bfa_fcport_sm_stopped()
2597 bfa_fcport_sm_iocdown(struct bfa_fcport_s *fcport, in bfa_fcport_sm_iocdown() argument
2600 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_iocdown()
2604 if (bfa_fcport_send_enable(fcport)) in bfa_fcport_sm_iocdown()
2605 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling); in bfa_fcport_sm_iocdown()
2607 bfa_sm_set_state(fcport, in bfa_fcport_sm_iocdown()
2623 bfa_fcport_sm_iocfail(struct bfa_fcport_s *fcport, in bfa_fcport_sm_iocfail() argument
2626 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_iocfail()
2630 bfa_sm_set_state(fcport, bfa_fcport_sm_disabled); in bfa_fcport_sm_iocfail()
2634 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown); in bfa_fcport_sm_iocfail()
2652 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn()
2661 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn()
2672 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn_nf()
2684 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn_nf()
2695 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn_up_nf()
2708 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn_up_nf()
2719 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up()
2728 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up()
2739 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_nf()
2751 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_nf()
2762 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_dn_nf()
2775 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_dn_nf()
2786 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_dn_up_nf()
2799 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_dn_up_nf()
2809 ln->fcport->event_cbfn(ln->fcport->event_cbarg, ln->ln_event); in __bfa_cb_fcport_event()
2819 bfa_fcport_scn(struct bfa_fcport_s *fcport, enum bfa_port_linkstate event, in bfa_fcport_scn() argument
2822 if (fcport->cfg.trunked && !trunk) in bfa_fcport_scn()
2827 bfa_sm_send_event(&fcport->ln, BFA_FCPORT_LN_SM_LINKUP); in bfa_fcport_scn()
2830 bfa_sm_send_event(&fcport->ln, BFA_FCPORT_LN_SM_LINKDOWN); in bfa_fcport_scn()
2840 struct bfa_fcport_s *fcport = ln->fcport; in bfa_fcport_queue_cb() local
2842 if (fcport->bfa->fcs) { in bfa_fcport_queue_cb()
2843 fcport->event_cbfn(fcport->event_cbarg, event); in bfa_fcport_queue_cb()
2847 bfa_cb_queue(fcport->bfa, &ln->ln_qe, in bfa_fcport_queue_cb()
2867 struct bfa_fcport_s *fcport = cbarg; in bfa_fcport_qresume() local
2869 bfa_sm_send_event(fcport, BFA_FCPORT_SM_QRESUME); in bfa_fcport_qresume()
2873 bfa_fcport_mem_claim(struct bfa_fcport_s *fcport) in bfa_fcport_mem_claim() argument
2875 struct bfa_mem_dma_s *fcport_dma = &fcport->fcport_dma; in bfa_fcport_mem_claim()
2877 fcport->stats_kva = bfa_mem_dma_virt(fcport_dma); in bfa_fcport_mem_claim()
2878 fcport->stats_pa = bfa_mem_dma_phys(fcport_dma); in bfa_fcport_mem_claim()
2879 fcport->stats = (union bfa_fcport_stats_u *) in bfa_fcport_mem_claim()
2890 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_attach() local
2891 struct bfa_port_cfg_s *port_cfg = &fcport->cfg; in bfa_fcport_attach()
2892 struct bfa_fcport_ln_s *ln = &fcport->ln; in bfa_fcport_attach()
2895 fcport->bfa = bfa; in bfa_fcport_attach()
2896 ln->fcport = fcport; in bfa_fcport_attach()
2898 bfa_fcport_mem_claim(fcport); in bfa_fcport_attach()
2900 bfa_sm_set_state(fcport, bfa_fcport_sm_uninit); in bfa_fcport_attach()
2907 fcport->stats_reset_time = tv.tv_sec; in bfa_fcport_attach()
2919 INIT_LIST_HEAD(&fcport->stats_pending_q); in bfa_fcport_attach()
2920 INIT_LIST_HEAD(&fcport->statsclr_pending_q); in bfa_fcport_attach()
2922 bfa_reqq_winit(&fcport->reqq_wait, bfa_fcport_qresume, fcport); in bfa_fcport_attach()
2955 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_iocdisable() local
2957 bfa_sm_send_event(fcport, BFA_FCPORT_SM_HWFAIL); in bfa_fcport_iocdisable()
2962 bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport) in bfa_fcport_update_linkinfo() argument
2964 struct bfi_fcport_event_s *pevent = fcport->event_arg.i2hmsg.event; in bfa_fcport_update_linkinfo()
2965 struct bfa_fcport_trunk_s *trunk = &fcport->trunk; in bfa_fcport_update_linkinfo()
2967 fcport->speed = pevent->link_state.speed; in bfa_fcport_update_linkinfo()
2968 fcport->topology = pevent->link_state.topology; in bfa_fcport_update_linkinfo()
2970 if (fcport->topology == BFA_PORT_TOPOLOGY_LOOP) in bfa_fcport_update_linkinfo()
2971 fcport->myalpa = 0; in bfa_fcport_update_linkinfo()
2974 fcport->qos_attr = pevent->link_state.qos_attr; in bfa_fcport_update_linkinfo()
2975 fcport->qos_vc_attr = pevent->link_state.vc_fcf.qos_vc_attr; in bfa_fcport_update_linkinfo()
2980 if (!fcport->cfg.trunked) in bfa_fcport_update_linkinfo()
2984 fcport->fcoe_vlan = be16_to_cpu(pevent->link_state.vc_fcf.fcf.vlan); in bfa_fcport_update_linkinfo()
2986 bfa_trc(fcport->bfa, fcport->speed); in bfa_fcport_update_linkinfo()
2987 bfa_trc(fcport->bfa, fcport->topology); in bfa_fcport_update_linkinfo()
2991 bfa_fcport_reset_linkinfo(struct bfa_fcport_s *fcport) in bfa_fcport_reset_linkinfo() argument
2993 fcport->speed = BFA_PORT_SPEED_UNKNOWN; in bfa_fcport_reset_linkinfo()
2994 fcport->topology = BFA_PORT_TOPOLOGY_NONE; in bfa_fcport_reset_linkinfo()
2995 fcport->bbsc_op_state = BFA_FALSE; in bfa_fcport_reset_linkinfo()
3002 bfa_fcport_send_enable(struct bfa_fcport_s *fcport) in bfa_fcport_send_enable() argument
3010 fcport->msgtag++; in bfa_fcport_send_enable()
3015 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT); in bfa_fcport_send_enable()
3017 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT, in bfa_fcport_send_enable()
3018 &fcport->reqq_wait); in bfa_fcport_send_enable()
3023 bfa_fn_lpu(fcport->bfa)); in bfa_fcport_send_enable()
3024 m->nwwn = fcport->nwwn; in bfa_fcport_send_enable()
3025 m->pwwn = fcport->pwwn; in bfa_fcport_send_enable()
3026 m->port_cfg = fcport->cfg; in bfa_fcport_send_enable()
3027 m->msgtag = fcport->msgtag; in bfa_fcport_send_enable()
3028 m->port_cfg.maxfrsize = cpu_to_be16(fcport->cfg.maxfrsize); in bfa_fcport_send_enable()
3029 m->use_flash_cfg = fcport->use_flash_cfg; in bfa_fcport_send_enable()
3030 bfa_dma_be_addr_set(m->stats_dma_addr, fcport->stats_pa); in bfa_fcport_send_enable()
3031 bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_lo); in bfa_fcport_send_enable()
3032 bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_hi); in bfa_fcport_send_enable()
3037 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, m->mh); in bfa_fcport_send_enable()
3045 bfa_fcport_send_disable(struct bfa_fcport_s *fcport) in bfa_fcport_send_disable() argument
3053 fcport->msgtag++; in bfa_fcport_send_disable()
3058 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT); in bfa_fcport_send_disable()
3060 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT, in bfa_fcport_send_disable()
3061 &fcport->reqq_wait); in bfa_fcport_send_disable()
3066 bfa_fn_lpu(fcport->bfa)); in bfa_fcport_send_disable()
3067 m->msgtag = fcport->msgtag; in bfa_fcport_send_disable()
3072 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, m->mh); in bfa_fcport_send_disable()
3078 bfa_fcport_set_wwns(struct bfa_fcport_s *fcport) in bfa_fcport_set_wwns() argument
3080 fcport->pwwn = fcport->bfa->ioc.attr->pwwn; in bfa_fcport_set_wwns()
3081 fcport->nwwn = fcport->bfa->ioc.attr->nwwn; in bfa_fcport_set_wwns()
3083 bfa_trc(fcport->bfa, fcport->pwwn); in bfa_fcport_set_wwns()
3084 bfa_trc(fcport->bfa, fcport->nwwn); in bfa_fcport_set_wwns()
3123 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *)cbarg; in __bfa_cb_fcport_stats_get() local
3130 if (fcport->stats_status == BFA_STATUS_OK) in __bfa_cb_fcport_stats_get()
3133 list_for_each_safe(qe, qen, &fcport->stats_pending_q) { in __bfa_cb_fcport_stats_get()
3134 bfa_q_deq(&fcport->stats_pending_q, &qe); in __bfa_cb_fcport_stats_get()
3136 if (fcport->stats_status == BFA_STATUS_OK) { in __bfa_cb_fcport_stats_get()
3139 if (bfa_ioc_get_fcmode(&fcport->bfa->ioc)) in __bfa_cb_fcport_stats_get()
3141 &fcport->stats->fcqos); in __bfa_cb_fcport_stats_get()
3144 &fcport->stats->fcoe); in __bfa_cb_fcport_stats_get()
3146 tv.tv_sec - fcport->stats_reset_time; in __bfa_cb_fcport_stats_get()
3149 bfa_cb_queue_status(fcport->bfa, &cb->hcb_qe, in __bfa_cb_fcport_stats_get()
3150 fcport->stats_status); in __bfa_cb_fcport_stats_get()
3152 fcport->stats_status = BFA_STATUS_OK; in __bfa_cb_fcport_stats_get()
3154 INIT_LIST_HEAD(&fcport->stats_pending_q); in __bfa_cb_fcport_stats_get()
3155 fcport->stats_status = BFA_STATUS_OK; in __bfa_cb_fcport_stats_get()
3162 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg; in bfa_fcport_stats_get_timeout() local
3164 bfa_trc(fcport->bfa, fcport->stats_qfull); in bfa_fcport_stats_get_timeout()
3166 if (fcport->stats_qfull) { in bfa_fcport_stats_get_timeout()
3167 bfa_reqq_wcancel(&fcport->stats_reqq_wait); in bfa_fcport_stats_get_timeout()
3168 fcport->stats_qfull = BFA_FALSE; in bfa_fcport_stats_get_timeout()
3171 fcport->stats_status = BFA_STATUS_ETIMER; in bfa_fcport_stats_get_timeout()
3172 __bfa_cb_fcport_stats_get(fcport, BFA_TRUE); in bfa_fcport_stats_get_timeout()
3178 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg; in bfa_fcport_send_stats_get() local
3181 msg = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT); in bfa_fcport_send_stats_get()
3184 fcport->stats_qfull = BFA_TRUE; in bfa_fcport_send_stats_get()
3185 bfa_reqq_winit(&fcport->stats_reqq_wait, in bfa_fcport_send_stats_get()
3186 bfa_fcport_send_stats_get, fcport); in bfa_fcport_send_stats_get()
3187 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT, in bfa_fcport_send_stats_get()
3188 &fcport->stats_reqq_wait); in bfa_fcport_send_stats_get()
3191 fcport->stats_qfull = BFA_FALSE; in bfa_fcport_send_stats_get()
3195 bfa_fn_lpu(fcport->bfa)); in bfa_fcport_send_stats_get()
3196 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, msg->mh); in bfa_fcport_send_stats_get()
3202 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg; in __bfa_cb_fcport_stats_clr() local
3213 fcport->stats_reset_time = tv.tv_sec; in __bfa_cb_fcport_stats_clr()
3214 list_for_each_safe(qe, qen, &fcport->statsclr_pending_q) { in __bfa_cb_fcport_stats_clr()
3215 bfa_q_deq(&fcport->statsclr_pending_q, &qe); in __bfa_cb_fcport_stats_clr()
3217 bfa_cb_queue_status(fcport->bfa, &cb->hcb_qe, in __bfa_cb_fcport_stats_clr()
3218 fcport->stats_status); in __bfa_cb_fcport_stats_clr()
3220 fcport->stats_status = BFA_STATUS_OK; in __bfa_cb_fcport_stats_clr()
3222 INIT_LIST_HEAD(&fcport->statsclr_pending_q); in __bfa_cb_fcport_stats_clr()
3223 fcport->stats_status = BFA_STATUS_OK; in __bfa_cb_fcport_stats_clr()
3230 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg; in bfa_fcport_stats_clr_timeout() local
3232 bfa_trc(fcport->bfa, fcport->stats_qfull); in bfa_fcport_stats_clr_timeout()
3234 if (fcport->stats_qfull) { in bfa_fcport_stats_clr_timeout()
3235 bfa_reqq_wcancel(&fcport->stats_reqq_wait); in bfa_fcport_stats_clr_timeout()
3236 fcport->stats_qfull = BFA_FALSE; in bfa_fcport_stats_clr_timeout()
3239 fcport->stats_status = BFA_STATUS_ETIMER; in bfa_fcport_stats_clr_timeout()
3240 __bfa_cb_fcport_stats_clr(fcport, BFA_TRUE); in bfa_fcport_stats_clr_timeout()
3246 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg; in bfa_fcport_send_stats_clear() local
3249 msg = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT); in bfa_fcport_send_stats_clear()
3252 fcport->stats_qfull = BFA_TRUE; in bfa_fcport_send_stats_clear()
3253 bfa_reqq_winit(&fcport->stats_reqq_wait, in bfa_fcport_send_stats_clear()
3254 bfa_fcport_send_stats_clear, fcport); in bfa_fcport_send_stats_clear()
3255 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT, in bfa_fcport_send_stats_clear()
3256 &fcport->stats_reqq_wait); in bfa_fcport_send_stats_clear()
3259 fcport->stats_qfull = BFA_FALSE; in bfa_fcport_send_stats_clear()
3263 bfa_fn_lpu(fcport->bfa)); in bfa_fcport_send_stats_clear()
3264 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, msg->mh); in bfa_fcport_send_stats_clear()
3271 bfa_trunk_scn(struct bfa_fcport_s *fcport, struct bfi_fcport_trunk_scn_s *scn) in bfa_trunk_scn() argument
3273 struct bfa_fcport_trunk_s *trunk = &fcport->trunk; in bfa_trunk_scn()
3280 bfa_trc(fcport->bfa, fcport->cfg.trunked); in bfa_trunk_scn()
3284 bfa_trc(fcport->bfa, trunk->attr.state); in bfa_trunk_scn()
3285 bfa_trc(fcport->bfa, scn->trunk_state); in bfa_trunk_scn()
3286 bfa_trc(fcport->bfa, scn->trunk_speed); in bfa_trunk_scn()
3292 if (fcport->cfg.trunked && (trunk->attr.state != BFA_TRUNK_DISABLED)) in bfa_trunk_scn()
3306 fcport->speed = tlink->speed; in bfa_trunk_scn()
3307 fcport->topology = BFA_PORT_TOPOLOGY_P2P; in bfa_trunk_scn()
3311 bfa_trc(fcport->bfa, lattr->link_state); in bfa_trunk_scn()
3312 bfa_trc(fcport->bfa, lattr->trunk_wwn); in bfa_trunk_scn()
3313 bfa_trc(fcport->bfa, lattr->fctl); in bfa_trunk_scn()
3314 bfa_trc(fcport->bfa, lattr->speed); in bfa_trunk_scn()
3315 bfa_trc(fcport->bfa, lattr->deskew); in bfa_trunk_scn()
3320 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_trunk_scn()
3324 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_trunk_scn()
3328 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_trunk_scn()
3332 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_trunk_scn()
3341 bfa_fcport_scn(fcport, (scn->trunk_state == BFA_TRUNK_ONLINE) ? in bfa_trunk_scn()
3349 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_trunk_iocdisable() local
3355 if (fcport->cfg.trunked) { in bfa_trunk_iocdisable()
3356 if (fcport->trunk.attr.state == BFA_TRUNK_ONLINE) in bfa_trunk_iocdisable()
3357 bfa_fcport_scn(fcport, BFA_PORT_LINKDOWN, BFA_TRUE); in bfa_trunk_iocdisable()
3359 fcport->trunk.attr.state = BFA_TRUNK_OFFLINE; in bfa_trunk_iocdisable()
3360 fcport->trunk.attr.speed = BFA_PORT_SPEED_UNKNOWN; in bfa_trunk_iocdisable()
3362 fcport->trunk.attr.link_attr[i].trunk_wwn = 0; in bfa_trunk_iocdisable()
3363 fcport->trunk.attr.link_attr[i].fctl = in bfa_trunk_iocdisable()
3365 fcport->trunk.attr.link_attr[i].link_state = in bfa_trunk_iocdisable()
3367 fcport->trunk.attr.link_attr[i].speed = in bfa_trunk_iocdisable()
3369 fcport->trunk.attr.link_attr[i].deskew = 0; in bfa_trunk_iocdisable()
3380 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_init() local
3385 bfa_fcport_set_wwns(fcport); in bfa_fcport_init()
3386 if (fcport->cfg.maxfrsize == 0) in bfa_fcport_init()
3387 fcport->cfg.maxfrsize = bfa_ioc_maxfrsize(&bfa->ioc); in bfa_fcport_init()
3388 fcport->cfg.rx_bbcredit = bfa_ioc_rx_bbcredit(&bfa->ioc); in bfa_fcport_init()
3389 fcport->speed_sup = bfa_ioc_speed_sup(&bfa->ioc); in bfa_fcport_init()
3394 WARN_ON(!fcport->cfg.maxfrsize); in bfa_fcport_init()
3395 WARN_ON(!fcport->cfg.rx_bbcredit); in bfa_fcport_init()
3396 WARN_ON(!fcport->speed_sup); in bfa_fcport_init()
3405 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_isr() local
3409 fcport->event_arg.i2hmsg = i2hmsg; in bfa_fcport_isr()
3412 bfa_trc(bfa, bfa_sm_to_state(hal_port_sm_table, fcport->sm)); in bfa_fcport_isr()
3416 if (fcport->msgtag == i2hmsg.penable_rsp->msgtag) { in bfa_fcport_isr()
3418 if (fcport->use_flash_cfg) { in bfa_fcport_isr()
3419 fcport->cfg = i2hmsg.penable_rsp->port_cfg; in bfa_fcport_isr()
3420 fcport->cfg.maxfrsize = in bfa_fcport_isr()
3421 cpu_to_be16(fcport->cfg.maxfrsize); in bfa_fcport_isr()
3422 fcport->cfg.path_tov = in bfa_fcport_isr()
3423 cpu_to_be16(fcport->cfg.path_tov); in bfa_fcport_isr()
3424 fcport->cfg.q_depth = in bfa_fcport_isr()
3425 cpu_to_be16(fcport->cfg.q_depth); in bfa_fcport_isr()
3427 if (fcport->cfg.trunked) in bfa_fcport_isr()
3428 fcport->trunk.attr.state = in bfa_fcport_isr()
3431 fcport->trunk.attr.state = in bfa_fcport_isr()
3433 fcport->use_flash_cfg = BFA_FALSE; in bfa_fcport_isr()
3436 if (fcport->cfg.qos_enabled) in bfa_fcport_isr()
3437 fcport->qos_attr.state = BFA_QOS_OFFLINE; in bfa_fcport_isr()
3439 fcport->qos_attr.state = BFA_QOS_DISABLED; in bfa_fcport_isr()
3441 bfa_sm_send_event(fcport, BFA_FCPORT_SM_FWRSP); in bfa_fcport_isr()
3446 if (fcport->msgtag == i2hmsg.penable_rsp->msgtag) in bfa_fcport_isr()
3447 bfa_sm_send_event(fcport, BFA_FCPORT_SM_FWRSP); in bfa_fcport_isr()
3452 bfa_sm_send_event(fcport, BFA_FCPORT_SM_LINKUP); in bfa_fcport_isr()
3454 bfa_sm_send_event(fcport, BFA_FCPORT_SM_LINKDOWN); in bfa_fcport_isr()
3458 bfa_trunk_scn(fcport, i2hmsg.trunk_scn); in bfa_fcport_isr()
3465 if (list_empty(&fcport->stats_pending_q) || in bfa_fcport_isr()
3466 (fcport->stats_status == BFA_STATUS_ETIMER)) in bfa_fcport_isr()
3469 bfa_timer_stop(&fcport->timer); in bfa_fcport_isr()
3470 fcport->stats_status = i2hmsg.pstatsget_rsp->status; in bfa_fcport_isr()
3471 __bfa_cb_fcport_stats_get(fcport, BFA_TRUE); in bfa_fcport_isr()
3478 if (list_empty(&fcport->statsclr_pending_q) || in bfa_fcport_isr()
3479 (fcport->stats_status == BFA_STATUS_ETIMER)) in bfa_fcport_isr()
3482 bfa_timer_stop(&fcport->timer); in bfa_fcport_isr()
3483 fcport->stats_status = BFA_STATUS_OK; in bfa_fcport_isr()
3484 __bfa_cb_fcport_stats_clr(fcport, BFA_TRUE); in bfa_fcport_isr()
3488 bfa_sm_send_event(fcport, BFA_FCPORT_SM_ENABLE); in bfa_fcport_isr()
3492 bfa_sm_send_event(fcport, BFA_FCPORT_SM_DISABLE); in bfa_fcport_isr()
3510 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_event_register() local
3512 fcport->event_cbfn = cbfn; in bfa_fcport_event_register()
3513 fcport->event_cbarg = cbarg; in bfa_fcport_event_register()
3519 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_enable() local
3527 if (fcport->diag_busy) in bfa_fcport_enable()
3551 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_pbcdisabled() local
3556 bfa_trc(bfa, fcport->pwwn); in bfa_fcport_is_pbcdisabled()
3568 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_speed() local
3572 if (fcport->cfg.trunked == BFA_TRUE) in bfa_fcport_cfg_speed()
3574 if ((speed != BFA_PORT_SPEED_AUTO) && (speed > fcport->speed_sup)) { in bfa_fcport_cfg_speed()
3575 bfa_trc(bfa, fcport->speed_sup); in bfa_fcport_cfg_speed()
3580 if (bfa_ioc_get_type(&fcport->bfa->ioc) == BFA_IOC_TYPE_FC) { in bfa_fcport_cfg_speed()
3599 fcport->cfg.speed = speed; in bfa_fcport_cfg_speed()
3610 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_speed() local
3612 return fcport->speed; in bfa_fcport_get_speed()
3621 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_topology() local
3624 bfa_trc(bfa, fcport->cfg.topology); in bfa_fcport_cfg_topology()
3636 fcport->cfg.topology = topology; in bfa_fcport_cfg_topology()
3646 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_topology() local
3648 return fcport->topology; in bfa_fcport_get_topology()
3654 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_hardalpa() local
3657 bfa_trc(bfa, fcport->cfg.cfg_hardalpa); in bfa_fcport_cfg_hardalpa()
3658 bfa_trc(bfa, fcport->cfg.hardalpa); in bfa_fcport_cfg_hardalpa()
3660 fcport->cfg.cfg_hardalpa = BFA_TRUE; in bfa_fcport_cfg_hardalpa()
3661 fcport->cfg.hardalpa = alpa; in bfa_fcport_cfg_hardalpa()
3669 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_clr_hardalpa() local
3671 bfa_trc(bfa, fcport->cfg.cfg_hardalpa); in bfa_fcport_clr_hardalpa()
3672 bfa_trc(bfa, fcport->cfg.hardalpa); in bfa_fcport_clr_hardalpa()
3674 fcport->cfg.cfg_hardalpa = BFA_FALSE; in bfa_fcport_clr_hardalpa()
3681 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_hardalpa() local
3683 *alpa = fcport->cfg.hardalpa; in bfa_fcport_get_hardalpa()
3684 return fcport->cfg.cfg_hardalpa; in bfa_fcport_get_hardalpa()
3690 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_myalpa() local
3692 return fcport->myalpa; in bfa_fcport_get_myalpa()
3698 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_maxfrsize() local
3701 bfa_trc(bfa, fcport->cfg.maxfrsize); in bfa_fcport_cfg_maxfrsize()
3711 fcport->cfg.maxfrsize = maxfrsize; in bfa_fcport_cfg_maxfrsize()
3718 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_maxfrsize() local
3720 return fcport->cfg.maxfrsize; in bfa_fcport_get_maxfrsize()
3726 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_rx_bbcredit() local
3728 return fcport->cfg.rx_bbcredit; in bfa_fcport_get_rx_bbcredit()
3734 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_set_tx_bbcredit() local
3736 fcport->cfg.tx_bbcredit = (u8)tx_bbcredit; in bfa_fcport_set_tx_bbcredit()
3737 fcport->cfg.bb_scn = bb_scn; in bfa_fcport_set_tx_bbcredit()
3739 fcport->bbsc_op_state = BFA_TRUE; in bfa_fcport_set_tx_bbcredit()
3749 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_wwn() local
3751 return fcport->nwwn; in bfa_fcport_get_wwn()
3753 return fcport->pwwn; in bfa_fcport_get_wwn()
3759 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_attr() local
3763 attr->nwwn = fcport->nwwn; in bfa_fcport_get_attr()
3764 attr->pwwn = fcport->pwwn; in bfa_fcport_get_attr()
3769 memcpy(&attr->pport_cfg, &fcport->cfg, in bfa_fcport_get_attr()
3772 attr->pport_cfg.speed = fcport->cfg.speed; in bfa_fcport_get_attr()
3773 attr->speed_supported = fcport->speed_sup; in bfa_fcport_get_attr()
3774 attr->speed = fcport->speed; in bfa_fcport_get_attr()
3778 attr->pport_cfg.topology = fcport->cfg.topology; in bfa_fcport_get_attr()
3779 attr->topology = fcport->topology; in bfa_fcport_get_attr()
3780 attr->pport_cfg.trunked = fcport->cfg.trunked; in bfa_fcport_get_attr()
3783 attr->beacon = fcport->beacon; in bfa_fcport_get_attr()
3784 attr->link_e2e_beacon = fcport->link_e2e_beacon; in bfa_fcport_get_attr()
3788 attr->port_state = bfa_sm_to_state(hal_port_sm_table, fcport->sm); in bfa_fcport_get_attr()
3789 attr->bbsc_op_status = fcport->bbsc_op_state; in bfa_fcport_get_attr()
3795 if (bfa_ioc_is_disabled(&fcport->bfa->ioc)) in bfa_fcport_get_attr()
3797 else if (bfa_ioc_fw_mismatch(&fcport->bfa->ioc)) in bfa_fcport_get_attr()
3802 attr->fcoe_vlan = fcport->fcoe_vlan; in bfa_fcport_get_attr()
3813 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_stats() local
3818 if (!list_empty(&fcport->statsclr_pending_q)) in bfa_fcport_get_stats()
3821 if (list_empty(&fcport->stats_pending_q)) { in bfa_fcport_get_stats()
3822 list_add_tail(&cb->hcb_qe.qe, &fcport->stats_pending_q); in bfa_fcport_get_stats()
3823 bfa_fcport_send_stats_get(fcport); in bfa_fcport_get_stats()
3824 bfa_timer_start(bfa, &fcport->timer, in bfa_fcport_get_stats()
3826 fcport, BFA_FCPORT_STATS_TOV); in bfa_fcport_get_stats()
3828 list_add_tail(&cb->hcb_qe.qe, &fcport->stats_pending_q); in bfa_fcport_get_stats()
3839 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_clear_stats() local
3841 if (!list_empty(&fcport->stats_pending_q)) in bfa_fcport_clear_stats()
3844 if (list_empty(&fcport->statsclr_pending_q)) { in bfa_fcport_clear_stats()
3845 list_add_tail(&cb->hcb_qe.qe, &fcport->statsclr_pending_q); in bfa_fcport_clear_stats()
3846 bfa_fcport_send_stats_clear(fcport); in bfa_fcport_clear_stats()
3847 bfa_timer_start(bfa, &fcport->timer, in bfa_fcport_clear_stats()
3849 fcport, BFA_FCPORT_STATS_TOV); in bfa_fcport_clear_stats()
3851 list_add_tail(&cb->hcb_qe.qe, &fcport->statsclr_pending_q); in bfa_fcport_clear_stats()
3862 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_disabled() local
3864 return bfa_sm_to_state(hal_port_sm_table, fcport->sm) == in bfa_fcport_is_disabled()
3872 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_ratelim() local
3874 return fcport->cfg.ratelimit ? BFA_TRUE : BFA_FALSE; in bfa_fcport_is_ratelim()
3884 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_faa() local
3887 fcport->cfg.faa_state = state; in bfa_fcport_cfg_faa()
3896 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_ratelim_speed() local
3898 bfa_trc(bfa, fcport->cfg.trl_def_speed); in bfa_fcport_get_ratelim_speed()
3899 return fcport->cfg.trl_def_speed; in bfa_fcport_get_ratelim_speed()
3908 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_beacon() local
3912 bfa_trc(bfa, fcport->beacon); in bfa_fcport_beacon()
3913 bfa_trc(bfa, fcport->link_e2e_beacon); in bfa_fcport_beacon()
3915 fcport->beacon = beacon; in bfa_fcport_beacon()
3916 fcport->link_e2e_beacon = link_e2e_beacon; in bfa_fcport_beacon()
3922 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_linkup() local
3924 return (!fcport->cfg.trunked && in bfa_fcport_is_linkup()
3925 bfa_sm_cmp_state(fcport, bfa_fcport_sm_linkup)) || in bfa_fcport_is_linkup()
3926 (fcport->cfg.trunked && in bfa_fcport_is_linkup()
3927 fcport->trunk.attr.state == BFA_TRUNK_ONLINE); in bfa_fcport_is_linkup()
3933 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_qos_enabled() local
3935 return fcport->cfg.qos_enabled; in bfa_fcport_is_qos_enabled()
3941 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_trunk_enabled() local
3943 return fcport->cfg.trunked; in bfa_fcport_is_trunk_enabled()
5316 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fcdiag->bfa); in bfa_fcdiag_set_busy_status() local
5319 fcport->diag_busy = BFA_TRUE; in bfa_fcdiag_set_busy_status()
5321 fcport->diag_busy = BFA_FALSE; in bfa_fcdiag_set_busy_status()