• 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/lpfc/

Lines Matching defs:vport

49 inline void lpfc_vport_set_state(struct lpfc_vport *vport,
52 struct fc_vport *fc_vport = vport->fc_vport;
72 vport->port_state = LPFC_VPORT_FAILED;
75 vport->port_state = LPFC_VPORT_UNKNOWN;
114 lpfc_vport_sparm(struct lpfc_hba *phba, struct lpfc_vport *vport)
127 rc = lpfc_read_sparam(phba, pmb, vport->vpi);
140 pmb->vport = vport;
144 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT | LOG_VPORT,
153 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT | LOG_VPORT,
165 memcpy(&vport->fc_sparam, mp->virt, sizeof (struct serv_parm));
166 memcpy(&vport->fc_nodename, &vport->fc_sparam.nodeName,
168 memcpy(&vport->fc_portname, &vport->fc_sparam.portName,
203 struct lpfc_vport *vport;
207 list_for_each_entry(vport, &phba->port_list, listentry) {
208 if (vport == new_vport)
211 if (memcmp(&vport->fc_sparam.portName,
224 * @vport: The virtual port for which this call is being executed.
227 * to enforce a synchronous execution of vport
237 static void lpfc_discovery_wait(struct lpfc_vport *vport)
239 struct lpfc_hba *phba = vport->phba;
256 if ((vport->num_disc_nodes > 0) ||
257 (vport->fc_flag & wait_flags) ||
258 ((vport->port_state > LPFC_VPORT_FAILED) &&
259 (vport->port_state < LPFC_VPORT_READY))) {
260 lpfc_printf_vlog(vport, KERN_INFO, LOG_VPORT,
265 vport->port_state, vport->fc_flag,
266 vport->num_disc_nodes,
271 lpfc_printf_vlog(vport, KERN_INFO, LOG_VPORT,
275 vport->port_state, vport->fc_flag,
283 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
286 vport->port_state, vport->fc_flag,
297 struct lpfc_vport *vport = NULL;
332 vport = lpfc_create_port(phba, instance, &fc_vport->dev);
333 if (!vport) {
341 vport->vpi = vpi;
342 lpfc_debugfs_initialize(vport);
344 if ((status = lpfc_vport_sparm(phba, vport))) {
346 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
350 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
356 destroy_port(vport);
360 u64_to_wwn(fc_vport->node_name, vport->fc_nodename.u.wwn);
361 u64_to_wwn(fc_vport->port_name, vport->fc_portname.u.wwn);
363 memcpy(&vport->fc_sparam.portName, vport->fc_portname.u.wwn, 8);
364 memcpy(&vport->fc_sparam.nodeName, vport->fc_nodename.u.wwn, 8);
366 if (!lpfc_valid_wwn_format(phba, &vport->fc_sparam.nodeName, "WWNN") ||
367 !lpfc_valid_wwn_format(phba, &vport->fc_sparam.portName, "WWPN")) {
368 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
372 destroy_port(vport);
377 if (!lpfc_unique_wwpn(phba, vport)) {
378 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
382 destroy_port(vport);
387 /* Create binary sysfs attribute for vport */
388 lpfc_alloc_sysfs_attr(vport);
390 *(struct lpfc_vport **)fc_vport->dd_data = vport;
391 vport->fc_vport = fc_vport;
413 vport->fc_flag |= FC_VPORT_NEEDS_INIT_VPI;
414 lpfc_vport_set_state(vport, FC_VPORT_LINKDOWN);
422 lpfc_vport_set_state(vport, FC_VPORT_LINKDOWN);
428 lpfc_vport_set_state(vport, FC_VPORT_DISABLED);
440 lpfc_set_disctmo(vport);
441 lpfc_initial_fdisc(vport);
443 lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP);
444 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
448 lpfc_vport_set_state(vport, FC_VPORT_FAILED);
453 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
455 lpfc_host_attrib_init(lpfc_shost_from_vport(vport));
463 struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data;
464 struct lpfc_hba *phba = vport->phba;
468 ndlp = lpfc_findnode_did(vport, Fabric_DID);
471 vport->unreg_vpi_cmpl = VPORT_INVAL;
473 if (!lpfc_issue_els_npiv_logo(vport, ndlp))
474 while (vport->unreg_vpi_cmpl == VPORT_INVAL && timeout)
478 lpfc_sli_host_down(vport);
481 * calling lpfc_cleanup_rpis(vport, 1)
483 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
488 lpfc_disc_state_machine(vport, ndlp, NULL,
491 lpfc_cleanup_rpis(vport, 1);
493 lpfc_stop_vport_timers(vport);
494 lpfc_unreg_all_rpis(vport);
495 lpfc_unreg_default_rpis(vport);
498 * scsi_host_put() to release the vport.
500 lpfc_mbx_unreg_vpi(vport);
502 lpfc_vport_set_state(vport, FC_VPORT_DISABLED);
503 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
511 struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data;
512 struct lpfc_hba *phba = vport->phba;
514 struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
518 lpfc_vport_set_state(vport, FC_VPORT_LINKDOWN);
523 vport->load_flag |= FC_LOADING;
524 vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
534 lpfc_set_disctmo(vport);
535 lpfc_initial_fdisc(vport);
537 lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP);
538 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
542 lpfc_vport_set_state(vport, FC_VPORT_FAILED);
544 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
564 struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data;
565 struct lpfc_hba *phba = vport->phba;
568 if (vport->port_type == LPFC_PHYSICAL_PORT) {
569 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
575 /* If the vport is a static vport fail the deletion. */
576 if ((vport->vport_flag & STATIC_VPORT) &&
578 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
580 "static vport.\n");
586 * from happening until after this vport's discovery is finished.
591 vport->port_state > LPFC_VPORT_FAILED &&
592 vport->port_state < LPFC_VPORT_READY) {
596 if (vport->port_state > LPFC_VPORT_FAILED &&
597 vport->port_state < LPFC_VPORT_READY)
610 * bottom of the function -- after delinking the vport. And we
622 vport->load_flag |= FC_UNLOADING;
625 lpfc_free_sysfs_attr(vport);
627 lpfc_debugfs_terminate(vport);
629 /* Remove FC host and then SCSI host with the vport */
630 fc_remove_host(lpfc_shost_from_vport(vport));
631 scsi_remove_host(lpfc_shost_from_vport(vport));
644 ndlp = lpfc_findnode_did(vport, Fabric_DID);
648 ndlp = lpfc_enable_node(vport, ndlp,
653 /* Remove ndlp from vport npld list */
654 lpfc_dequeue_node(vport, ndlp);
671 if (vport->cfg_enable_da_id) {
673 if (!lpfc_ns_cmd(vport, SLI_CTNS_DA_ID, 0, 0))
674 while (vport->ct_flags && timeout)
677 lpfc_printf_log(vport->phba, KERN_WARNING,
683 ndlp = lpfc_findnode_did(vport, Fabric_DID);
689 lpfc_nlp_init(vport, ndlp, Fabric_DID);
694 ndlp = lpfc_enable_node(vport, ndlp,
699 /* Remove ndlp from vport npld list */
700 lpfc_dequeue_node(vport, ndlp);
712 if (!(vport->vpi_state & LPFC_VPI_REGISTERED))
714 vport->unreg_vpi_cmpl = VPORT_INVAL;
716 if (!lpfc_issue_els_npiv_logo(vport, ndlp))
717 while (vport->unreg_vpi_cmpl == VPORT_INVAL && timeout)
722 lpfc_discovery_wait(vport);
725 lpfc_cleanup(vport);
726 lpfc_sli_host_down(vport);
728 lpfc_stop_vport_timers(vport);
731 lpfc_unreg_all_rpis(vport);
732 lpfc_unreg_default_rpis(vport);
735 * does the scsi_host_put() to release the vport.
737 if (lpfc_mbx_unreg_vpi(vport))
742 lpfc_free_vpi(phba, vport->vpi);
743 vport->work_port_events = 0;
745 list_del_init(&vport->listentry);
747 lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
769 "1801 Create vport work array FAILED: "
792 * lpfc_vport_reset_stat_data - Reset the statistical data for the vport
793 * @vport: Pointer to vport object.
795 * This function resets the statistical data for the vport. This function
799 lpfc_vport_reset_stat_data(struct lpfc_vport *vport)
803 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
815 * @vport: Pointer to vport object.
818 * nodes of the vport to collect statistical data.
821 lpfc_alloc_bucket(struct lpfc_vport *vport)
825 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
838 lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE,
848 * @vport: Pointer to vport object.
851 * nodes of the vport.
854 lpfc_free_bucket(struct lpfc_vport *vport)
858 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {