Lines Matching refs:ln
48 csio_vport_set_state(struct csio_lnode *ln);
61 struct csio_lnode *ln = csio_rnode_to_lnode(rn); in csio_reg_rnode() local
62 struct Scsi_Host *shost = csio_ln_to_shost(ln); in csio_reg_rnode()
80 csio_ln_err(ln, "Failed to register rport = 0x%x.\n", in csio_reg_rnode()
85 ln->num_reg_rnodes++; in csio_reg_rnode()
108 csio_ln_dbg(ln, "Remote port x%x role 0x%x registered\n", in csio_reg_rnode()
123 struct csio_lnode *ln = csio_rnode_to_lnode(rn); in csio_unreg_rnode() local
128 ln->num_reg_rnodes--; in csio_unreg_rnode()
130 csio_ln_dbg(ln, "Remote port x%x un-registered\n", rn->nport_id); in csio_unreg_rnode()
141 csio_lnode_async_event(struct csio_lnode *ln, enum csio_ln_fc_evt fc_evt) in csio_lnode_async_event() argument
157 if (csio_is_npiv_ln(ln)) in csio_lnode_async_event()
158 csio_vport_set_state(ln); in csio_lnode_async_event()
164 if (csio_is_npiv_ln(ln)) in csio_lnode_async_event()
165 csio_vport_set_state(ln); in csio_lnode_async_event()
169 csio_fchost_attr_init(ln); in csio_lnode_async_event()
182 csio_fchost_attr_init(struct csio_lnode *ln) in csio_fchost_attr_init() argument
184 struct Scsi_Host *shost = csio_ln_to_shost(ln); in csio_fchost_attr_init()
186 fc_host_node_name(shost) = wwn_to_u64(csio_ln_wwnn(ln)); in csio_fchost_attr_init()
187 fc_host_port_name(shost) = wwn_to_u64(csio_ln_wwpn(ln)); in csio_fchost_attr_init()
191 (csio_lnode_to_hw(ln))->fres_info.max_vnps; in csio_fchost_attr_init()
195 fc_host_maxframe_size(shost) = ntohs(ln->ln_sparm.csp.sp_bb_data); in csio_fchost_attr_init()
212 struct csio_lnode *ln = shost_priv(shost); in csio_get_host_port_id() local
213 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_get_host_port_id()
216 fc_host_port_id(shost) = ln->nport_id; in csio_get_host_port_id()
228 struct csio_lnode *ln = shost_priv(shost); in csio_get_host_port_type() local
229 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_get_host_port_type()
232 if (csio_is_npiv_ln(ln)) in csio_get_host_port_type()
247 struct csio_lnode *ln = shost_priv(shost); in csio_get_host_port_state() local
248 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_get_host_port_state()
253 csio_lnode_state_to_str(ln, state); in csio_get_host_port_state()
272 struct csio_lnode *ln = shost_priv(shost); in csio_get_host_speed() local
273 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_get_host_speed()
276 switch (hw->pport[ln->portid].link_speed) { in csio_get_host_speed()
310 struct csio_lnode *ln = shost_priv(shost); in csio_get_host_fabric_name() local
312 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_get_host_fabric_name()
315 rn = csio_rnode_lookup_portid(ln, FC_FID_FLOGI); in csio_get_host_fabric_name()
331 struct csio_lnode *ln = shost_priv(shost); in csio_get_stats() local
332 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_get_stats()
333 struct fc_host_statistics *fhs = &ln->fch_stats; in csio_get_stats()
338 csio_get_phy_port_stats(hw, ln->portid, &fcoe_port_stats); in csio_get_stats()
357 fhs->fcp_input_requests += ln->stats.n_input_requests; in csio_get_stats()
358 fhs->fcp_output_requests += ln->stats.n_output_requests; in csio_get_stats()
359 fhs->fcp_control_requests += ln->stats.n_control_requests; in csio_get_stats()
360 fhs->fcp_input_megabytes += ln->stats.n_input_bytes >> 20; in csio_get_stats()
361 fhs->fcp_output_megabytes += ln->stats.n_output_bytes >> 20; in csio_get_stats()
362 fhs->link_failure_count = ln->stats.n_link_down; in csio_get_stats()
389 csio_vport_set_state(struct csio_lnode *ln) in csio_vport_set_state() argument
391 struct fc_vport *fc_vport = ln->fc_vport; in csio_vport_set_state()
392 struct csio_lnode *pln = ln->pln; in csio_vport_set_state()
408 csio_lnode_state_to_str(ln, state); in csio_vport_set_state()
417 csio_fcoe_alloc_vnp(struct csio_hw *hw, struct csio_lnode *ln) in csio_fcoe_alloc_vnp() argument
435 pln = ln->pln; in csio_fcoe_alloc_vnp()
436 ln->fcf_flowid = pln->fcf_flowid; in csio_fcoe_alloc_vnp()
437 ln->portid = pln->portid; in csio_fcoe_alloc_vnp()
439 csio_fcoe_vnp_alloc_init_mb(ln, mbp, CSIO_MB_DEFAULT_TMO, in csio_fcoe_alloc_vnp()
441 csio_ln_wwnn(ln), csio_ln_wwpn(ln), NULL); in csio_fcoe_alloc_vnp()
460 csio_ln_err(ln, "Failed to issue mbox FCoE VNP command\n"); in csio_fcoe_alloc_vnp()
467 csio_ln_err(ln, "FCOE VNP ALLOC cmd returned 0x%x!\n", in csio_fcoe_alloc_vnp()
473 ln->vnp_flowid = FW_FCOE_VNP_CMD_VNPI_GET( in csio_fcoe_alloc_vnp()
475 memcpy(csio_ln_wwnn(ln), rsp->vnport_wwnn, 8); in csio_fcoe_alloc_vnp()
476 memcpy(csio_ln_wwpn(ln), rsp->vnport_wwpn, 8); in csio_fcoe_alloc_vnp()
478 csio_ln_dbg(ln, "FCOE VNPI: 0x%x\n", ln->vnp_flowid); in csio_fcoe_alloc_vnp()
479 csio_ln_dbg(ln, "\tWWNN: %x%x%x%x%x%x%x%x\n", in csio_fcoe_alloc_vnp()
480 ln->ln_sparm.wwnn[0], ln->ln_sparm.wwnn[1], in csio_fcoe_alloc_vnp()
481 ln->ln_sparm.wwnn[2], ln->ln_sparm.wwnn[3], in csio_fcoe_alloc_vnp()
482 ln->ln_sparm.wwnn[4], ln->ln_sparm.wwnn[5], in csio_fcoe_alloc_vnp()
483 ln->ln_sparm.wwnn[6], ln->ln_sparm.wwnn[7]); in csio_fcoe_alloc_vnp()
484 csio_ln_dbg(ln, "\tWWPN: %x%x%x%x%x%x%x%x\n", in csio_fcoe_alloc_vnp()
485 ln->ln_sparm.wwpn[0], ln->ln_sparm.wwpn[1], in csio_fcoe_alloc_vnp()
486 ln->ln_sparm.wwpn[2], ln->ln_sparm.wwpn[3], in csio_fcoe_alloc_vnp()
487 ln->ln_sparm.wwpn[4], ln->ln_sparm.wwpn[5], in csio_fcoe_alloc_vnp()
488 ln->ln_sparm.wwpn[6], ln->ln_sparm.wwpn[7]); in csio_fcoe_alloc_vnp()
498 csio_fcoe_free_vnp(struct csio_hw *hw, struct csio_lnode *ln) in csio_fcoe_free_vnp() argument
516 csio_fcoe_vnp_free_init_mb(ln, mbp, CSIO_MB_DEFAULT_TMO, in csio_fcoe_free_vnp()
517 ln->fcf_flowid, ln->vnp_flowid, in csio_fcoe_free_vnp()
532 csio_ln_err(ln, "Failed to issue mbox FCoE VNP command\n"); in csio_fcoe_free_vnp()
539 csio_ln_err(ln, "FCOE VNP FREE cmd returned 0x%x!\n", in csio_fcoe_free_vnp()
556 struct csio_lnode *ln = NULL; in csio_vport_create() local
561 ln = csio_shost_init(hw, &fc_vport->dev, false, pln); in csio_vport_create()
562 if (!ln) in csio_vport_create()
569 csio_ln_err(ln, in csio_vport_create()
573 memcpy(csio_ln_wwnn(ln), wwn, 8); in csio_vport_create()
580 csio_ln_err(ln, in csio_vport_create()
586 csio_ln_err(ln, in csio_vport_create()
590 memcpy(csio_ln_wwpn(ln), wwn, 8); in csio_vport_create()
594 ln->fc_vport = fc_vport; in csio_vport_create()
596 if (csio_fcoe_alloc_vnp(hw, ln)) in csio_vport_create()
599 *(struct csio_lnode **)fc_vport->dd_data = ln; in csio_vport_create()
601 fc_vport->node_name = wwn_to_u64(csio_ln_wwnn(ln)); in csio_vport_create()
603 fc_vport->port_name = wwn_to_u64(csio_ln_wwpn(ln)); in csio_vport_create()
604 csio_fchost_attr_init(ln); in csio_vport_create()
607 if (ln) in csio_vport_create()
608 csio_shost_exit(ln); in csio_vport_create()
616 struct csio_lnode *ln = *(struct csio_lnode **)fc_vport->dd_data; in csio_vport_delete() local
617 struct Scsi_Host *shost = csio_ln_to_shost(ln); in csio_vport_delete()
618 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_vport_delete()
626 csio_shost_exit(ln); in csio_vport_delete()
633 csio_scsim_cleanup_io_lnode(csio_hw_to_scsim(hw), ln); in csio_vport_delete()
634 csio_lnode_close(ln); in csio_vport_delete()
640 csio_fcoe_free_vnp(hw, ln); in csio_vport_delete()
642 csio_shost_exit(ln); in csio_vport_delete()
649 struct csio_lnode *ln = *(struct csio_lnode **)fc_vport->dd_data; in csio_vport_disable() local
650 struct Scsi_Host *shost = csio_ln_to_shost(ln); in csio_vport_disable()
651 struct csio_hw *hw = csio_lnode_to_hw(ln); in csio_vport_disable()
658 csio_scsim_cleanup_io_lnode(csio_hw_to_scsim(hw), ln); in csio_vport_disable()
659 csio_lnode_stop(ln); in csio_vport_disable()
664 csio_fcoe_free_vnp(hw, ln); in csio_vport_disable()
666 csio_ln_err(ln, "vport disabled\n"); in csio_vport_disable()
671 if (csio_fcoe_alloc_vnp(hw, ln)) { in csio_vport_disable()
672 csio_ln_err(ln, "vport enabled failed.\n"); in csio_vport_disable()
675 csio_ln_err(ln, "vport enabled\n"); in csio_vport_disable()
685 struct csio_lnode *ln; in csio_dev_loss_tmo_callbk() local
688 ln = csio_rnode_to_lnode(rn); in csio_dev_loss_tmo_callbk()
689 hw = csio_lnode_to_hw(ln); in csio_dev_loss_tmo_callbk()
697 csio_ln_dbg(ln, "devloss timeout on rnode:%p portid:x%x flowid:x%x\n", in csio_dev_loss_tmo_callbk()
700 CSIO_INC_STATS(ln, n_dev_loss_tmo); in csio_dev_loss_tmo_callbk()