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()
1248 pmboxq->vport = phba->pport; in lpfc_hb_timeout_handler()
1452 struct lpfc_vport *vport = phba->pport; in lpfc_handle_eratt_s3() local
1556 shost = lpfc_shost_from_vport(vport); in lpfc_handle_eratt_s3()
1626 struct lpfc_vport *vport = phba->pport; in lpfc_handle_eratt_s4() local
1741 shost = lpfc_shost_from_vport(vport); in lpfc_handle_eratt_s4()
1774 struct lpfc_vport *vport = phba->pport; in lpfc_handle_latt() local
1805 pmb->vport = vport; in lpfc_handle_latt()
2529 lpfc_cleanup(struct lpfc_vport *vport) in lpfc_cleanup() argument
2531 struct lpfc_hba *phba = vport->phba; in lpfc_cleanup()
2536 lpfc_port_link_failure(vport); in lpfc_cleanup()
2538 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) { in lpfc_cleanup()
2540 ndlp = lpfc_enable_node(vport, ndlp, in lpfc_cleanup()
2561 if (vport->port_type != LPFC_PHYSICAL_PORT && in lpfc_cleanup()
2577 lpfc_disc_state_machine(vport, ndlp, NULL, in lpfc_cleanup()
2580 lpfc_disc_state_machine(vport, ndlp, NULL, in lpfc_cleanup()
2588 while (!list_empty(&vport->fc_nodes)) { in lpfc_cleanup()
2590 lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, in lpfc_cleanup()
2593 &vport->fc_nodes, nlp_listp) { in lpfc_cleanup()
2594 lpfc_printf_vlog(ndlp->vport, KERN_ERR, in lpfc_cleanup()
2609 lpfc_cleanup_vports_rrqs(vport, NULL); in lpfc_cleanup()
2621 lpfc_stop_vport_timers(struct lpfc_vport *vport) in lpfc_stop_vport_timers() argument
2623 del_timer_sync(&vport->els_tmofunc); in lpfc_stop_vport_timers()
2624 del_timer_sync(&vport->fc_fdmitmo); in lpfc_stop_vport_timers()
2625 del_timer_sync(&vport->delayed_disc_tmo); in lpfc_stop_vport_timers()
2626 lpfc_can_disctmo(vport); in lpfc_stop_vport_timers()
2788 lpfc_printf_vlog(ndlp->vport, KERN_INFO, in lpfc_sli4_node_prep()
2819 struct lpfc_vport *vport; in lpfc_online() local
2826 vport = phba->pport; in lpfc_online()
2828 if (!(vport->fc_flag & FC_OFFLINE_MODE)) in lpfc_online()
2914 struct lpfc_vport *vport = phba->pport; in lpfc_offline_prep() local
2920 if (vport->fc_flag & FC_OFFLINE_MODE) in lpfc_offline_prep()
2963 lpfc_printf_vlog(ndlp->vport, in lpfc_offline_prep()
3284 struct lpfc_vport *vport; in lpfc_create_port() local
3302 vport = (struct lpfc_vport *) shost->hostdata; in lpfc_create_port()
3303 vport->phba = phba; in lpfc_create_port()
3304 vport->load_flag |= FC_LOADING; in lpfc_create_port()
3305 vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; in lpfc_create_port()
3306 vport->fc_rscn_flush = 0; in lpfc_create_port()
3308 lpfc_get_vport_cfgparam(vport); in lpfc_create_port()
3311 shost->max_lun = vport->cfg_max_luns; in lpfc_create_port()
3329 vport->port_type = LPFC_NPIV_PORT; in lpfc_create_port()
3332 vport->port_type = LPFC_PHYSICAL_PORT; in lpfc_create_port()
3336 INIT_LIST_HEAD(&vport->fc_nodes); in lpfc_create_port()
3337 INIT_LIST_HEAD(&vport->rcv_buffer_list); in lpfc_create_port()
3338 spin_lock_init(&vport->work_port_lock); in lpfc_create_port()
3340 init_timer(&vport->fc_disctmo); in lpfc_create_port()
3341 vport->fc_disctmo.function = lpfc_disc_timeout; in lpfc_create_port()
3342 vport->fc_disctmo.data = (unsigned long)vport; in lpfc_create_port()
3344 init_timer(&vport->fc_fdmitmo); in lpfc_create_port()
3345 vport->fc_fdmitmo.function = lpfc_fdmi_tmo; in lpfc_create_port()
3346 vport->fc_fdmitmo.data = (unsigned long)vport; in lpfc_create_port()
3348 init_timer(&vport->els_tmofunc); in lpfc_create_port()
3349 vport->els_tmofunc.function = lpfc_els_timeout; in lpfc_create_port()
3350 vport->els_tmofunc.data = (unsigned long)vport; in lpfc_create_port()
3352 init_timer(&vport->delayed_disc_tmo); in lpfc_create_port()
3353 vport->delayed_disc_tmo.function = lpfc_delayed_disc_tmo; in lpfc_create_port()
3354 vport->delayed_disc_tmo.data = (unsigned long)vport; in lpfc_create_port()
3361 list_add_tail(&vport->listentry, &phba->port_list); in lpfc_create_port()
3363 return vport; in lpfc_create_port()
3379 destroy_port(struct lpfc_vport *vport) in destroy_port() argument
3381 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); in destroy_port()
3382 struct lpfc_hba *phba = vport->phba; in destroy_port()
3384 lpfc_debugfs_terminate(vport); in destroy_port()
3389 list_del_init(&vport->listentry); in destroy_port()
3392 lpfc_cleanup(vport); in destroy_port()
3432 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_scan_finished() local
3433 struct lpfc_hba *phba = vport->phba; in lpfc_scan_finished()
3438 if (vport->load_flag & FC_UNLOADING) { in lpfc_scan_finished()
3458 if (vport->port_state != LPFC_VPORT_READY) in lpfc_scan_finished()
3460 if (vport->num_disc_nodes || vport->fc_prli_sent) in lpfc_scan_finished()
3462 if (vport->fc_map_cnt == 0 && time < msecs_to_jiffies(2 * 1000)) in lpfc_scan_finished()
3483 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_host_attrib_init() local
3484 struct lpfc_hba *phba = vport->phba; in lpfc_host_attrib_init()
3489 fc_host_node_name(shost) = wwn_to_u64(vport->fc_nodename.u.wwn); in lpfc_host_attrib_init()
3490 fc_host_port_name(shost) = wwn_to_u64(vport->fc_portname.u.wwn); in lpfc_host_attrib_init()
3498 lpfc_vport_symbolic_node_name(vport, fc_host_symbolic_name(shost), in lpfc_host_attrib_init()
3518 (((uint32_t) vport->fc_sparam.cmn.bbRcvSizeMsb & 0x0F) << 8) | in lpfc_host_attrib_init()
3519 (uint32_t) vport->fc_sparam.cmn.bbRcvSizeLsb; in lpfc_host_attrib_init()
3521 fc_host_dev_loss_tmo(shost) = vport->cfg_devloss_tmo; in lpfc_host_attrib_init()
3531 vport->load_flag &= ~FC_LOADING; in lpfc_host_attrib_init()
3933 pmb->vport = phba->pport; in lpfc_sli4_async_link_evt()
4090 pmb->vport = phba->pport; in lpfc_sli4_async_fc_evt()
4252 lpfc_sli4_perform_vport_cvl(struct lpfc_vport *vport) in lpfc_sli4_perform_vport_cvl() argument
4258 if (!vport) in lpfc_sli4_perform_vport_cvl()
4260 phba = vport->phba; in lpfc_sli4_perform_vport_cvl()
4263 ndlp = lpfc_findnode_did(vport, Fabric_DID); in lpfc_sli4_perform_vport_cvl()
4269 lpfc_nlp_init(vport, ndlp, Fabric_DID); in lpfc_sli4_perform_vport_cvl()
4273 lpfc_enqueue_node(vport, ndlp); in lpfc_sli4_perform_vport_cvl()
4276 ndlp = lpfc_enable_node(vport, ndlp, NLP_STE_UNUSED_NODE); in lpfc_sli4_perform_vport_cvl()
4284 if ((vport != phba->pport) && (vport->port_state < LPFC_FDISC) in lpfc_sli4_perform_vport_cvl()
4285 && (vport->port_state != LPFC_VPORT_FAILED)) in lpfc_sli4_perform_vport_cvl()
4287 shost = lpfc_shost_from_vport(vport); in lpfc_sli4_perform_vport_cvl()
4290 lpfc_linkdown_port(vport); in lpfc_sli4_perform_vport_cvl()
4291 lpfc_cleanup_pending_mbox(vport); in lpfc_sli4_perform_vport_cvl()
4293 vport->fc_flag |= FC_VPORT_CVL_RCVD; in lpfc_sli4_perform_vport_cvl()
4332 struct lpfc_vport *vport; in lpfc_sli4_async_fip_evt() local
4479 vport = lpfc_find_vport_by_vpid(phba, in lpfc_sli4_async_fip_evt()
4481 ndlp = lpfc_sli4_perform_vport_cvl(vport); in lpfc_sli4_async_fip_evt()
4505 if (!(vport->load_flag & FC_UNLOADING) && in lpfc_sli4_async_fip_evt()
4513 shost = lpfc_shost_from_vport(vport); in lpfc_sli4_async_fip_evt()
4518 vport->port_state = LPFC_FDISC; in lpfc_sli4_async_fip_evt()
6143 struct lpfc_vport *vport; in lpfc_create_shost() local
6153 vport = lpfc_create_port(phba, phba->brd_no, &phba->pcidev->dev); in lpfc_create_shost()
6154 if (!vport) in lpfc_create_shost()
6157 shost = lpfc_shost_from_vport(vport); in lpfc_create_shost()
6158 phba->pport = vport; in lpfc_create_shost()
6159 lpfc_debugfs_initialize(vport); in lpfc_create_shost()
6176 struct lpfc_vport *vport = phba->pport; in lpfc_destroy_shost() local
6179 destroy_port(vport); in lpfc_destroy_shost()
9218 struct lpfc_vport *vport = phba->pport; in lpfc_unset_hba() local
9219 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); in lpfc_unset_hba()
9222 vport->load_flag |= FC_UNLOADING; in lpfc_unset_hba()
9527 struct lpfc_vport *vport = NULL; in lpfc_pci_probe_one_s3() local
9599 vport = phba->pport; in lpfc_pci_probe_one_s3()
9600 error = lpfc_alloc_sysfs_attr(vport); in lpfc_pci_probe_one_s3()
9607 shost = lpfc_shost_from_vport(vport); /* save shost for error cleanup */ in lpfc_pci_probe_one_s3()
9661 lpfc_free_sysfs_attr(vport); in lpfc_pci_probe_one_s3()
9694 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_pci_remove_one_s3() local
9696 struct lpfc_hba *phba = vport->phba; in lpfc_pci_remove_one_s3()
9701 vport->load_flag |= FC_UNLOADING; in lpfc_pci_remove_one_s3()
9704 lpfc_free_sysfs_attr(vport); in lpfc_pci_remove_one_s3()
9719 lpfc_cleanup(vport); in lpfc_pci_remove_one_s3()
9739 list_del_init(&vport->listentry); in lpfc_pci_remove_one_s3()
9742 lpfc_debugfs_terminate(vport); in lpfc_pci_remove_one_s3()
10296 struct lpfc_vport *vport = NULL; in lpfc_pci_probe_one_s4() local
10377 vport = phba->pport; in lpfc_pci_probe_one_s4()
10378 error = lpfc_alloc_sysfs_attr(vport); in lpfc_pci_probe_one_s4()
10385 shost = lpfc_shost_from_vport(vport); /* save shost for error cleanup */ in lpfc_pci_probe_one_s4()
10431 lpfc_free_sysfs_attr(vport); in lpfc_pci_probe_one_s4()
10464 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_pci_remove_one_s4() local
10466 struct lpfc_hba *phba = vport->phba; in lpfc_pci_remove_one_s4()
10471 vport->load_flag |= FC_UNLOADING; in lpfc_pci_remove_one_s4()
10475 lpfc_free_sysfs_attr(vport); in lpfc_pci_remove_one_s4()
10492 lpfc_cleanup(vport); in lpfc_pci_remove_one_s4()
10499 lpfc_debugfs_terminate(vport); in lpfc_pci_remove_one_s4()
10503 list_del_init(&vport->listentry); in lpfc_pci_remove_one_s4()