lpfc: Update lpfc to revision 12.8.0.4
Subsystems (3)
cover lpfc: Update lpfc to revision 12.8.0.4
Update lpfc to revision 12.8.0.4
The patches were cut against Martin's 5.9/scsi-queue tree
James Smart (4):
lpfc: Fix setting irq affinity with an empty cpu mask.
lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery
lpfc: Extend the RDF FPIN Registration descriptor for additional
events
lpfc: Update lpfc version to 12.8.0.4
drivers/scsi/lpfc/lpfc_els.c | 7 ++++++- drivers/scsi/lpfc/lpfc_hw4.h | 2 +- drivers/scsi/lpfc/lpfc_init.c | 1 - drivers/scsi/lpfc/lpfc_version.h | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/4 lpfc: Fix setting irq affinity with an empty cpu mask.
Some systems are reporting the following log message during driver unload or system shutdown:
ics_rtas_set_affinity: No online cpus in the mask
A prior commit introduced the writing of an empty affinity mask in calls to irq_set_affinity_hint() when disabling interrupts or when there are no remaining online cpus to service an eq interrupt. At least some ppc64 systems are checking whether affinity masks are empty or not.
Fix: Do not call irq_set_affinity_hint() with an empty cpu mask.
--- drivers/scsi/lpfc/lpfc_init.c | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/lpfc/lpfc_init.c +0 -1
@@ -11376,7 +11376,6 @@ lpfc_irq_clear_aff(struct lpfc_hba_eq_hdl *eqhdl) {cpumask_clear (&eqhdl->aff_mask);irq_clear_status_flags (eqhdl->irq,IRQ_NO_BALANCING ); -irq_set_affinity_hint (eqhdl->irq, &eqhdl->aff_mask); }/**
Signature · 1 line
2.26.2
PATCH 2/4 lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery
In reply to James SmartThe driver is unable to successfully login with remote device. During pt2pt login, the driver complete it's FLOGI request, with the remote device having WWN precedence. The remote device issues its own (delayed) FLOGI after accepting the drivers, and upon transmitting the FLOGI, immediately recognizes it has already processed the driver's FLOGI thus it transitions to sending a PLOGI before waiting for an ACC to its FLOGI.
In the driver, the FLOGI is received and an ACC sent, followed by the PLOGI being received and an ACC sent. The issue is that the PLOGI reception occurs before the response from the adapter from the FLOGI ACC is received. Processing of the PLOGI sets state flags to perform the REG_RPI mailbox command and proceed with the rest of discovery on the port. The same completion routine used by both FLOGI and PLOGI is generic in nature. One of the things it does is clear flags, and those flags happen to drive the rest of discovery. So what happened was the PLOGI processing set the flags, the FLOGI ACC completion cleared them, thus when the PLOGI ACC completes it doesn't see the flags and stops.
Fix by modifying the generic completion routine to not clear the rest of discovery flag (NLP_ACC_REGLOGIN) unless the completion is also associated with performing a mailbox command as part of it's handling. For things such as FLOGI ACC, there isn't a subsequent action to perform with the adapter, thus there is no mailbox cmd ptr. PLOGI ACC though will perform REG_RPI upon completion, thus there is a mailbox cmd ptr.
--- drivers/scsi/lpfc/lpfc_els.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_els.c +3 -1
@@ -4656,7 +4656,9 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, out:if (ndlp &&NLP_CHK_NODE_ACT (ndlp) && shost) {spin_lock_irq (shost->host_lock); - ndlp->nlp_flag &= ~(NLP_ACC_REGLOGIN |NLP_RM_DFLT_RPI ); +if (mbox) + ndlp->nlp_flag &= ~NLP_ACC_REGLOGIN ; + ndlp->nlp_flag &= ~NLP_RM_DFLT_RPI ;spin_unlock_irq (shost->host_lock);/* If the node is not being used by another discovery thread,
Signature · 1 line
2.26.2
PATCH 3/4 lpfc: Extend the RDF FPIN Registration descriptor for additional events
In reply to James SmartCurrently the driver registers for Link Integrity events only.
This patch adds registration for the following FPIN types:
Delivery Notifications
Congestion Notification
Peer Congestion Notification
--- drivers/scsi/lpfc/lpfc_els.c | 3 +++ drivers/scsi/lpfc/lpfc_hw4.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_els.c +3 -0
@@ -3517,6 +3517,9 @@ lpfc_issue_els_rdf(struct lpfc_vport *vport, uint8_t retry) FC_TLV_DESC_LENGTH_FROM_SZ(prdf->reg_d1)); prdf->reg_d1.reg_desc.count =cpu_to_be32 (ELS_RDF_REG_TAG_CNT ); prdf->reg_d1.desc_tags[0 ] =cpu_to_be32 (ELS_DTAG_LNK_INTEGRITY ); + prdf->reg_d1.desc_tags[1 ] =cpu_to_be32 (ELS_DTAG_DELIVERY ); + prdf->reg_d1.desc_tags[2 ] =cpu_to_be32 (ELS_DTAG_PEER_CONGEST ); + prdf->reg_d1.desc_tags[3 ] =cpu_to_be32 (ELS_DTAG_CONGESTION ); lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD, "Issue RDF: did:x%x",
drivers/scsi/lpfc/lpfc_hw4.h +1 -1
@@ -4800,7 +4800,7 @@ struct send_frame_wqe {uint32_t fc_hdr_wd5;/* word 15 */ }; -#define ELS_RDF_REG_TAG_CNT 1 +#define ELS_RDF_REG_TAG_CNT 4struct lpfc_els_rdf_reg_desc {struct fc_df_desc_fpin_reg reg_desc;/* descriptor header */ __be32 desc_tags[ELS_RDF_REG_TAG_CNT ];
Signature · 1 line
2.26.2
PATCH 4/4 lpfc: Update lpfc version to 12.8.0.4
In reply to James SmartUpdate lpfc version to 12.8.0.4
--- 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 "12.8.0.3" +#define LPFC_DRIVER_VERSION "12.8.0.4"#define LPFC_DRIVER_NAME "lpfc"/* Used for SLI 2/3 */
Signature · 1 line
2.26.2
Martin K. Petersen
AppliedQuoted 4 lines · James Smart
Update lpfc to revision 12.8.0.4
The patches were cut against Martin's 5.9/scsi-queue tree
Quoted 8 lines
James Smart (4):
lpfc: Fix setting irq affinity with an empty cpu mask.
lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery
lpfc: Extend the RDF FPIN Registration descriptor for additional
events
lpfc: Update lpfc version to 12.8.0.4[...]
Applied to 5.9/scsi-fixes, thanks!
[1/4] scsi: lpfc: Fix setting IRQ affinity with an empty CPU mask
https://git.kernel.org/mkp/scsi/c/7ac836ebcb15 [2/4] scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery https://git.kernel.org/mkp/scsi/c/7b08e89f98ce [3/4] scsi: lpfc: Extend the RDF FPIN Registration descriptor for additional events https://git.kernel.org/mkp/scsi/c/441f6b5b097d [4/4] scsi: lpfc: Update lpfc version to 12.8.0.4 https://git.kernel.org/mkp/scsi/c/bc5340693749
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering