Skip to content
Permalink
Browse files
lpfc: vmid: Adding qfpa and vmid timeout check in worker thread
This patch add the periodic check for issuing of qfpa command and vmid
timeout in the worker thread. The inactivity timeout check is added via
the timer function.

Signed-off-by: Gaurav Srivastava  <gaurav.srivastava@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
  • Loading branch information
Gaurav Srivastava authored and intel-lab-lkp committed Dec 16, 2020
1 parent 740ce98 commit 4bfc0dd58345c1a8eaf5c00475ca1b0472a0ba44
Showing 1 changed file with 42 additions and 0 deletions.
@@ -428,6 +428,32 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp)
return fcf_inuse;
}

void lpfc_check_vmid_qfpa_issue(struct lpfc_hba *phba)
{
struct lpfc_vport *vport;
struct lpfc_vport **vports;
int i, ret;

vports = lpfc_create_vport_work_array(phba);
if (!vports)
return;

for (i = 0; i <= phba->max_vports; i++) {
if ((!vports[i]) && (i == 0))
vport = phba->pport;
else
vport = vports[i];
if (!vport)
break;

if (vport->vmid_flag & LPFC_VMID_ISSUE_QFPA) {
ret = lpfc_issue_els_qfpa(vport);
vport->vmid_flag &= ~LPFC_VMID_ISSUE_QFPA;
}
}
lpfc_destroy_vport_work_array(phba, vports);
}

/**
* lpfc_sli4_post_dev_loss_tmo_handler - SLI4 post devloss timeout handler
* @phba: Pointer to hba context object.
@@ -748,6 +774,22 @@ lpfc_work_done(struct lpfc_hba *phba)
if (ha_copy & HA_LATT)
lpfc_handle_latt(phba);

/* Handle VMID Events */
if (lpfc_is_vmid_enabled(phba)) {
if (phba->pport->work_port_events &
WORKER_CHECK_VMID_ISSUE_QFPA) {
lpfc_check_vmid_qfpa_issue(phba);
phba->pport->work_port_events &=
~WORKER_CHECK_VMID_ISSUE_QFPA;
}
if (phba->pport->work_port_events &
WORKER_CHECK_INACTIVE_VMID) {
lpfc_check_inactive_vmid(phba);
phba->pport->work_port_events &=
~WORKER_CHECK_INACTIVE_VMID;
}
}

/* Process SLI4 events */
if (phba->pci_dev_grp == LPFC_PCI_DEV_OC) {
if (phba->hba_flag & HBA_RRQ_ACTIVE)

0 comments on commit 4bfc0dd

Please sign in to comment.