• Home
  • Raw
  • Download

Lines Matching refs:ln

117 	struct csio_lnode *ln;  in csio_ln_lookup_by_portid()  local
122 ln = (struct csio_lnode *) tmp; in csio_ln_lookup_by_portid()
123 if (ln->portid == portid) in csio_ln_lookup_by_portid()
124 return ln; in csio_ln_lookup_by_portid()
270 struct csio_lnode *ln = fdmi_req->lnode; in csio_ln_fdmi_done() local
273 csio_ln_dbg(ln, "WR error:%x in processing fdmi rpa cmd\n", in csio_ln_fdmi_done()
275 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_done()
280 csio_ln_dbg(ln, "fdmi rpa cmd rejected reason %x expl %x\n", in csio_ln_fdmi_done()
299 struct csio_lnode *ln = fdmi_req->lnode; in csio_ln_fdmi_rhba_cbfn() local
307 csio_ln_dbg(ln, "WR error:%x in processing fdmi rhba cmd\n", in csio_ln_fdmi_rhba_cbfn()
309 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_rhba_cbfn()
314 csio_ln_dbg(ln, "fdmi rhba cmd rejected reason %x expl %x\n", in csio_ln_fdmi_rhba_cbfn()
319 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_rhba_cbfn()
330 memcpy(&port_name->portname, csio_ln_wwpn(ln), 8); in csio_ln_fdmi_rhba_cbfn()
352 if (hw->pport[ln->portid].link_speed == FW_PORT_CAP_SPEED_1G) in csio_ln_fdmi_rhba_cbfn()
354 else if (hw->pport[ln->portid].link_speed == FW_PORT_CAP_SPEED_10G) in csio_ln_fdmi_rhba_cbfn()
356 else if (hw->pport[ln->portid].link_speed == FW_PORT_CAP32_SPEED_25G) in csio_ln_fdmi_rhba_cbfn()
358 else if (hw->pport[ln->portid].link_speed == FW_PORT_CAP32_SPEED_40G) in csio_ln_fdmi_rhba_cbfn()
360 else if (hw->pport[ln->portid].link_speed == FW_PORT_CAP32_SPEED_50G) in csio_ln_fdmi_rhba_cbfn()
362 else if (hw->pport[ln->portid].link_speed == FW_PORT_CAP32_SPEED_100G) in csio_ln_fdmi_rhba_cbfn()
370 mfs = ln->ln_sparm.csp.sp_bb_data; in csio_ln_fdmi_rhba_cbfn()
392 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_rhba_cbfn()
393 csio_ln_dbg(ln, "Failed to issue fdmi rpa req\n"); in csio_ln_fdmi_rhba_cbfn()
412 struct csio_lnode *ln = fdmi_req->lnode; in csio_ln_fdmi_dprt_cbfn() local
419 csio_ln_dbg(ln, "WR error:%x in processing fdmi dprt cmd\n", in csio_ln_fdmi_dprt_cbfn()
421 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_dprt_cbfn()
425 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_dprt_cbfn()
430 csio_ln_dbg(ln, "fdmi dprt cmd rejected reason %x expl %x\n", in csio_ln_fdmi_dprt_cbfn()
442 memcpy(&hbaid->id, csio_ln_wwpn(ln), 8); /* HBA identifer */ in csio_ln_fdmi_dprt_cbfn()
448 memcpy(&reg_pl->port[0].portname, csio_ln_wwpn(ln), 8); in csio_ln_fdmi_dprt_cbfn()
457 csio_append_attrib(&pld, FC_FDMI_HBA_ATTR_NODENAME, csio_ln_wwnn(ln), in csio_ln_fdmi_dprt_cbfn()
499 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_dprt_cbfn()
500 csio_ln_dbg(ln, "Failed to issue fdmi rhba req\n"); in csio_ln_fdmi_dprt_cbfn()
513 struct csio_lnode *ln = fdmi_req->lnode; in csio_ln_fdmi_dhba_cbfn() local
520 csio_ln_dbg(ln, "WR error:%x in processing fdmi dhba cmd\n", in csio_ln_fdmi_dhba_cbfn()
522 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_dhba_cbfn()
526 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_dhba_cbfn()
531 csio_ln_dbg(ln, "fdmi dhba cmd rejected reason %x expl %x\n", in csio_ln_fdmi_dhba_cbfn()
544 memcpy(&port_name->portname, csio_ln_wwpn(ln), 8); in csio_ln_fdmi_dhba_cbfn()
551 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_dhba_cbfn()
552 csio_ln_dbg(ln, "Failed to issue fdmi dprt req\n"); in csio_ln_fdmi_dhba_cbfn()
565 csio_ln_fdmi_start(struct csio_lnode *ln, void *context) in csio_ln_fdmi_start() argument
573 if (!(ln->flags & CSIO_LNF_FDMI_ENABLE)) in csio_ln_fdmi_start()
577 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_start()
583 fdmi_req = ln->mgmt_req; in csio_ln_fdmi_start()
584 fdmi_req->lnode = ln; in csio_ln_fdmi_start()
594 memcpy(&hbaid->id, csio_ln_wwpn(ln), 8); in csio_ln_fdmi_start()
600 CSIO_INC_STATS(ln, n_fdmi_err); in csio_ln_fdmi_start()
601 csio_ln_dbg(ln, "Failed to issue fdmi dhba req\n"); in csio_ln_fdmi_start()
617 struct csio_lnode *ln = ((struct csio_lnode *)mbp->priv); in csio_ln_vnp_read_cbfn() local
633 memcpy(ln->mac, rsp->vnport_mac, sizeof(ln->mac)); in csio_ln_vnp_read_cbfn()
635 ln->nport_id = ntohl(nport_id); in csio_ln_vnp_read_cbfn()
636 ln->nport_id = ln->nport_id >> 8; in csio_ln_vnp_read_cbfn()
644 memcpy(csio_ln_wwnn(ln), rsp->vnport_wwnn, 8); in csio_ln_vnp_read_cbfn()
645 memcpy(csio_ln_wwpn(ln), rsp->vnport_wwpn, 8); in csio_ln_vnp_read_cbfn()
649 ln->ln_sparm.csp.sp_hi_ver = csp->sp_hi_ver; in csio_ln_vnp_read_cbfn()
650 ln->ln_sparm.csp.sp_lo_ver = csp->sp_lo_ver; in csio_ln_vnp_read_cbfn()
651 ln->ln_sparm.csp.sp_bb_cred = csp->sp_bb_cred; in csio_ln_vnp_read_cbfn()
652 ln->ln_sparm.csp.sp_features = csp->sp_features; in csio_ln_vnp_read_cbfn()
653 ln->ln_sparm.csp.sp_bb_data = csp->sp_bb_data; in csio_ln_vnp_read_cbfn()
654 ln->ln_sparm.csp.sp_r_a_tov = csp->sp_r_a_tov; in csio_ln_vnp_read_cbfn()
655 ln->ln_sparm.csp.sp_e_d_tov = csp->sp_e_d_tov; in csio_ln_vnp_read_cbfn()
659 ln->ln_sparm.clsp[2].cp_class = clsp->cp_class; in csio_ln_vnp_read_cbfn()
660 ln->ln_sparm.clsp[2].cp_init = clsp->cp_init; in csio_ln_vnp_read_cbfn()
661 ln->ln_sparm.clsp[2].cp_recip = clsp->cp_recip; in csio_ln_vnp_read_cbfn()
662 ln->ln_sparm.clsp[2].cp_rdfs = clsp->cp_rdfs; in csio_ln_vnp_read_cbfn()
669 csio_lnode_async_event(ln, CSIO_LN_FC_ATTRIB_UPDATE); in csio_ln_vnp_read_cbfn()
680 csio_ln_vnp_read(struct csio_lnode *ln, in csio_ln_vnp_read() argument
683 struct csio_hw *hw = ln->hwp; in csio_ln_vnp_read()
694 csio_fcoe_vnp_read_init_mb(ln, mbp, in csio_ln_vnp_read()
696 ln->fcf_flowid, in csio_ln_vnp_read()
697 ln->vnp_flowid, in csio_ln_vnp_read()
718 csio_fcoe_enable_link(struct csio_lnode *ln, bool enable) in csio_fcoe_enable_link() argument
720 struct csio_hw *hw = ln->hwp; in csio_fcoe_enable_link()
734 portid = ln->portid; in csio_fcoe_enable_link()
740 csio_write_fcoe_link_cond_init_mb(ln, mbp, CSIO_MB_DEFAULT_TMO, in csio_fcoe_enable_link()
764 memcpy(csio_ln_wwnn(ln), lcmd->vnport_wwnn, 8); in csio_fcoe_enable_link()
765 memcpy(csio_ln_wwpn(ln), lcmd->vnport_wwpn, 8); in csio_fcoe_enable_link()
785 struct csio_lnode *ln = (struct csio_lnode *)mbp->priv; in csio_ln_read_fcf_cbfn() local
793 csio_ln_err(ln, "FCOE FCF cmd failed with ret x%x\n", in csio_ln_read_fcf_cbfn()
800 fcf_info = ln->fcfinfo; in csio_ln_read_fcf_cbfn()
831 csio_ln_read_fcf_entry(struct csio_lnode *ln, in csio_ln_read_fcf_entry() argument
834 struct csio_hw *hw = ln->hwp; in csio_ln_read_fcf_entry()
844 csio_fcoe_read_fcf_init_mb(ln, mbp, CSIO_MB_DEFAULT_TMO, in csio_ln_read_fcf_entry()
845 ln->portid, ln->fcf_flowid, cbfn); in csio_ln_read_fcf_entry()
876 struct csio_lnode *ln = NULL; in csio_handle_link_up() local
879 ln = csio_ln_lookup_by_vnpi(hw, vnpi); in csio_handle_link_up()
880 if (!ln) { in csio_handle_link_up()
882 ln = csio_ln_lookup_by_portid(hw, portid); in csio_handle_link_up()
883 if (!ln) { in csio_handle_link_up()
891 if (ln->vnp_flowid != CSIO_INVALID_IDX) { in csio_handle_link_up()
896 if (!ln) { in csio_handle_link_up()
904 ln->portid = portid; in csio_handle_link_up()
906 ln->vnp_flowid = vnpi; in csio_handle_link_up()
907 ln->dev_num &= ~0xFFFF; in csio_handle_link_up()
908 ln->dev_num |= vnpi; in csio_handle_link_up()
912 ln->fcf_flowid = fcfi; in csio_handle_link_up()
916 CSIO_INC_STATS(ln, n_link_up); in csio_handle_link_up()
919 csio_post_event(&ln->sm, CSIO_LNE_LINKUP); in csio_handle_link_up()
935 csio_post_event_rns(struct csio_lnode *ln, enum csio_rn_ev evt) in csio_post_event_rns() argument
937 struct csio_rnode *rnhead = (struct csio_rnode *) &ln->rnhead; in csio_post_event_rns()
957 csio_cleanup_rns(struct csio_lnode *ln) in csio_cleanup_rns() argument
959 struct csio_rnode *rnhead = (struct csio_rnode *) &ln->rnhead; in csio_cleanup_rns()
965 csio_put_rnode(ln, rn); in csio_cleanup_rns()
983 csio_post_event_lns(struct csio_lnode *ln, enum csio_ln_ev evt) in csio_post_event_lns() argument
989 if (csio_is_npiv_ln(ln)) { in csio_post_event_lns()
990 csio_post_event(&ln->sm, evt); in csio_post_event_lns()
994 sln = ln; in csio_post_event_lns()
1002 csio_post_event(&ln->sm, evt); in csio_post_event_lns()
1015 csio_ln_down(struct csio_lnode *ln) in csio_ln_down() argument
1017 csio_post_event_lns(ln, CSIO_LNE_LINK_DOWN); in csio_ln_down()
1039 struct csio_lnode *ln; in csio_handle_link_down() local
1042 ln = csio_ln_lookup_by_vnpi(hw, vnpi); in csio_handle_link_down()
1043 if (ln) { in csio_handle_link_down()
1044 fp = ln->fcfinfo; in csio_handle_link_down()
1045 CSIO_INC_STATS(ln, n_link_down); in csio_handle_link_down()
1048 if (!csio_is_lnode_ready(ln)) { in csio_handle_link_down()
1049 csio_ln_warn(ln, in csio_handle_link_down()
1053 CSIO_INC_STATS(ln, n_evt_drop); in csio_handle_link_down()
1059 csio_ln_warn(ln, in csio_handle_link_down()
1062 CSIO_INC_STATS(ln, n_evt_drop); in csio_handle_link_down()
1067 if (ln->fcf_flowid != fcfi) { in csio_handle_link_down()
1068 csio_ln_warn(ln, in csio_handle_link_down()
1071 CSIO_INC_STATS(ln, n_evt_drop); in csio_handle_link_down()
1078 csio_ln_down(ln); in csio_handle_link_down()
1096 csio_is_lnode_ready(struct csio_lnode *ln) in csio_is_lnode_ready() argument
1098 return (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_ready)); in csio_is_lnode_ready()
1114 csio_lns_uninit(struct csio_lnode *ln, enum csio_ln_ev evt) in csio_lns_uninit() argument
1116 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_lns_uninit()
1120 CSIO_INC_STATS(ln, n_evt_sm[evt]); in csio_lns_uninit()
1123 csio_set_state(&ln->sm, csio_lns_online); in csio_lns_uninit()
1125 if (csio_is_phys_ln(ln)) { in csio_lns_uninit()
1126 rv = csio_ln_read_fcf_entry(ln, in csio_lns_uninit()
1130 CSIO_INC_STATS(ln, n_err); in csio_lns_uninit()
1135 list_add_tail(&ln->fcfinfo->list, &rln->fcf_lsthead); in csio_lns_uninit()
1138 rv = csio_ln_vnp_read(ln, csio_ln_vnp_read_cbfn); in csio_lns_uninit()
1141 CSIO_INC_STATS(ln, n_err); in csio_lns_uninit()
1149 csio_ln_dbg(ln, in csio_lns_uninit()
1151 "ln state[uninit].\n", evt, ln->nport_id); in csio_lns_uninit()
1152 CSIO_INC_STATS(ln, n_evt_unexp); in csio_lns_uninit()
1167 csio_lns_online(struct csio_lnode *ln, enum csio_ln_ev evt) in csio_lns_online() argument
1169 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_lns_online()
1171 CSIO_INC_STATS(ln, n_evt_sm[evt]); in csio_lns_online()
1174 csio_ln_warn(ln, in csio_lns_online()
1176 "Ignoring linkup on port:%d\n", ln->portid); in csio_lns_online()
1177 CSIO_INC_STATS(ln, n_evt_drop); in csio_lns_online()
1181 csio_set_state(&ln->sm, csio_lns_ready); in csio_lns_online()
1184 csio_lnode_async_event(ln, CSIO_LN_FC_LINKUP); in csio_lns_online()
1191 csio_set_state(&ln->sm, csio_lns_uninit); in csio_lns_online()
1192 if (csio_is_phys_ln(ln)) { in csio_lns_online()
1194 list_del_init(&ln->fcfinfo->list); in csio_lns_online()
1199 csio_ln_dbg(ln, in csio_lns_online()
1201 "ln state[uninit].\n", evt, ln->nport_id); in csio_lns_online()
1202 CSIO_INC_STATS(ln, n_evt_unexp); in csio_lns_online()
1218 csio_lns_ready(struct csio_lnode *ln, enum csio_ln_ev evt) in csio_lns_ready() argument
1220 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_lns_ready()
1222 CSIO_INC_STATS(ln, n_evt_sm[evt]); in csio_lns_ready()
1225 csio_ln_dbg(ln, in csio_lns_ready()
1227 "in ln state[ready].\n", evt, ln->nport_id); in csio_lns_ready()
1228 CSIO_INC_STATS(ln, n_evt_drop); in csio_lns_ready()
1232 csio_set_state(&ln->sm, csio_lns_offline); in csio_lns_ready()
1233 csio_post_event_rns(ln, CSIO_RNFE_DOWN); in csio_lns_ready()
1236 csio_lnode_async_event(ln, CSIO_LN_FC_LINKDOWN); in csio_lns_ready()
1239 if (csio_is_phys_ln(ln)) { in csio_lns_ready()
1241 list_del_init(&ln->fcfinfo->list); in csio_lns_ready()
1246 csio_set_state(&ln->sm, csio_lns_offline); in csio_lns_ready()
1247 csio_post_event_rns(ln, CSIO_RNFE_DOWN); in csio_lns_ready()
1253 csio_lnode_async_event(ln, CSIO_LN_FC_LINKDOWN); in csio_lns_ready()
1256 if (csio_is_phys_ln(ln)) { in csio_lns_ready()
1258 list_del_init(&ln->fcfinfo->list); in csio_lns_ready()
1263 csio_set_state(&ln->sm, csio_lns_uninit); in csio_lns_ready()
1264 csio_post_event_rns(ln, CSIO_RNFE_CLOSE); in csio_lns_ready()
1268 csio_set_state(&ln->sm, csio_lns_offline); in csio_lns_ready()
1269 csio_post_event_rns(ln, CSIO_RNFE_DOWN); in csio_lns_ready()
1273 csio_ln_dbg(ln, in csio_lns_ready()
1275 "ln state[uninit].\n", evt, ln->nport_id); in csio_lns_ready()
1276 CSIO_INC_STATS(ln, n_evt_unexp); in csio_lns_ready()
1292 csio_lns_offline(struct csio_lnode *ln, enum csio_ln_ev evt) in csio_lns_offline() argument
1294 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_lns_offline()
1298 CSIO_INC_STATS(ln, n_evt_sm[evt]); in csio_lns_offline()
1301 csio_set_state(&ln->sm, csio_lns_online); in csio_lns_offline()
1303 if (csio_is_phys_ln(ln)) { in csio_lns_offline()
1304 rv = csio_ln_read_fcf_entry(ln, in csio_lns_offline()
1308 CSIO_INC_STATS(ln, n_err); in csio_lns_offline()
1313 list_add_tail(&ln->fcfinfo->list, &rln->fcf_lsthead); in csio_lns_offline()
1316 rv = csio_ln_vnp_read(ln, csio_ln_vnp_read_cbfn); in csio_lns_offline()
1319 CSIO_INC_STATS(ln, n_err); in csio_lns_offline()
1326 csio_ln_dbg(ln, in csio_lns_offline()
1328 "in ln state[offline].\n", evt, ln->nport_id); in csio_lns_offline()
1329 CSIO_INC_STATS(ln, n_evt_drop); in csio_lns_offline()
1333 csio_set_state(&ln->sm, csio_lns_uninit); in csio_lns_offline()
1334 csio_post_event_rns(ln, CSIO_RNFE_CLOSE); in csio_lns_offline()
1338 csio_ln_dbg(ln, in csio_lns_offline()
1340 "ln state[offline]\n", evt, ln->nport_id); in csio_lns_offline()
1341 CSIO_INC_STATS(ln, n_evt_unexp); in csio_lns_offline()
1367 csio_lnode_state_to_str(struct csio_lnode *ln, int8_t *str) in csio_lnode_state_to_str() argument
1369 if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_uninit)) { in csio_lnode_state_to_str()
1373 if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_ready)) { in csio_lnode_state_to_str()
1377 if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_offline)) { in csio_lnode_state_to_str()
1485 struct csio_lnode *ln; in csio_fcoe_fwevt_handler() local
1553 ln = csio_ln_lookup_by_vnpi(hw, vnpi); in csio_fcoe_fwevt_handler()
1554 if (!ln) { in csio_fcoe_fwevt_handler()
1562 rn = csio_confirm_rnode(ln, rdev_flowid, in csio_fcoe_fwevt_handler()
1565 csio_ln_dbg(ln, in csio_fcoe_fwevt_handler()
1573 ln->prev_evt = ln->cur_evt; in csio_fcoe_fwevt_handler()
1574 ln->cur_evt = rdev_wr->event_cause; in csio_fcoe_fwevt_handler()
1575 CSIO_INC_STATS(ln, n_evt_fw[rdev_wr->event_cause]); in csio_fcoe_fwevt_handler()
1580 csio_ln_dbg(ln, in csio_fcoe_fwevt_handler()
1584 csio_post_event(&ln->sm, evt); in csio_fcoe_fwevt_handler()
1620 csio_lnode_start(struct csio_lnode *ln) in csio_lnode_start() argument
1623 if (csio_is_phys_ln(ln) && !(ln->flags & CSIO_LNF_LINK_ENABLE)) { in csio_lnode_start()
1624 rv = csio_fcoe_enable_link(ln, 1); in csio_lnode_start()
1625 ln->flags |= CSIO_LNF_LINK_ENABLE; in csio_lnode_start()
1639 csio_lnode_stop(struct csio_lnode *ln) in csio_lnode_stop() argument
1641 csio_post_event_lns(ln, CSIO_LNE_DOWN_LINK); in csio_lnode_stop()
1642 if (csio_is_phys_ln(ln) && (ln->flags & CSIO_LNF_LINK_ENABLE)) { in csio_lnode_stop()
1643 csio_fcoe_enable_link(ln, 0); in csio_lnode_stop()
1644 ln->flags &= ~CSIO_LNF_LINK_ENABLE; in csio_lnode_stop()
1646 csio_ln_dbg(ln, "stopping ln :%p\n", ln); in csio_lnode_stop()
1658 csio_lnode_close(struct csio_lnode *ln) in csio_lnode_close() argument
1660 csio_post_event_lns(ln, CSIO_LNE_CLOSE); in csio_lnode_close()
1661 if (csio_is_phys_ln(ln)) in csio_lnode_close()
1662 ln->vnp_flowid = CSIO_INVALID_IDX; in csio_lnode_close()
1664 csio_ln_dbg(ln, "closed ln :%p\n", ln); in csio_lnode_close()
1729 struct csio_lnode *ln = io_req->lnode; in csio_ln_mgmt_submit_wr() local
1763 ln->nport_id, rn->nport_id, in csio_ln_mgmt_submit_wr()
1834 csio_ln_fdmi_init(struct csio_lnode *ln) in csio_ln_fdmi_init() argument
1836 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_ln_fdmi_init()
1840 ln->mgmt_req = kzalloc(sizeof(struct csio_ioreq), GFP_KERNEL); in csio_ln_fdmi_init()
1841 if (!ln->mgmt_req) { in csio_ln_fdmi_init()
1842 csio_ln_err(ln, "Failed to alloc ioreq for FDMI\n"); in csio_ln_fdmi_init()
1848 dma_buf = &ln->mgmt_req->dma_buf; in csio_ln_fdmi_init()
1854 kfree(ln->mgmt_req); in csio_ln_fdmi_init()
1855 ln->mgmt_req = NULL; in csio_ln_fdmi_init()
1859 ln->flags |= CSIO_LNF_FDMI_ENABLE; in csio_ln_fdmi_init()
1868 csio_ln_fdmi_exit(struct csio_lnode *ln) in csio_ln_fdmi_exit() argument
1871 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_ln_fdmi_exit()
1873 if (!ln->mgmt_req) in csio_ln_fdmi_exit()
1876 dma_buf = &ln->mgmt_req->dma_buf; in csio_ln_fdmi_exit()
1881 kfree(ln->mgmt_req); in csio_ln_fdmi_exit()
1886 csio_scan_done(struct csio_lnode *ln, unsigned long ticks, in csio_scan_done() argument
1895 if (!ln->tgt_scan_tick) in csio_scan_done()
1896 ln->tgt_scan_tick = ticks; in csio_scan_done()
1898 if (((ticks - ln->tgt_scan_tick) >= delta_scan_ticks)) { in csio_scan_done()
1899 if (!ln->last_scan_ntgts) in csio_scan_done()
1900 ln->last_scan_ntgts = ln->n_scsi_tgts; in csio_scan_done()
1902 if (ln->last_scan_ntgts == ln->n_scsi_tgts) in csio_scan_done()
1905 ln->last_scan_ntgts = ln->n_scsi_tgts; in csio_scan_done()
1907 ln->tgt_scan_tick = ticks; in csio_scan_done()
1926 struct csio_lnode *ln; in csio_notify_lnodes() local
1932 ln = (struct csio_lnode *) tmp; in csio_notify_lnodes()
1936 csio_lnode_start(ln); in csio_notify_lnodes()
1941 csio_lnode_close(ln); in csio_notify_lnodes()
1945 csio_lnode_stop(ln); in csio_notify_lnodes()
1968 struct csio_lnode *ln; in csio_disable_lnodes() local
1974 ln = (struct csio_lnode *) tmp; in csio_disable_lnodes()
1975 if (ln->portid != portid) in csio_disable_lnodes()
1979 csio_lnode_stop(ln); in csio_disable_lnodes()
1981 csio_lnode_start(ln); in csio_disable_lnodes()
1991 csio_ln_init(struct csio_lnode *ln) in csio_ln_init() argument
1995 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_ln_init()
1997 csio_init_state(&ln->sm, csio_lns_uninit); in csio_ln_init()
1998 ln->vnp_flowid = CSIO_INVALID_IDX; in csio_ln_init()
1999 ln->fcf_flowid = CSIO_INVALID_IDX; in csio_ln_init()
2001 if (csio_is_root_ln(ln)) { in csio_ln_init()
2005 ln->fcfinfo = kzalloc(sizeof(struct csio_fcf_info), GFP_KERNEL); in csio_ln_init()
2006 if (!ln->fcfinfo) { in csio_ln_init()
2007 csio_ln_err(ln, "Failed to alloc FCF record\n"); in csio_ln_init()
2012 INIT_LIST_HEAD(&ln->fcf_lsthead); in csio_ln_init()
2013 kref_init(&ln->fcfinfo->kref); in csio_ln_init()
2015 if (csio_fdmi_enable && csio_ln_fdmi_init(ln)) in csio_ln_init()
2025 if (csio_is_npiv_ln(ln)) { in csio_ln_init()
2027 pln = csio_parent_lnode(ln); in csio_ln_init()
2029 ln->fcfinfo = pln->fcfinfo; in csio_ln_init()
2032 ln->fcfinfo = kzalloc(sizeof(struct csio_fcf_info), in csio_ln_init()
2034 if (!ln->fcfinfo) { in csio_ln_init()
2035 csio_ln_err(ln, "Failed to alloc FCF info\n"); in csio_ln_init()
2040 kref_init(&ln->fcfinfo->kref); in csio_ln_init()
2042 if (csio_fdmi_enable && csio_ln_fdmi_init(ln)) in csio_ln_init()
2054 csio_ln_exit(struct csio_lnode *ln) in csio_ln_exit() argument
2058 csio_cleanup_rns(ln); in csio_ln_exit()
2059 if (csio_is_npiv_ln(ln)) { in csio_ln_exit()
2060 pln = csio_parent_lnode(ln); in csio_ln_exit()
2063 kref_put(&ln->fcfinfo->kref, csio_free_fcfinfo); in csio_ln_exit()
2065 csio_ln_fdmi_exit(ln); in csio_ln_exit()
2067 ln->fcfinfo = NULL; in csio_ln_exit()
2075 csio_lnode_init(struct csio_lnode *ln, struct csio_hw *hw, in csio_lnode_init() argument
2081 csio_lnode_to_hw(ln) = hw; in csio_lnode_init()
2085 ln->pln = pln; in csio_lnode_init()
2087 ln->pln = NULL; in csio_lnode_init()
2090 ln->n_scsi_tgts = 0; in csio_lnode_init()
2091 ln->last_scan_ntgts = 0; in csio_lnode_init()
2092 ln->tgt_scan_tick = 0; in csio_lnode_init()
2095 INIT_LIST_HEAD(&ln->rnhead); in csio_lnode_init()
2096 INIT_LIST_HEAD(&ln->cln_head); in csio_lnode_init()
2099 ln->params.log_level = hw->params.log_level; in csio_lnode_init()
2101 if (csio_ln_init(ln)) in csio_lnode_init()
2106 list_add_tail(&ln->sm.sm_list, pln ? &pln->cln_head : &hw->sln_head); in csio_lnode_init()
2115 csio_lnode_to_hw(ln) = NULL; in csio_lnode_init()
2125 csio_lnode_exit(struct csio_lnode *ln) in csio_lnode_exit() argument
2127 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_lnode_exit()
2129 csio_ln_exit(ln); in csio_lnode_exit()
2134 list_del_init(&ln->sm.sm_list); in csio_lnode_exit()
2139 if (ln->pln) in csio_lnode_exit()
2140 ln->pln->num_vports--; in csio_lnode_exit()
2150 csio_lnode_to_hw(ln) = NULL; in csio_lnode_exit()