* [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17
@ 2023-12-07 22:40 Justin Tee
2023-12-07 22:40 ` [PATCH 1/4] lpfc: Change VMID driver load time parameters to read only Justin Tee
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Justin Tee @ 2023-12-07 22:40 UTC (permalink / raw)
To: linux-scsi; +Cc: jsmart2021, justin.tee, 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.
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(-)
--
2.38.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] lpfc: Change VMID driver load time parameters to read only
2023-12-07 22:40 [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Justin Tee
@ 2023-12-07 22:40 ` Justin Tee
2023-12-07 22:40 ` [PATCH 2/4] lpfc: Reinitialize an NPIV's VMID data structures after FDISC Justin Tee
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Justin Tee @ 2023-12-07 22:40 UTC (permalink / raw)
To: linux-scsi; +Cc: jsmart2021, justin.tee, Justin Tee
VMID driver support is a load time configuration setting. Thus, change
sysfs attributes to read only.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
---
drivers/scsi/lpfc/lpfc_attr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 48c727a51193..d3a5d6ecdf7d 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -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");
--
2.38.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] lpfc: Reinitialize an NPIV's VMID data structures after FDISC
2023-12-07 22:40 [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Justin Tee
2023-12-07 22:40 ` [PATCH 1/4] lpfc: Change VMID driver load time parameters to read only Justin Tee
@ 2023-12-07 22:40 ` Justin Tee
2023-12-07 22:40 ` [PATCH 3/4] lpfc: Move determination of vmid_flag after VMID reinitialization completes Justin Tee
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Justin Tee @ 2023-12-07 22:40 UTC (permalink / raw)
To: linux-scsi; +Cc: jsmart2021, justin.tee, Justin Tee
After 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.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
---
drivers/scsi/lpfc/lpfc_els.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index f04326db8c19..3b7ed8bca01a 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -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;
}
--
2.38.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] lpfc: Move determination of vmid_flag after VMID reinitialization completes
2023-12-07 22:40 [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Justin Tee
2023-12-07 22:40 ` [PATCH 1/4] lpfc: Change VMID driver load time parameters to read only Justin Tee
2023-12-07 22:40 ` [PATCH 2/4] lpfc: Reinitialize an NPIV's VMID data structures after FDISC Justin Tee
@ 2023-12-07 22:40 ` Justin Tee
2023-12-07 22:40 ` [PATCH 4/4] lpfc: Update lpfc version to 14.2.0.17 Justin Tee
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Justin Tee @ 2023-12-07 22:40 UTC (permalink / raw)
To: linux-scsi; +Cc: jsmart2021, justin.tee, Justin Tee
If 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.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
---
drivers/scsi/lpfc/lpfc_els.c | 6 +++---
drivers/scsi/lpfc/lpfc_vmid.c | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 3b7ed8bca01a..4d723200690a 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -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
diff --git a/drivers/scsi/lpfc/lpfc_vmid.c b/drivers/scsi/lpfc/lpfc_vmid.c
index cf8ba840d0ea..773e02ae20c3 100644
--- a/drivers/scsi/lpfc/lpfc_vmid.c
+++ b/drivers/scsi/lpfc/lpfc_vmid.c
@@ -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);
}
--
2.38.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] lpfc: Update lpfc version to 14.2.0.17
2023-12-07 22:40 [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Justin Tee
` (2 preceding siblings ...)
2023-12-07 22:40 ` [PATCH 3/4] lpfc: Move determination of vmid_flag after VMID reinitialization completes Justin Tee
@ 2023-12-07 22:40 ` Justin Tee
2023-12-14 3:20 ` [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Martin K. Petersen
2023-12-19 2:18 ` Martin K. Petersen
5 siblings, 0 replies; 7+ messages in thread
From: Justin Tee @ 2023-12-07 22:40 UTC (permalink / raw)
To: linux-scsi; +Cc: jsmart2021, justin.tee, Justin Tee
Update lpfc version to 14.2.0.17
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
---
drivers/scsi/lpfc/lpfc_version.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h
index b7d39e2f19fc..aba1c1cee8c4 100644
--- a/drivers/scsi/lpfc/lpfc_version.h
+++ b/drivers/scsi/lpfc/lpfc_version.h
@@ -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 */
--
2.38.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17
2023-12-07 22:40 [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Justin Tee
` (3 preceding siblings ...)
2023-12-07 22:40 ` [PATCH 4/4] lpfc: Update lpfc version to 14.2.0.17 Justin Tee
@ 2023-12-14 3:20 ` Martin K. Petersen
2023-12-19 2:18 ` Martin K. Petersen
5 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2023-12-14 3:20 UTC (permalink / raw)
To: Justin Tee; +Cc: linux-scsi, jsmart2021, justin.tee
Justin,
> Update lpfc to revision 14.2.0.17
Applied to 6.8/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17
2023-12-07 22:40 [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Justin Tee
` (4 preceding siblings ...)
2023-12-14 3:20 ` [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Martin K. Petersen
@ 2023-12-19 2:18 ` Martin K. Petersen
5 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2023-12-19 2:18 UTC (permalink / raw)
To: linux-scsi, Justin Tee; +Cc: Martin K . Petersen, jsmart2021, justin.tee
On Thu, 07 Dec 2023 14:40:35 -0800, Justin Tee wrote:
> 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
>
> [...]
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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-12-19 2:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-07 22:40 [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Justin Tee
2023-12-07 22:40 ` [PATCH 1/4] lpfc: Change VMID driver load time parameters to read only Justin Tee
2023-12-07 22:40 ` [PATCH 2/4] lpfc: Reinitialize an NPIV's VMID data structures after FDISC Justin Tee
2023-12-07 22:40 ` [PATCH 3/4] lpfc: Move determination of vmid_flag after VMID reinitialization completes Justin Tee
2023-12-07 22:40 ` [PATCH 4/4] lpfc: Update lpfc version to 14.2.0.17 Justin Tee
2023-12-14 3:20 ` [PATCH 0/4] lpfc: Update lpfc to revision 14.2.0.17 Martin K. Petersen
2023-12-19 2:18 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox