• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/scsi/bfa/

Lines Matching defs:fcport

28 BFA_MODULE(fcport);
41 static bfa_boolean_t bfa_fcport_send_enable(struct bfa_fcport_s *fcport);
42 static bfa_boolean_t bfa_fcport_send_disable(struct bfa_fcport_s *fcport);
43 static void bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport);
44 static void bfa_fcport_reset_linkinfo(struct bfa_fcport_s *fcport);
45 static void bfa_fcport_set_wwns(struct bfa_fcport_s *fcport);
47 static void bfa_fcport_callback(struct bfa_fcport_s *fcport,
84 static void bfa_fcport_sm_uninit(struct bfa_fcport_s *fcport,
86 static void bfa_fcport_sm_enabling_qwait(struct bfa_fcport_s *fcport,
88 static void bfa_fcport_sm_enabling(struct bfa_fcport_s *fcport,
90 static void bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport,
92 static void bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
94 static void bfa_fcport_sm_disabling(struct bfa_fcport_s *fcport,
96 static void bfa_fcport_sm_disabling_qwait(struct bfa_fcport_s *fcport,
98 static void bfa_fcport_sm_disabled(struct bfa_fcport_s *fcport,
100 static void bfa_fcport_sm_stopped(struct bfa_fcport_s *fcport,
102 static void bfa_fcport_sm_iocdown(struct bfa_fcport_s *fcport,
104 static void bfa_fcport_sm_iocfail(struct bfa_fcport_s *fcport,
137 bfa_fcport_aen_post(struct bfa_fcport_s *fcport, enum bfa_port_aen_event event)
140 struct bfa_log_mod_s *logmod = fcport->bfa->logm;
141 wwn_t pwwn = fcport->pwwn;
148 aen_data.port.ioc_type = bfa_get_type(fcport->bfa);
153 bfa_fcport_sm_uninit(struct bfa_fcport_s *fcport,
156 bfa_trc(fcport->bfa, event);
163 if (bfa_fcport_send_enable(fcport))
164 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling);
166 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling_qwait);
182 bfa_sm_set_state(fcport, bfa_fcport_sm_disabled);
186 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown);
190 bfa_sm_fault(fcport->bfa, event);
195 bfa_fcport_sm_enabling_qwait(struct bfa_fcport_s *fcport,
198 bfa_trc(fcport->bfa, event);
202 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling);
203 bfa_fcport_send_enable(fcport);
207 bfa_reqq_wcancel(&fcport->reqq_wait);
208 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped);
222 bfa_sm_set_state(fcport, bfa_fcport_sm_disabled);
223 bfa_reqq_wcancel(&fcport->reqq_wait);
224 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
226 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISABLE);
238 bfa_reqq_wcancel(&fcport->reqq_wait);
239 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown);
243 bfa_sm_fault(fcport->bfa, event);
248 bfa_fcport_sm_enabling(struct bfa_fcport_s *fcport,
251 bfa_trc(fcport->bfa, event);
256 bfa_sm_set_state(fcport, bfa_fcport_sm_linkdown);
260 bfa_fcport_update_linkinfo(fcport);
261 bfa_sm_set_state(fcport, bfa_fcport_sm_linkup);
263 bfa_assert(fcport->event_cbfn);
264 bfa_fcport_callback(fcport, BFA_PPORT_LINKUP);
274 if (bfa_fcport_send_disable(fcport))
275 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling);
277 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling_qwait);
279 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
281 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISABLE);
285 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped);
289 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown);
293 bfa_sm_fault(fcport->bfa, event);
298 bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport,
301 struct bfi_fcport_event_s *pevent = fcport->event_arg.i2hmsg.event;
302 bfa_trc(fcport->bfa, event);
306 bfa_fcport_update_linkinfo(fcport);
307 bfa_sm_set_state(fcport, bfa_fcport_sm_linkup);
308 bfa_assert(fcport->event_cbfn);
309 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
312 if (!bfa_ioc_get_fcmode(&fcport->bfa->ioc)) {
314 bfa_trc(fcport->bfa,
316 bfa_trc(fcport->bfa,
320 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
324 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
329 bfa_fcport_callback(fcport, BFA_PPORT_LINKUP);
330 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_ONLINE);
335 if ((fcport->cfg.qos_enabled)
336 && (bfa_os_ntohl(fcport->qos_attr.state) != BFA_QOS_ONLINE))
337 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_QOS_NEG);
354 if (bfa_fcport_send_disable(fcport))
355 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling);
357 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling_qwait);
359 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
361 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISABLE);
365 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped);
369 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown);
373 bfa_sm_fault(fcport->bfa, event);
378 bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
381 bfa_trc(fcport->bfa, event);
391 if (bfa_fcport_send_disable(fcport))
392 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling);
394 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling_qwait);
396 bfa_fcport_reset_linkinfo(fcport);
397 bfa_fcport_callback(fcport, BFA_PPORT_LINKDOWN);
398 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
400 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_OFFLINE);
401 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISABLE);
405 bfa_sm_set_state(fcport, bfa_fcport_sm_linkdown);
406 bfa_fcport_reset_linkinfo(fcport);
407 bfa_fcport_callback(fcport, BFA_PPORT_LINKDOWN);
408 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
410 if (BFA_PORT_IS_DISABLED(fcport->bfa))
411 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_OFFLINE);
413 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISCONNECT);
417 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped);
418 bfa_fcport_reset_linkinfo(fcport);
419 if (BFA_PORT_IS_DISABLED(fcport->bfa))
420 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_OFFLINE);
422 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISCONNECT);
426 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown);
427 bfa_fcport_reset_linkinfo(fcport);
428 bfa_fcport_callback(fcport, BFA_PPORT_LINKDOWN);
429 if (BFA_PORT_IS_DISABLED(fcport->bfa))
430 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_OFFLINE);
432 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_DISCONNECT);
436 bfa_sm_fault(fcport->bfa, event);
441 bfa_fcport_sm_disabling_qwait(struct bfa_fcport_s *fcport,
444 bfa_trc(fcport->bfa, event);
448 bfa_sm_set_state(fcport, bfa_fcport_sm_disabling);
449 bfa_fcport_send_disable(fcport);
453 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped);
454 bfa_reqq_wcancel(&fcport->reqq_wait);
472 bfa_sm_set_state(fcport, bfa_fcport_sm_iocfail);
473 bfa_reqq_wcancel(&fcport->reqq_wait);
477 bfa_sm_fault(fcport->bfa, event);
482 bfa_fcport_sm_disabling(struct bfa_fcport_s *fcport,
485 bfa_trc(fcport->bfa, event);
489 bfa_sm_set_state(fcport, bfa_fcport_sm_disabled);
499 if (bfa_fcport_send_enable(fcport))
500 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling);
502 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling_qwait);
504 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
506 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_ENABLE);
510 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped);
522 bfa_sm_set_state(fcport, bfa_fcport_sm_iocfail);
526 bfa_sm_fault(fcport->bfa, event);
531 bfa_fcport_sm_disabled(struct bfa_fcport_s *fcport,
534 bfa_trc(fcport->bfa, event);
544 bfa_sm_set_state(fcport, bfa_fcport_sm_stopped);
548 if (bfa_fcport_send_enable(fcport))
549 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling);
551 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling_qwait);
553 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
555 bfa_fcport_aen_post(fcport, BFA_PORT_AEN_ENABLE);
565 bfa_sm_set_state(fcport, bfa_fcport_sm_iocfail);
569 bfa_sm_fault(fcport->bfa, event);
574 bfa_fcport_sm_stopped(struct bfa_fcport_s *fcport,
577 bfa_trc(fcport->bfa, event);
581 if (bfa_fcport_send_enable(fcport))
582 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling);
584 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling_qwait);
599 bfa_fcport_sm_iocdown(struct bfa_fcport_s *fcport,
602 bfa_trc(fcport->bfa, event);
606 if (bfa_fcport_send_enable(fcport))
607 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling);
609 bfa_sm_set_state(fcport, bfa_fcport_sm_enabling_qwait);
624 bfa_fcport_sm_iocfail(struct bfa_fcport_s *fcport,
627 bfa_trc(fcport->bfa, event);
631 bfa_sm_set_state(fcport, bfa_fcport_sm_disabled);
635 bfa_sm_set_state(fcport, bfa_fcport_sm_iocdown);
653 bfa_trc(ln->fcport->bfa, event);
662 bfa_sm_fault(ln->fcport->bfa, event);
673 bfa_trc(ln->fcport->bfa, event);
685 bfa_sm_fault(ln->fcport->bfa, event);
696 bfa_trc(ln->fcport->bfa, event);
709 bfa_sm_fault(ln->fcport->bfa, event);
720 bfa_trc(ln->fcport->bfa, event);
729 bfa_sm_fault(ln->fcport->bfa, event);
740 bfa_trc(ln->fcport->bfa, event);
752 bfa_sm_fault(ln->fcport->bfa, event);
763 bfa_trc(ln->fcport->bfa, event);
776 bfa_sm_fault(ln->fcport->bfa, event);
787 bfa_trc(ln->fcport->bfa, event);
800 bfa_sm_fault(ln->fcport->bfa, event);
814 ln->fcport->event_cbfn(ln->fcport->event_cbarg, ln->ln_event);
820 bfa_fcport_callback(struct bfa_fcport_s *fcport, enum bfa_pport_linkstate event)
822 if (fcport->bfa->fcs) {
823 fcport->event_cbfn(fcport->event_cbarg, event);
829 bfa_sm_send_event(&fcport->ln, BFA_FCPORT_LN_SM_LINKUP);
832 bfa_sm_send_event(&fcport->ln, BFA_FCPORT_LN_SM_LINKDOWN);
843 bfa_cb_queue(ln->fcport->bfa, &ln->ln_qe, __bfa_cb_fcport_event, ln);
859 struct bfa_fcport_s *fcport = cbarg;
861 bfa_sm_send_event(fcport, BFA_FCPORT_SM_QRESUME);
865 bfa_fcport_mem_claim(struct bfa_fcport_s *fcport, struct bfa_meminfo_s *meminfo)
873 fcport->stats_kva = dm_kva;
874 fcport->stats_pa = dm_pa;
875 fcport->stats = (union bfa_fcport_stats_u *)dm_kva;
891 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
892 struct bfa_pport_cfg_s *port_cfg = &fcport->cfg;
893 struct bfa_fcport_ln_s *ln = &fcport->ln;
896 bfa_os_memset(fcport, 0, sizeof(struct bfa_fcport_s));
897 fcport->bfa = bfa;
898 ln->fcport = fcport;
900 bfa_fcport_mem_claim(fcport, meminfo);
902 bfa_sm_set_state(fcport, bfa_fcport_sm_uninit);
909 fcport->stats_reset_time = tv.tv_sec;
921 bfa_reqq_winit(&fcport->reqq_wait, bfa_fcport_qresume, fcport);
957 bfa_fcport_update_linkinfo(struct bfa_fcport_s *fcport)
959 struct bfi_fcport_event_s *pevent = fcport->event_arg.i2hmsg.event;
961 fcport->speed = pevent->link_state.speed;
962 fcport->topology = pevent->link_state.topology;
964 if (fcport->topology == BFA_PPORT_TOPOLOGY_LOOP)
965 fcport->myalpa = 0;
970 bfa_os_assign(fcport->qos_attr, pevent->link_state.qos_attr);
971 bfa_os_assign(fcport->qos_vc_attr,
975 bfa_trc(fcport->bfa, fcport->speed);
976 bfa_trc(fcport->bfa, fcport->topology);
980 bfa_fcport_reset_linkinfo(struct bfa_fcport_s *fcport)
982 fcport->speed = BFA_PPORT_SPEED_UNKNOWN;
983 fcport->topology = BFA_PPORT_TOPOLOGY_NONE;
990 bfa_fcport_send_enable(struct bfa_fcport_s *fcport)
998 fcport->msgtag++;
1003 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
1005 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT,
1006 &fcport->reqq_wait);
1011 bfa_lpuid(fcport->bfa));
1012 m->nwwn = fcport->nwwn;
1013 m->pwwn = fcport->pwwn;
1014 m->port_cfg = fcport->cfg;
1015 m->msgtag = fcport->msgtag;
1016 m->port_cfg.maxfrsize = bfa_os_htons(fcport->cfg.maxfrsize);
1017 bfa_dma_be_addr_set(m->stats_dma_addr, fcport->stats_pa);
1018 bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_lo);
1019 bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_hi);
1024 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT);
1032 bfa_fcport_send_disable(struct bfa_fcport_s *fcport)
1040 fcport->msgtag++;
1045 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
1047 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT,
1048 &fcport->reqq_wait);
1053 bfa_lpuid(fcport->bfa));
1054 m->msgtag = fcport->msgtag;
1059 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT);
1065 bfa_fcport_set_wwns(struct bfa_fcport_s *fcport)
1067 fcport->pwwn = bfa_ioc_get_pwwn(&fcport->bfa->ioc);
1068 fcport->nwwn = bfa_ioc_get_nwwn(&fcport->bfa->ioc);
1070 bfa_trc(fcport->bfa, fcport->pwwn);
1071 bfa_trc(fcport->bfa, fcport->nwwn);
1078 struct bfa_fcport_s *fcport = port_cbarg;
1084 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
1086 bfa_trc(fcport->bfa, fcport->cfg.tx_bbcredit);
1091 bfa_lpuid(fcport->bfa));
1092 m->tx_bbcredit = bfa_os_htons((u16) fcport->cfg.tx_bbcredit);
1097 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT);
1136 struct bfa_fcport_s *fcport = cbarg;
1139 if (fcport->stats_status == BFA_STATUS_OK) {
1143 if (bfa_ioc_get_fcmode(&fcport->bfa->ioc)) {
1145 &fcport->stats_ret->fcqos,
1146 &fcport->stats->fcqos);
1149 &fcport->stats_ret->fcoe,
1150 &fcport->stats->fcoe);
1153 fcport->stats_ret->fcoe.secs_reset =
1154 tv.tv_sec - fcport->stats_reset_time;
1157 fcport->stats_cbfn(fcport->stats_cbarg, fcport->stats_status);
1159 fcport->stats_busy = BFA_FALSE;
1160 fcport->stats_status = BFA_STATUS_OK;
1167 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg;
1169 bfa_trc(fcport->bfa, fcport->stats_qfull);
1171 if (fcport->stats_qfull) {
1172 bfa_reqq_wcancel(&fcport->stats_reqq_wait);
1173 fcport->stats_qfull = BFA_FALSE;
1176 fcport->stats_status = BFA_STATUS_ETIMER;
1177 bfa_cb_queue(fcport->bfa, &fcport->hcb_qe, __bfa_cb_fcport_stats_get,
1178 fcport);
1184 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg;
1187 msg = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
1190 fcport->stats_qfull = BFA_TRUE;
1191 bfa_reqq_winit(&fcport->stats_reqq_wait,
1192 bfa_fcport_send_stats_get, fcport);
1193 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT,
1194 &fcport->stats_reqq_wait);
1197 fcport->stats_qfull = BFA_FALSE;
1201 bfa_lpuid(fcport->bfa));
1202 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT);
1208 struct bfa_fcport_s *fcport = cbarg;
1217 fcport->stats_reset_time = tv.tv_sec;
1219 fcport->stats_cbfn(fcport->stats_cbarg, fcport->stats_status);
1221 fcport->stats_busy = BFA_FALSE;
1222 fcport->stats_status = BFA_STATUS_OK;
1229 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg;
1231 bfa_trc(fcport->bfa, fcport->stats_qfull);
1233 if (fcport->stats_qfull) {
1234 bfa_reqq_wcancel(&fcport->stats_reqq_wait);
1235 fcport->stats_qfull = BFA_FALSE;
1238 fcport->stats_status = BFA_STATUS_ETIMER;
1239 bfa_cb_queue(fcport->bfa, &fcport->hcb_qe,
1240 __bfa_cb_fcport_stats_clr, fcport);
1246 struct bfa_fcport_s *fcport = (struct bfa_fcport_s *) cbarg;
1249 msg = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
1252 fcport->stats_qfull = BFA_TRUE;
1253 bfa_reqq_winit(&fcport->stats_reqq_wait,
1254 bfa_fcport_send_stats_clear, fcport);
1255 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT,
1256 &fcport->stats_reqq_wait);
1259 fcport->stats_qfull = BFA_FALSE;
1263 bfa_lpuid(fcport->bfa));
1264 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT);
1277 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1282 bfa_fcport_set_wwns(fcport);
1283 if (fcport->cfg.maxfrsize == 0)
1284 fcport->cfg.maxfrsize = bfa_ioc_maxfrsize(&bfa->ioc);
1285 fcport->cfg.rx_bbcredit = bfa_ioc_rx_bbcredit(&bfa->ioc);
1286 fcport->speed_sup = bfa_ioc_speed_sup(&bfa->ioc);
1288 bfa_assert(fcport->cfg.maxfrsize);
1289 bfa_assert(fcport->cfg.rx_bbcredit);
1290 bfa_assert(fcport->speed_sup);
1300 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1304 fcport->event_arg.i2hmsg = i2hmsg;
1308 if (fcport->msgtag == i2hmsg.penable_rsp->msgtag)
1309 bfa_sm_send_event(fcport, BFA_FCPORT_SM_FWRSP);
1313 if (fcport->msgtag == i2hmsg.pdisable_rsp->msgtag)
1314 bfa_sm_send_event(fcport, BFA_FCPORT_SM_FWRSP);
1320 bfa_sm_send_event(fcport, BFA_FCPORT_SM_LINKUP);
1323 bfa_sm_send_event(fcport, BFA_FCPORT_SM_LINKDOWN);
1335 if (fcport->stats_busy == BFA_FALSE ||
1336 fcport->stats_status == BFA_STATUS_ETIMER)
1339 bfa_timer_stop(&fcport->timer);
1340 fcport->stats_status = i2hmsg.pstatsget_rsp->status;
1341 bfa_cb_queue(fcport->bfa, &fcport->hcb_qe,
1342 __bfa_cb_fcport_stats_get, fcport);
1349 if (fcport->stats_busy == BFA_FALSE ||
1350 fcport->stats_status == BFA_STATUS_ETIMER)
1353 bfa_timer_stop(&fcport->timer);
1354 fcport->stats_status = BFA_STATUS_OK;
1355 bfa_cb_queue(fcport->bfa, &fcport->hcb_qe,
1356 __bfa_cb_fcport_stats_clr, fcport);
1377 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1379 fcport->event_cbfn = cbfn;
1380 fcport->event_cbarg = cbarg;
1386 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1392 bfa_trc(bfa, fcport->pwwn);
1399 if (fcport->diag_busy)
1412 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1418 bfa_trc(bfa, fcport->pwwn);
1432 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1436 if ((speed != BFA_PPORT_SPEED_AUTO) && (speed > fcport->speed_sup)) {
1437 bfa_trc(bfa, fcport->speed_sup);
1441 fcport->cfg.speed = speed;
1452 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1454 return fcport->speed;
1463 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1466 bfa_trc(bfa, fcport->cfg.topology);
1478 fcport->cfg.topology = topology;
1488 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1490 return fcport->topology;
1496 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1499 bfa_trc(bfa, fcport->cfg.cfg_hardalpa);
1500 bfa_trc(bfa, fcport->cfg.hardalpa);
1502 fcport->cfg.cfg_hardalpa = BFA_TRUE;
1503 fcport->cfg.hardalpa = alpa;
1511 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1513 bfa_trc(bfa, fcport->cfg.cfg_hardalpa);
1514 bfa_trc(bfa, fcport->cfg.hardalpa);
1516 fcport->cfg.cfg_hardalpa = BFA_FALSE;
1523 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1525 *alpa = fcport->cfg.hardalpa;
1526 return fcport->cfg.cfg_hardalpa;
1532 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1534 return fcport->myalpa;
1540 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1543 bfa_trc(bfa, fcport->cfg.maxfrsize);
1557 fcport->cfg.maxfrsize = maxfrsize;
1564 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1566 return fcport->cfg.maxfrsize;
1572 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1574 return fcport->mypid;
1580 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1582 return fcport->cfg.rx_bbcredit;
1588 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1590 fcport->cfg.tx_bbcredit = (u8) tx_bbcredit;
1591 bfa_fcport_send_txcredit(fcport);
1601 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1603 return fcport->nwwn;
1605 return fcport->pwwn;
1611 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1617 attr->nwwn = fcport->nwwn;
1618 attr->pwwn = fcport->pwwn;
1623 bfa_os_memcpy(&attr->pport_cfg, &fcport->cfg,
1628 attr->pport_cfg.speed = fcport->cfg.speed;
1629 attr->speed_supported = fcport->speed_sup;
1630 attr->speed = fcport->speed;
1636 attr->pport_cfg.topology = fcport->cfg.topology;
1637 attr->topology = fcport->topology;
1642 attr->beacon = fcport->beacon;
1643 attr->link_e2e_beacon = fcport->link_e2e_beacon;
1644 attr->plog_enabled = bfa_plog_get_setting(fcport->bfa->plog);
1654 hal_pport_sm_table, fcport->sm);
1655 if (bfa_ioc_is_disabled(&fcport->bfa->ioc))
1657 else if (bfa_ioc_fw_mismatch(&fcport->bfa->ioc))
1671 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1673 if (fcport->stats_busy) {
1674 bfa_trc(bfa, fcport->stats_busy);
1678 fcport->stats_busy = BFA_TRUE;
1679 fcport->stats_ret = stats;
1680 fcport->stats_cbfn = cbfn;
1681 fcport->stats_cbarg = cbarg;
1683 bfa_fcport_send_stats_get(fcport);
1685 bfa_timer_start(bfa, &fcport->timer, bfa_fcport_stats_get_timeout,
1686 fcport, BFA_FCPORT_STATS_TOV);
1696 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1698 if (fcport->stats_busy) {
1699 bfa_trc(bfa, fcport->stats_busy);
1703 fcport->stats_busy = BFA_TRUE;
1704 fcport->stats_cbfn = cbfn;
1705 fcport->stats_cbarg = cbarg;
1707 bfa_fcport_send_stats_clear(fcport);
1709 bfa_timer_start(bfa, &fcport->timer, bfa_fcport_stats_clr_timeout,
1710 fcport, BFA_FCPORT_STATS_TOV);
1767 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1770 bfa_trc(bfa, fcport->cfg.trunked);
1771 bfa_trc(bfa, fcport->cfg.trunk_ports);
1776 fcport->cfg.trunked = BFA_TRUE;
1777 fcport->cfg.trunk_ports = bitmap;
1785 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1787 qos_attr->state = bfa_os_ntohl(fcport->qos_attr.state);
1788 qos_attr->total_bb_cr = bfa_os_ntohl(fcport->qos_attr.total_bb_cr);
1795 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1796 struct bfa_qos_vc_attr_s *bfa_vc_attr = &fcport->qos_vc_attr;
1830 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1832 *bitmap = fcport->cfg.trunk_ports;
1833 return fcport->cfg.trunked;
1839 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1841 return bfa_sm_to_state(hal_pport_sm_table, fcport->sm) ==
1849 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1851 return fcport->cfg.ratelimit ? BFA_TRUE : BFA_FALSE;
1858 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1862 bfa_trc(bfa, fcport->cfg.qos_enabled);
1867 fcport->cfg.qos_enabled = on_off;
1878 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1881 bfa_trc(bfa, fcport->cfg.ratelimit);
1883 fcport->cfg.ratelimit = on_off;
1884 if (fcport->cfg.trl_def_speed == BFA_PPORT_SPEED_UNKNOWN)
1885 fcport->cfg.trl_def_speed = BFA_PPORT_SPEED_1GBPS;
1894 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1901 if ((speed == BFA_PPORT_SPEED_AUTO) || (speed > fcport->speed_sup)) {
1902 bfa_trc(bfa, fcport->speed_sup);
1906 fcport->cfg.trl_def_speed = speed;
1917 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1919 bfa_trc(bfa, fcport->cfg.trl_def_speed);
1920 return fcport->cfg.trl_def_speed;
1927 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1930 bfa_trc(bfa, fcport->diag_busy);
1932 fcport->diag_busy = status;
1939 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1943 bfa_trc(bfa, fcport->beacon);
1944 bfa_trc(bfa, fcport->link_e2e_beacon);
1946 fcport->beacon = beacon;
1947 fcport->link_e2e_beacon = link_e2e_beacon;
1959 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
1961 return fcport->cfg.qos_enabled;