lpfc: Update lpfc to revision 14.2.0.17
Subsystems (2)
cover lpfc: Update lpfc to revision 14.2.0.17
Update lpfc to revision 14.2.0.17
This patch set contains bug fixes for the VMID feature.
The patches were cut against Martin's 6.8/scsi-queue tree.
Justin Tee (4):
lpfc: Change VMID driver load time parameters to read only
lpfc: Reinitialize an NPIV's VMID data structures after FDISC
lpfc: Move determination of vmid_flag after VMID reinitialization
completes
lpfc: Update lpfc version to 14.2.0.17
drivers/scsi/lpfc/lpfc_attr.c | 8 ++++---- drivers/scsi/lpfc/lpfc_els.c | 14 +++++++++++--- drivers/scsi/lpfc/lpfc_version.h | 2 +- drivers/scsi/lpfc/lpfc_vmid.c | 1 + 4 files changed, 17 insertions(+), 8 deletions(-)
Signature · 1 line
2.38.0
PATCH 1/4 lpfc: Change VMID driver load time parameters to read only
VMID driver support is a load time configuration setting. Thus, change sysfs attributes to read only.
--- drivers/scsi/lpfc/lpfc_attr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +4 -4
@@ -5954,7 +5954,7 @@ LPFC_ATTR_R(enable_mi, 1, 0, 1, "Enable MI");* 4 - 255 = vmid support enabled for 4-255 VMs * Value range is [4,255]. */ -LPFC_ATTR_RW (max_vmid,LPFC_MIN_VMID ,LPFC_MIN_VMID ,LPFC_MAX_VMID , +LPFC_ATTR_R (max_vmid,LPFC_MIN_VMID ,LPFC_MIN_VMID ,LPFC_MAX_VMID ,"Maximum number of VMs supported" );/*
@@ -5962,7 +5962,7 @@ LPFC_ATTR_RW(max_vmid, LPFC_MIN_VMID, LPFC_MIN_VMID, LPFC_MAX_VMID,* 0 = Timeout is disabled * Value range is [0,24]. */ -LPFC_ATTR_RW (vmid_inactivity_timeout,4 ,0 ,24 , +LPFC_ATTR_R (vmid_inactivity_timeout,4 ,0 ,24 ,"Inactivity timeout in hours" );/*
@@ -5971,7 +5971,7 @@ LPFC_ATTR_RW(vmid_inactivity_timeout, 4, 0, 24,* 1 = Support is enabled * Value range is [0,1]. */ -LPFC_ATTR_RW (vmid_app_header,LPFC_VMID_APP_HEADER_DISABLE , +LPFC_ATTR_R (vmid_app_header,LPFC_VMID_APP_HEADER_DISABLE ,LPFC_VMID_APP_HEADER_DISABLE ,LPFC_VMID_APP_HEADER_ENABLE ,"Enable App Header VMID support" );
@@ -5982,7 +5982,7 @@ LPFC_ATTR_RW(vmid_app_header, LPFC_VMID_APP_HEADER_DISABLE,* 2 = Allow all targets * Value range is [0,2]. */ -LPFC_ATTR_RW (vmid_priority_tagging,LPFC_VMID_PRIO_TAG_DISABLE , +LPFC_ATTR_R (vmid_priority_tagging,LPFC_VMID_PRIO_TAG_DISABLE ,LPFC_VMID_PRIO_TAG_DISABLE ,LPFC_VMID_PRIO_TAG_ALL_TARGETS ,"Enable Priority Tagging VMID support" );
Signature · 1 line
2.38.0
PATCH 2/4 lpfc: Reinitialize an NPIV's VMID data structures after FDISC
In reply to Justin TeeAfter a follow up FDISC cmpl, an NPIV's VMID data structures are not updated.
Fix by calling lpfc_reinit_vmid and copying the physical port's vmid_flag to the NPIV's vmid_flag in the NPIV registration cmpl code path.
--- drivers/scsi/lpfc/lpfc_els.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/scsi/lpfc/lpfc_els.c +8 -0
@@ -11143,6 +11143,14 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)lpfc_nlp_put (ndlp);mempool_free (pmb, phba->mbox_mem_pool); + +/* reinitialize the VMID datastructure before returning. +* this is specifically for vport +*/ +if (lpfc_is_vmid_enabled (phba)) +lpfc_reinit_vmid (vport); + vport->vmid_flag = vport->phba->pport->vmid_flag; +return ; }
Signature · 1 line
2.38.0
PATCH 3/4 lpfc: Move determination of vmid_flag after VMID reinitialization completes
In reply to Justin TeeIf priority tagging is set in the service parameters of a FLOGI cmpl, then we update the vmid_flag. In the current logic, if a follow up FLOGI cmpl updates its service parameters such that priority tagging is no longer set, then the vmid_flag ends up keeping stale data.
Fix by ensuring we clear the vmid_flag member during lpfc_reinit_vmid, and check the priority tagging service parameter after reinitialization of the vmid data structures.
--- drivers/scsi/lpfc/lpfc_els.c | 6 +++--- drivers/scsi/lpfc/lpfc_vmid.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_els.c +3 -3
@@ -1130,12 +1130,12 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, vport->port_state, vport->fc_flag, sp->cmn.priority_tagging, kref_read(&ndlp->kref)); -if (sp->cmn.priority_tagging) - vport->phba->pport->vmid_flag |= (LPFC_VMID_ISSUE_QFPA | -LPFC_VMID_TYPE_PRIO );/* reinitialize the VMID datastructure before returning */ if (lpfc_is_vmid_enabled (phba))lpfc_reinit_vmid (vport); +if (sp->cmn.priority_tagging) + vport->phba->pport->vmid_flag |= (LPFC_VMID_ISSUE_QFPA | +LPFC_VMID_TYPE_PRIO );/* * Address a timing race with dev_loss. If dev_loss is active on
drivers/scsi/lpfc/lpfc_vmid.c +1 -0
@@ -321,5 +321,6 @@ lpfc_reinit_vmid(struct lpfc_vport *vport)if (!hash_empty (vport->hash_table))hash_for_each_safe (vport->hash_table, bucket, tmp, cur, hnode)hash_del (&cur->hnode); + vport->vmid_flag =0 ;write_unlock (&vport->vmid_lock); }
Signature · 1 line
2.38.0
PATCH 4/4 lpfc: Update lpfc version to 14.2.0.17
In reply to Justin TeeUpdate lpfc version to 14.2.0.17
--- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_version.h +1 -1
@@ -20,7 +20,7 @@* included with this package. * *******************************************************************/ -#define LPFC_DRIVER_VERSION "14.2.0.16" +#define LPFC_DRIVER_VERSION "14.2.0.17"#define LPFC_DRIVER_NAME "lpfc"/* Used for SLI 2/3 */
Signature · 1 line
2.38.0
Martin K. Petersen
AppliedJustin,
Quoted 1 line
Update lpfc to revision 14.2.0.17
Applied to 6.8/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 6 lines · Justin Tee
Update lpfc to revision 14.2.0.17
This patch set contains bug fixes for the VMID feature.
The patches were cut against Martin's 6.8/scsi-queue tree.
Quoted 8 lines
Justin Tee (4):
lpfc: Change VMID driver load time parameters to read only
lpfc: Reinitialize an NPIV's VMID data structures after FDISC
lpfc: Move determination ofvmid_flagafter VMID reinitialization
completes
lpfc: Update lpfc version to 14.2.0.17[...]
Applied to 6.8/scsi-queue, thanks!
[1/4] lpfc: Change VMID driver load time parameters to read only
https://git.kernel.org/mkp/scsi/c/0653d40935f7 [2/4] lpfc: Reinitialize an NPIV's VMID data structures after FDISC https://git.kernel.org/mkp/scsi/c/8dc8eb89f4df [3/4] lpfc: Move determination of vmid_flag after VMID reinitialization completes https://git.kernel.org/mkp/scsi/c/aba0fb0ef607 [4/4] lpfc: Update lpfc version to 14.2.0.17 https://git.kernel.org/mkp/scsi/c/819952d58478
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering