Lines Matching refs:vport
329 lpfc_update_vport_wwn(struct lpfc_vport *vport) in lpfc_update_vport_wwn() argument
332 if (vport->phba->cfg_soft_wwnn) in lpfc_update_vport_wwn()
333 u64_to_wwn(vport->phba->cfg_soft_wwnn, in lpfc_update_vport_wwn()
334 vport->fc_sparam.nodeName.u.wwn); in lpfc_update_vport_wwn()
335 if (vport->phba->cfg_soft_wwpn) in lpfc_update_vport_wwn()
336 u64_to_wwn(vport->phba->cfg_soft_wwpn, in lpfc_update_vport_wwn()
337 vport->fc_sparam.portName.u.wwn); in lpfc_update_vport_wwn()
343 if (vport->fc_nodename.u.wwn[0] == 0 || vport->phba->cfg_soft_wwnn) in lpfc_update_vport_wwn()
344 memcpy(&vport->fc_nodename, &vport->fc_sparam.nodeName, in lpfc_update_vport_wwn()
347 memcpy(&vport->fc_sparam.nodeName, &vport->fc_nodename, in lpfc_update_vport_wwn()
350 if (vport->fc_portname.u.wwn[0] == 0 || vport->phba->cfg_soft_wwpn) in lpfc_update_vport_wwn()
351 memcpy(&vport->fc_portname, &vport->fc_sparam.portName, in lpfc_update_vport_wwn()
354 memcpy(&vport->fc_sparam.portName, &vport->fc_portname, in lpfc_update_vport_wwn()
374 struct lpfc_vport *vport = phba->pport; in lpfc_config_port_post() local
375 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); in lpfc_config_port_post()
407 pmb->vport = vport; in lpfc_config_port_post()
423 memcpy(&vport->fc_sparam, mp->virt, sizeof (struct serv_parm)); in lpfc_config_port_post()
427 lpfc_update_vport_wwn(vport); in lpfc_config_port_post()
430 fc_host_node_name(shost) = wwn_to_u64(vport->fc_nodename.u.wwn); in lpfc_config_port_post()
431 fc_host_port_name(shost) = wwn_to_u64(vport->fc_portname.u.wwn); in lpfc_config_port_post()
439 outptr = &vport->fc_nodename.u.s.IEEE[0]; in lpfc_config_port_post()
461 pmb->vport = vport; in lpfc_config_port_post()
562 mod_timer(&vport->els_tmofunc, in lpfc_config_port_post()
604 pmb->vport = phba->pport; in lpfc_config_port_post()
626 pmb->vport = phba->pport; in lpfc_config_port_post()
677 struct lpfc_vport *vport = phba->pport; in lpfc_hba_init_link_fc_topology() local
688 pmb->vport = vport; in lpfc_hba_init_link_fc_topology()
1246 pmboxq->vport = phba->pport; in lpfc_hb_timeout_handler()
1450 struct lpfc_vport *vport = phba->pport; in lpfc_handle_eratt_s3() local
1554 shost = lpfc_shost_from_vport(vport); in lpfc_handle_eratt_s3()
1624 struct lpfc_vport *vport = phba->pport; in lpfc_handle_eratt_s4() local
1739 shost = lpfc_shost_from_vport(vport); in lpfc_handle_eratt_s4()
1772 struct lpfc_vport *vport = phba->pport; in lpfc_handle_latt() local
1803 pmb->vport = vport; in lpfc_handle_latt()
2522 lpfc_cleanup(struct lpfc_vport *vport) in lpfc_cleanup() argument
2524 struct lpfc_hba *phba = vport->phba; in lpfc_cleanup()
2529 lpfc_port_link_failure(vport); in lpfc_cleanup()
2531 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) { in lpfc_cleanup()
2533 ndlp = lpfc_enable_node(vport, ndlp, in lpfc_cleanup()
2554 if (vport->port_type != LPFC_PHYSICAL_PORT && in lpfc_cleanup()
2570 lpfc_disc_state_machine(vport, ndlp, NULL, in lpfc_cleanup()
2573 lpfc_disc_state_machine(vport, ndlp, NULL, in lpfc_cleanup()
2581 while (!list_empty(&vport->fc_nodes)) { in lpfc_cleanup()
2583 lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, in lpfc_cleanup()
2586 &vport->fc_nodes, nlp_listp) { in lpfc_cleanup()
2587 lpfc_printf_vlog(ndlp->vport, KERN_ERR, in lpfc_cleanup()
2602 lpfc_cleanup_vports_rrqs(vport, NULL); in lpfc_cleanup()
2614 lpfc_stop_vport_timers(struct lpfc_vport *vport) in lpfc_stop_vport_timers() argument
2616 del_timer_sync(&vport->els_tmofunc); in lpfc_stop_vport_timers()
2617 del_timer_sync(&vport->fc_fdmitmo); in lpfc_stop_vport_timers()
2618 del_timer_sync(&vport->delayed_disc_tmo); in lpfc_stop_vport_timers()
2619 lpfc_can_disctmo(vport); in lpfc_stop_vport_timers()
2781 lpfc_printf_vlog(ndlp->vport, KERN_INFO, in lpfc_sli4_node_prep()
2812 struct lpfc_vport *vport; in lpfc_online() local
2819 vport = phba->pport; in lpfc_online()
2821 if (!(vport->fc_flag & FC_OFFLINE_MODE)) in lpfc_online()
2906 struct lpfc_vport *vport = phba->pport; in lpfc_offline_prep() local
2912 if (vport->fc_flag & FC_OFFLINE_MODE) in lpfc_offline_prep()
2955 lpfc_printf_vlog(ndlp->vport, in lpfc_offline_prep()
3276 struct lpfc_vport *vport; in lpfc_create_port() local
3294 vport = (struct lpfc_vport *) shost->hostdata; in lpfc_create_port()
3295 vport->phba = phba; in lpfc_create_port()
3296 vport->load_flag |= FC_LOADING; in lpfc_create_port()
3297 vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; in lpfc_create_port()
3298 vport->fc_rscn_flush = 0; in lpfc_create_port()
3300 lpfc_get_vport_cfgparam(vport); in lpfc_create_port()
3303 shost->max_lun = vport->cfg_max_luns; in lpfc_create_port()
3320 vport->port_type = LPFC_NPIV_PORT; in lpfc_create_port()
3323 vport->port_type = LPFC_PHYSICAL_PORT; in lpfc_create_port()
3327 INIT_LIST_HEAD(&vport->fc_nodes); in lpfc_create_port()
3328 INIT_LIST_HEAD(&vport->rcv_buffer_list); in lpfc_create_port()
3329 spin_lock_init(&vport->work_port_lock); in lpfc_create_port()
3331 init_timer(&vport->fc_disctmo); in lpfc_create_port()
3332 vport->fc_disctmo.function = lpfc_disc_timeout; in lpfc_create_port()
3333 vport->fc_disctmo.data = (unsigned long)vport; in lpfc_create_port()
3335 init_timer(&vport->fc_fdmitmo); in lpfc_create_port()
3336 vport->fc_fdmitmo.function = lpfc_fdmi_tmo; in lpfc_create_port()
3337 vport->fc_fdmitmo.data = (unsigned long)vport; in lpfc_create_port()
3339 init_timer(&vport->els_tmofunc); in lpfc_create_port()
3340 vport->els_tmofunc.function = lpfc_els_timeout; in lpfc_create_port()
3341 vport->els_tmofunc.data = (unsigned long)vport; in lpfc_create_port()
3343 init_timer(&vport->delayed_disc_tmo); in lpfc_create_port()
3344 vport->delayed_disc_tmo.function = lpfc_delayed_disc_tmo; in lpfc_create_port()
3345 vport->delayed_disc_tmo.data = (unsigned long)vport; in lpfc_create_port()
3352 list_add_tail(&vport->listentry, &phba->port_list); in lpfc_create_port()
3354 return vport; in lpfc_create_port()
3370 destroy_port(struct lpfc_vport *vport) in destroy_port() argument
3372 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); in destroy_port()
3373 struct lpfc_hba *phba = vport->phba; in destroy_port()
3375 lpfc_debugfs_terminate(vport); in destroy_port()
3380 list_del_init(&vport->listentry); in destroy_port()
3383 lpfc_cleanup(vport); in destroy_port()
3423 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_scan_finished() local
3424 struct lpfc_hba *phba = vport->phba; in lpfc_scan_finished()
3429 if (vport->load_flag & FC_UNLOADING) { in lpfc_scan_finished()
3449 if (vport->port_state != LPFC_VPORT_READY) in lpfc_scan_finished()
3451 if (vport->num_disc_nodes || vport->fc_prli_sent) in lpfc_scan_finished()
3453 if (vport->fc_map_cnt == 0 && time < msecs_to_jiffies(2 * 1000)) in lpfc_scan_finished()
3474 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_host_attrib_init() local
3475 struct lpfc_hba *phba = vport->phba; in lpfc_host_attrib_init()
3480 fc_host_node_name(shost) = wwn_to_u64(vport->fc_nodename.u.wwn); in lpfc_host_attrib_init()
3481 fc_host_port_name(shost) = wwn_to_u64(vport->fc_portname.u.wwn); in lpfc_host_attrib_init()
3489 lpfc_vport_symbolic_node_name(vport, fc_host_symbolic_name(shost), in lpfc_host_attrib_init()
3507 (((uint32_t) vport->fc_sparam.cmn.bbRcvSizeMsb & 0x0F) << 8) | in lpfc_host_attrib_init()
3508 (uint32_t) vport->fc_sparam.cmn.bbRcvSizeLsb; in lpfc_host_attrib_init()
3510 fc_host_dev_loss_tmo(shost) = vport->cfg_devloss_tmo; in lpfc_host_attrib_init()
3520 vport->load_flag &= ~FC_LOADING; in lpfc_host_attrib_init()
3919 pmb->vport = phba->pport; in lpfc_sli4_async_link_evt()
4076 pmb->vport = phba->pport; in lpfc_sli4_async_fc_evt()
4238 lpfc_sli4_perform_vport_cvl(struct lpfc_vport *vport) in lpfc_sli4_perform_vport_cvl() argument
4244 if (!vport) in lpfc_sli4_perform_vport_cvl()
4246 phba = vport->phba; in lpfc_sli4_perform_vport_cvl()
4249 ndlp = lpfc_findnode_did(vport, Fabric_DID); in lpfc_sli4_perform_vport_cvl()
4255 lpfc_nlp_init(vport, ndlp, Fabric_DID); in lpfc_sli4_perform_vport_cvl()
4259 lpfc_enqueue_node(vport, ndlp); in lpfc_sli4_perform_vport_cvl()
4262 ndlp = lpfc_enable_node(vport, ndlp, NLP_STE_UNUSED_NODE); in lpfc_sli4_perform_vport_cvl()
4270 if ((vport != phba->pport) && (vport->port_state < LPFC_FDISC) in lpfc_sli4_perform_vport_cvl()
4271 && (vport->port_state != LPFC_VPORT_FAILED)) in lpfc_sli4_perform_vport_cvl()
4273 shost = lpfc_shost_from_vport(vport); in lpfc_sli4_perform_vport_cvl()
4276 lpfc_linkdown_port(vport); in lpfc_sli4_perform_vport_cvl()
4277 lpfc_cleanup_pending_mbox(vport); in lpfc_sli4_perform_vport_cvl()
4279 vport->fc_flag |= FC_VPORT_CVL_RCVD; in lpfc_sli4_perform_vport_cvl()
4318 struct lpfc_vport *vport; in lpfc_sli4_async_fip_evt() local
4465 vport = lpfc_find_vport_by_vpid(phba, in lpfc_sli4_async_fip_evt()
4467 ndlp = lpfc_sli4_perform_vport_cvl(vport); in lpfc_sli4_async_fip_evt()
4493 shost = lpfc_shost_from_vport(vport); in lpfc_sli4_async_fip_evt()
4498 vport->port_state = LPFC_FDISC; in lpfc_sli4_async_fip_evt()
6124 struct lpfc_vport *vport; in lpfc_create_shost() local
6134 vport = lpfc_create_port(phba, phba->brd_no, &phba->pcidev->dev); in lpfc_create_shost()
6135 if (!vport) in lpfc_create_shost()
6138 shost = lpfc_shost_from_vport(vport); in lpfc_create_shost()
6139 phba->pport = vport; in lpfc_create_shost()
6140 lpfc_debugfs_initialize(vport); in lpfc_create_shost()
6157 struct lpfc_vport *vport = phba->pport; in lpfc_destroy_shost() local
6160 destroy_port(vport); in lpfc_destroy_shost()
9200 struct lpfc_vport *vport = phba->pport; in lpfc_unset_hba() local
9201 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); in lpfc_unset_hba()
9204 vport->load_flag |= FC_UNLOADING; in lpfc_unset_hba()
9509 struct lpfc_vport *vport = NULL; in lpfc_pci_probe_one_s3() local
9581 vport = phba->pport; in lpfc_pci_probe_one_s3()
9582 error = lpfc_alloc_sysfs_attr(vport); in lpfc_pci_probe_one_s3()
9589 shost = lpfc_shost_from_vport(vport); /* save shost for error cleanup */ in lpfc_pci_probe_one_s3()
9643 lpfc_free_sysfs_attr(vport); in lpfc_pci_probe_one_s3()
9676 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_pci_remove_one_s3() local
9678 struct lpfc_hba *phba = vport->phba; in lpfc_pci_remove_one_s3()
9683 vport->load_flag |= FC_UNLOADING; in lpfc_pci_remove_one_s3()
9686 lpfc_free_sysfs_attr(vport); in lpfc_pci_remove_one_s3()
9701 lpfc_cleanup(vport); in lpfc_pci_remove_one_s3()
9721 list_del_init(&vport->listentry); in lpfc_pci_remove_one_s3()
9724 lpfc_debugfs_terminate(vport); in lpfc_pci_remove_one_s3()
10278 struct lpfc_vport *vport = NULL; in lpfc_pci_probe_one_s4() local
10359 vport = phba->pport; in lpfc_pci_probe_one_s4()
10360 error = lpfc_alloc_sysfs_attr(vport); in lpfc_pci_probe_one_s4()
10367 shost = lpfc_shost_from_vport(vport); /* save shost for error cleanup */ in lpfc_pci_probe_one_s4()
10413 lpfc_free_sysfs_attr(vport); in lpfc_pci_probe_one_s4()
10446 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_pci_remove_one_s4() local
10448 struct lpfc_hba *phba = vport->phba; in lpfc_pci_remove_one_s4()
10453 vport->load_flag |= FC_UNLOADING; in lpfc_pci_remove_one_s4()
10457 lpfc_free_sysfs_attr(vport); in lpfc_pci_remove_one_s4()
10474 lpfc_cleanup(vport); in lpfc_pci_remove_one_s4()
10481 lpfc_debugfs_terminate(vport); in lpfc_pci_remove_one_s4()
10485 list_del_init(&vport->listentry); in lpfc_pci_remove_one_s4()