Lines Matching refs:vpi
90 unsigned long vpi; in lpfc_alloc_vpi() local
94 vpi = find_next_zero_bit(phba->vpi_bmask, (phba->max_vpi + 1), 1); in lpfc_alloc_vpi()
95 if (vpi > phba->max_vpi) in lpfc_alloc_vpi()
96 vpi = 0; in lpfc_alloc_vpi()
98 set_bit(vpi, phba->vpi_bmask); in lpfc_alloc_vpi()
102 return vpi; in lpfc_alloc_vpi()
106 lpfc_free_vpi(struct lpfc_hba *phba, int vpi) in lpfc_free_vpi() argument
108 if (vpi == 0) in lpfc_free_vpi()
111 clear_bit(vpi, phba->vpi_bmask); in lpfc_free_vpi()
131 rc = lpfc_read_sparam(phba, pmb, vport->vpi); in lpfc_vport_sparm()
303 int vpi; in lpfc_vport_create() local
325 vpi = lpfc_alloc_vpi(phba); in lpfc_vport_create()
326 if (vpi == 0) { in lpfc_vport_create()
340 lpfc_free_vpi(phba, vpi); in lpfc_vport_create()
348 "1811 Create VPORT failed: vpi x%x\n", vpi); in lpfc_vport_create()
349 lpfc_free_vpi(phba, vpi); in lpfc_vport_create()
354 vport->vpi = vpi; in lpfc_vport_create()
368 lpfc_free_vpi(phba, vpi); in lpfc_vport_create()
384 lpfc_free_vpi(phba, vpi); in lpfc_vport_create()
394 lpfc_free_vpi(phba, vpi); in lpfc_vport_create()
431 "status %d\n", vpi, rc); in lpfc_vport_create()
433 lpfc_free_vpi(phba, vpi); in lpfc_vport_create()
723 lpfc_free_vpi(phba, vport->vpi); in lpfc_vport_delete()