Update lpfc to revision 14.4.0.14
Subsystems (2)
cover Update lpfc to revision 14.4.0.14
Update lpfc to revision 14.4.0.14
This patch set contains updates to log messaging, trivial typecast and pointer changes, bug fixes related to kref accounting and cleanup handling, an update to a WQE submission bitfield, and restriction of first burst to specific HBAs only.
The patches were cut against Martin's 6.20/scsi-queue tree.
Justin Tee (13):
lpfc: Update log message when ndlp kref get is unsuccessful
lpfc: Log discarded and insufficient RQE buffer events
lpfc: Add log messages to fabric login error labels
lpfc: Use min_t() instead of min() in lpfc_sli4_driver_resource_setup
lpfc: Reduce pointer chasing when accessing vmid_flag
lpfc: Remove unnecessary ndlp kref get in lpfc_check_nlp_post_devloss
lpfc: Cleanup error exit paths in lpfc_fdmi_cmd and associated
messages
lpfc: Fix incorrect txcmplq_cnt during cleanup in lpfc_sli_abort_ring
lpfc: Add clean up of aborted NVMe commands during PCI fcn reset
lpfc: Update class of service bit field to 3 bits for WQE submissions
lpfc: Restrict first burst to non-FCoE and SLI4 adapters only
lpfc: Update copyright year string for 2026
lpfc: Update lpfc version to 14.4.0.14
drivers/scsi/lpfc/lpfc_crtn.h | 3 +- drivers/scsi/lpfc/lpfc_ct.c | 13 ++--- drivers/scsi/lpfc/lpfc_disc.h | 5 +- drivers/scsi/lpfc/lpfc_els.c | 30 ++++++++---- drivers/scsi/lpfc/lpfc_hbadisc.c | 29 ++++++----- drivers/scsi/lpfc/lpfc_init.c | 6 +-- drivers/scsi/lpfc/lpfc_nvme.c | 50 ++++++++++++++++++- drivers/scsi/lpfc/lpfc_scsi.c | 10 ++-- drivers/scsi/lpfc/lpfc_sli.c | 83 +++++++++++++++----------------- drivers/scsi/lpfc/lpfc_sli4.h | 5 +- drivers/scsi/lpfc/lpfc_version.h | 6 +-- 11 files changed, 150 insertions(+), 90 deletions(-)
Signature · 1 line
2.38.0
PATCH 1/13 lpfc: Update log message when ndlp kref get is unsuccessful
If kref_get_unless_zero on ndlp->kref is unsuccessful, then there's no point to log kref_read(&ndlp->kref) because it will of course be zero. In such cases, ndlp->vport would also be an invalid pointer. Thus, use pr_info instead of lpfc_printf_vlog to log when a kref get is attempted on an ndlp with a zero kref.
--- drivers/scsi/lpfc/lpfc_hbadisc.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +3 -9
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -6601,11 +6601,6 @@ lpfc_nlp_get(struct lpfc_nodelist *ndlp)unsigned long flags;if (ndlp) { -lpfc_debugfs_disc_trc (ndlp->vport,LPFC_DISC_TRC_NODE , -"node get: did:x%x flg:x%lx refcnt:x%x" , - ndlp->nlp_DID, ndlp->nlp_flag, -kref_read (&ndlp->kref)); -/* The check of ndlp usage to prevent incrementing the * ndlp reference count that is in the process of being * released.
@@ -6613,9 +6608,8 @@ lpfc_nlp_get(struct lpfc_nodelist *ndlp)spin_lock_irqsave (&ndlp->lock, flags);if (!kref_get_unless_zero (&ndlp->kref)) {spin_unlock_irqrestore (&ndlp->lock, flags); -lpfc_printf_vlog (ndlp->vport,KERN_WARNING ,LOG_NODE , -"0276 %s: ndlp:x%px refcnt:%d\n" , - __func__, (void *)ndlp,kref_read (&ndlp->kref)); +pr_info ("0276 %s: NDLP x%px has zero reference count. " +"Exiting\n" , __func__, ndlp);return NULL ; }spin_unlock_irqrestore (&ndlp->lock, flags);
Signature · 1 line
2.38.0
PATCH 2/13 lpfc: Log discarded and insufficient RQE buffer events
In reply to Justin TeeAn RCQE with statuses indicating that an RQE is dropped or when there are insufficient buffers to receive new RQEs are currently occuring silently. Add a new log message to warn when such events occur.
--- drivers/scsi/lpfc/lpfc_sli.c | 17 ++++++++++++++--- drivers/scsi/lpfc/lpfc_sli4.h | 5 ++++- 2 files changed, 18 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +14 -3
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -14740,11 +14740,22 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe)atomic_read (&tgtp->rcv_fcp_cmd_out), atomic_read(&tgtp->xmt_fcp_release)); } + hrq->RQ_discard_frm++; fallthrough; -case FC_STATUS_INSUFF_BUF_NEED_BUF : +/* Unexpected event - bump the counter for support. */ hrq->RQ_no_posted_buf++; -/* Post more buffers if possible */ + +lpfc_log_msg (phba,KERN_WARNING , +LOG_ELS |LOG_DISCOVERY |LOG_SLI , +"6423 RQE completion Status x%x, needed x%x " +"discarded x%x\n" , status, + hrq->RQ_no_posted_buf - hrq->RQ_discard_frm, + hrq->RQ_discard_frm); + +/* For SLI3, post more buffers if possible. No action for SLI4. +* SLI4 is reposting immediately after processing the RQE. +*/ set_bit (HBA_POST_RECEIVE_BUFFER , &phba->hba_flag); workposted = true;break ;
drivers/scsi/lpfc/lpfc_sli4.h +4 -1
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2009-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -246,6 +246,8 @@ struct lpfc_queue {uint32_t q_cnt_2;uint32_t q_cnt_3;uint64_t q_cnt_4; +uint32_t q_cnt_5; +/* defines for EQ stats */ #define EQ_max_eqe q_cnt_1#define EQ_no_entry q_cnt_2
@@ -268,6 +270,7 @@ struct lpfc_queue {#define RQ_no_buf_found q_cnt_2#define RQ_buf_posted q_cnt_3#define RQ_rcv_buf q_cnt_4 +#define RQ_discard_frm q_cnt_5struct work_struct irqwork;struct work_struct spwork;
Signature · 1 line
2.38.0
PATCH 3/13 lpfc: Add log messages to fabric login error labels
In reply to Justin TeeShould fabric login or related initialization mailbox commands fail, there are no log messages to notify which step encountered an issue. Update error label paths to log when unexpected fabric login issues occur.
--- drivers/scsi/lpfc/lpfc_els.c | 24 ++++++++++++++++-------- drivers/scsi/lpfc/lpfc_hbadisc.c | 16 +++++++++++++--- 2 files changed, 29 insertions(+), 11 deletions(-)
drivers/scsi/lpfc/lpfc_els.c +16 -8
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -1303,8 +1303,12 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, elsiocb =lpfc_prep_els_iocb (vport,1 , cmdsize, retry, ndlp, ndlp->nlp_DID,ELS_CMD_FLOGI ); -if (!elsiocb) +if (!elsiocb) { +lpfc_vport_set_state (vport,FC_VPORT_FAILED ); +lpfc_printf_vlog (vport,KERN_WARNING ,LOG_ELS |LOG_DISCOVERY , +"4296 Unable to prepare FLOGI iocb\n" );return 1 ; + } wqe = &elsiocb->wqe; pcmd = (uint8_t *)elsiocb->cmd_dmabuf->virt;
@@ -1394,10 +1398,8 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, phba->sli3_options, 0, 0); elsiocb->ndlp =lpfc_nlp_get (ndlp); -if (!elsiocb->ndlp) { -lpfc_els_free_iocb (phba, elsiocb); -return 1 ; - } +if (!elsiocb->ndlp) + goto err_out;/* Avoid race with FLOGI completion and hba_flags. */ set_bit (HBA_FLOGI_ISSUED , &phba->hba_flag);
@@ -1407,9 +1409,8 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,if (rc ==IOCB_ERROR ) {clear_bit (HBA_FLOGI_ISSUED , &phba->hba_flag);clear_bit (HBA_FLOGI_OUTSTANDING , &phba->hba_flag); -lpfc_els_free_iocb (phba, elsiocb);lpfc_nlp_put (ndlp); -return 1 ; + goto err_out; }/* Clear external loopback plug detected flag */
@@ -1474,6 +1475,13 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, }return 0 ; + + err_out: +lpfc_els_free_iocb (phba, elsiocb); +lpfc_vport_set_state (vport,FC_VPORT_FAILED ); +lpfc_printf_vlog (vport,KERN_WARNING ,LOG_ELS |LOG_DISCOVERY , +"4297 Issue FLOGI: Cannot send IOCB\n" ); +return 1 ; }/**
drivers/scsi/lpfc/lpfc_hbadisc.c +13 -3
@@ -3175,7 +3175,11 @@ lpfc_init_vfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)return ; } -lpfc_initial_flogi (vport); +if (!lpfc_initial_flogi (vport)) { +lpfc_printf_vlog (vport,KERN_ERR ,LOG_MBOX |LOG_ELS , +"2345 Can't issue initial FLOGI\n" ); +lpfc_vport_set_state (vport,FC_VPORT_FAILED ); + }mempool_free (mboxq, phba->mbox_mem_pool);return ; }
@@ -3248,8 +3252,14 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)return ; } -if (phba->link_flag &LS_NPIV_FAB_SUPPORTED ) -lpfc_initial_fdisc (vport); +if (phba->link_flag &LS_NPIV_FAB_SUPPORTED ) { +if (!lpfc_initial_fdisc (vport)) { +lpfc_printf_vlog (vport,KERN_WARNING , +LOG_MBOX |LOG_ELS , +"2346 Can't issue initial FDISC\n" ); +lpfc_vport_set_state (vport,FC_VPORT_FAILED ); + } + }else {lpfc_vport_set_state (vport,FC_VPORT_NO_FABRIC_SUPP ); lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
Signature · 1 line
2.38.0
PATCH 4/13 lpfc: Use min_t() instead of min() in lpfc_sli4_driver_resource_setup
In reply to Justin TeeThe member called cfg_sg_dma_buf_size is declared as a u32, while the min comparator's second argument called SLI4_PAGE_SIZE is a #define. Proper comparison should be using the same type, therefore change to use min_t.
--- drivers/scsi/lpfc/lpfc_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_init.c +2 -2
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -8287,7 +8287,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) phba->cfg_total_seg_cnt, phba->cfg_scsi_seg_cnt, phba->cfg_nvme_seg_cnt); - i =min (phba->cfg_sg_dma_buf_size,SLI4_PAGE_SIZE ); + i =min_t (u32, phba->cfg_sg_dma_buf_size,SLI4_PAGE_SIZE ); phba->lpfc_sg_dma_buf_pool = dma_pool_create("lpfc_sg_dma_buf_pool",
Signature · 1 line
2.38.0
PATCH 5/13 lpfc: Reduce pointer chasing when accessing vmid_flag
In reply to Justin TeeFor all FLOGI completions, the vport->phba->pport pointer is actually a pointer to the original vport pointer because FLOGIs always complete on the physical lpfc_vport object. Thus, we can reduce the vport->phba->pport->vmid_flag dereference to simply vport->vmid_flag.
--- drivers/scsi/lpfc/lpfc_els.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_els.c +1 -1
@@ -1107,7 +1107,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, vport->vmid_flag =0 ; }if (sp->cmn.priority_tagging) - vport->phba->pport->vmid_flag |= (LPFC_VMID_ISSUE_QFPA | + vport->vmid_flag |= (LPFC_VMID_ISSUE_QFPA |LPFC_VMID_TYPE_PRIO );/*
Signature · 1 line
2.38.0
PATCH 6/13 lpfc: Remove unnecessary ndlp kref get in lpfc_check_nlp_post_devloss
In reply to Justin TeeWhen NLP_IN_RECOV_POST_DEV_LOSS is set, the initial node reference remains held while recovery is in progress. Taking a reference when NLP_IN_RECOV_POST_DEV_LOSS is cleared results in an additional reference being held. This causes an extra reference when cleaning up lpfc_vport instances. Thus, remove the extraneous ndlp kref get in lpfc_check_nlp_post_devloss.
--- drivers/scsi/lpfc/lpfc_hbadisc.c | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +0 -1
@@ -425,7 +425,6 @@ lpfc_check_nlp_post_devloss(struct lpfc_vport *vport, {if (test_and_clear_bit (NLP_IN_RECOV_POST_DEV_LOSS , &ndlp->save_flags)) {clear_bit (NLP_DROPPED , &ndlp->nlp_flag); -lpfc_nlp_get (ndlp);lpfc_printf_vlog (vport,KERN_INFO ,LOG_DISCOVERY |LOG_NODE ,"8438 Devloss timeout reversed on DID x%x " "refcnt %d ndlp %p flag x%lx "
Signature · 1 line
2.38.0
PATCH 7/13 lpfc: Cleanup error exit paths in lpfc_fdmi_cmd and associated messages
In reply to Justin TeeError labels in lpfc_fdmi_cmd accidentally return success status and can potentially leak memory. Change error exit path status to return a non-zero value using a common exit path for failure cases. The error path also frees allocated memory and provides logging.
--- drivers/scsi/lpfc/lpfc_ct.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/scsi/lpfc/lpfc_ct.c +7 -6
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -2427,13 +2427,14 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,/* CGN is only for the physical port, no vports */ if (lpfc_fdmi_cmd (vport, ndlp, cmd, - LPFC_FDMI_VENDOR_ATTR_mi) ==0 ) + LPFC_FDMI_VENDOR_ATTR_mi) ==0 ) { phba->link_flag |=LS_CT_VEN_RPA ; -lpfc_printf_log (phba,KERN_INFO , +lpfc_printf_log (phba,KERN_INFO ,LOG_DISCOVERY |LOG_ELS ,"6458 Send MI FDMI:%x Flag x%x\n" , phba->sli4_hba.pc_sli4_params.mi_ver, phba->link_flag); + } }else { lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY | LOG_ELS,
@@ -3214,7 +3215,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, struct lpfc_iocbq *rspiocb);if (!ndlp) -return 0 ; + goto fdmi_cmd_exit; cmpl = lpfc_cmpl_ct_disc_fdmi;/* called from discovery */
@@ -3320,7 +3321,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,if (vport->port_type !=LPFC_PHYSICAL_PORT ) { ndlp =lpfc_findnode_did (phba->pport,FDMI_DID );if (!ndlp) -return 0 ; + goto fdmi_cmd_free_rspvirt; } fallthrough;case SLI_MGMT_RPA :
@@ -3396,7 +3397,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,if (vport->port_type !=LPFC_PHYSICAL_PORT ) { ndlp =lpfc_findnode_did (phba->pport,FDMI_DID );if (!ndlp) -return 0 ; + goto fdmi_cmd_free_rspvirt; } fallthrough;case SLI_MGMT_DPA :
Signature · 1 line
2.38.0
PATCH 8/13 lpfc: Fix incorrect txcmplq_cnt during cleanup in lpfc_sli_abort_ring
In reply to Justin TeeWhen a port is offline in lpfc_sli_abort_ring, the phba->txcmplq is cleared but the phba->txcmplq_cnt is not reset to zero. This can sometimes result in a phba->txcmplq_cnt that never reaches zero, which hangs the cleanup process.
Update lpfc_sli_abort_ring so that txcmplq_cnt is reset to zero and also ensure that the LPFC_IO_ON_TXCMPLQ flag is properly cleared.
--- drivers/scsi/lpfc/lpfc_sli.c | 66 +++++++++++++----------------------- 1 file changed, 24 insertions(+), 42 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +24 -42
@@ -4573,59 +4573,41 @@ void lpfc_sli_abort_iocb_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) {LIST_HEAD (tx_completions); -LIST_HEAD (txcmplq_completions); +spinlock_t *plock;/* for transmit queue access */ struct lpfc_iocbq *iocb, *next_iocb;int offline; -if (pring->ringno ==LPFC_ELS_RING ) { +if (phba->sli_rev >=LPFC_SLI_REV4 ) + plock = &pring->ring_lock; +else + plock = &phba->hbalock; + +if (pring->ringno ==LPFC_ELS_RING )lpfc_fabric_abort_hba (phba); - } + offline =pci_channel_offline (phba->pcidev); -/* Error everything on txq and txcmplq -* First do the txq. -*/ -if (phba->sli_rev >=LPFC_SLI_REV4 ) { -spin_lock_irq (&pring->ring_lock); -list_splice_init (&pring->txq, &tx_completions); - pring->txq_cnt =0 ; +/* Cancel everything on txq */ +spin_lock_irq (plock); +list_splice_init (&pring->txq, &tx_completions); + pring->txq_cnt =0 ; -if (offline) { -list_splice_init (&pring->txcmplq, - &txcmplq_completions); - }else { -/* Next issue ABTS for everything on the txcmplq */ -list_for_each_entry_safe (iocb, next_iocb, - &pring->txcmplq, list) -lpfc_sli_issue_abort_iotag (phba, pring, - iocb,NULL ); - } -spin_unlock_irq (&pring->ring_lock); +if (offline) { +/* Cancel everything on txcmplq */ +list_for_each_entry_safe (iocb, next_iocb, &pring->txcmplq, list) + iocb->cmd_flag &= ~LPFC_IO_ON_TXCMPLQ ; +list_splice_init (&pring->txcmplq, &tx_completions); + pring->txcmplq_cnt =0 ; }else { -spin_lock_irq (&phba->hbalock); -list_splice_init (&pring->txq, &tx_completions); - pring->txq_cnt =0 ; - -if (offline) { -list_splice_init (&pring->txcmplq, &txcmplq_completions); - }else { -/* Next issue ABTS for everything on the txcmplq */ -list_for_each_entry_safe (iocb, next_iocb, - &pring->txcmplq, list) -lpfc_sli_issue_abort_iotag (phba, pring, - iocb,NULL ); - } -spin_unlock_irq (&phba->hbalock); +/* Issue ABTS for everything on the txcmplq */ +list_for_each_entry_safe (iocb, next_iocb, &pring->txcmplq, list) +lpfc_sli_issue_abort_iotag (phba, pring, iocb,NULL ); } +spin_unlock_irq (plock); -if (offline) { -/* Cancel all the IOCBs from the completions list */ -lpfc_sli_cancel_iocbs (phba, &txcmplq_completions, -IOSTAT_LOCAL_REJECT ,IOERR_SLI_ABORTED ); - }else { -/* Make sure HBA is alive */ +if (!offline)lpfc_issue_hb_tmo (phba); - } +/* Cancel all the IOCBs from the completions list */ lpfc_sli_cancel_iocbs (phba, &tx_completions,IOSTAT_LOCAL_REJECT ,IOERR_SLI_ABORTED );
Signature · 1 line
2.38.0
PATCH 9/13 lpfc: Add clean up of aborted NVMe commands during PCI fcn reset
In reply to Justin TeeWhen handling a PCI function reset, notification to the NVME transport layer is skipped for outstanding aborted NVME I/O. Introduce a new routine called lpfc_nvme_flush_abts_list, which notifies upper NVME transport layer of outstanding aborted NVME I/O that are not planned to be completed normally due to a PCI function reset request.
--- drivers/scsi/lpfc/lpfc_crtn.h | 3 ++- drivers/scsi/lpfc/lpfc_init.c | 2 +- drivers/scsi/lpfc/lpfc_nvme.c | 50 ++++++++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_crtn.h +2 -1
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -660,6 +660,7 @@ void lpfc_wqe_cmd_template(void);void lpfc_nvmet_cmd_template (void );void lpfc_nvme_cancel_iocb (struct lpfc_hba *phba,struct lpfc_iocbq *pwqeIn,uint32_t stat,uint32_t param); +void lpfc_nvme_flush_abts_list (struct lpfc_hba *phba);void lpfc_nvmels_flush_cmd (struct lpfc_hba *phba);extern int lpfc_enable_nvmet_cnt;extern unsigned long long lpfc_enable_nvmet[];
drivers/scsi/lpfc/lpfc_init.c +1 -1
@@ -1087,7 +1087,6 @@ lpfc_hba_down_post_s4(struct lpfc_hba *phba)struct lpfc_async_xchg_ctx *ctxp, *ctxp_next;struct lpfc_sli4_hdw_queue *qp;LIST_HEAD (aborts); -LIST_HEAD (nvme_aborts);LIST_HEAD (nvmet_aborts);struct lpfc_sglq *sglq_entry =NULL ;int cnt, idx;
@@ -1946,6 +1945,7 @@ lpfc_sli4_port_sta_fn_reset(struct lpfc_hba *phba, int mbx_action,lpfc_offline_prep (phba, mbx_action);lpfc_sli_flush_io_rings (phba); +lpfc_nvme_flush_abts_list (phba);lpfc_nvmels_flush_cmd (phba);lpfc_offline (phba);/* release interrupt for possible resource change */
drivers/scsi/lpfc/lpfc_nvme.c +49 -1
62 lines not on this page · raw message
Signature · 1 line
2.38.0
PATCH 10/13 lpfc: Update class of service bit field to 3 bits for WQE submissions
In reply to Justin TeeWQE submissions only require a 3 bit field when specifying the class of service to use. So, update WQE submission paths to use a 3 bit field instead of 0x0f as the bit mask. A NLP_FCP_CLASS_MASK bitmask is defined to ensure only a 3 bit mask is used.
--- drivers/scsi/lpfc/lpfc_disc.h | 5 +++-- drivers/scsi/lpfc/lpfc_scsi.c | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-)
drivers/scsi/lpfc/lpfc_disc.h +3 -2
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2013 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -137,7 +137,8 @@ struct lpfc_nodelist {uint16_t nlp_maxframe;/* Max RCV frame size */ uint8_t nlp_class_sup;/* Supported Classes */ uint8_t nlp_retry;/* used for ELS retries */ -uint8_t nlp_fcp_info;/* class info, bits 0-3 */ +uint8_t nlp_fcp_info;/* class info, bits 0-2 */ +#define NLP_FCP_CLASS_MASK 0x07/* class info bitmask */ #define NLP_FCP_2_DEVICE 0x10/* FCP-2 device */ u8 nlp_nvme_info;/* NVME NSLER Support */ uint8_t vmid_support;/* destination VMID support */
drivers/scsi/lpfc/lpfc_scsi.c +5 -5
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -4665,7 +4665,7 @@ static int lpfc_scsi_prep_cmnd_buf_s3(struct lpfc_vport *vport,else piocbq->iocb.ulpFCP2Rcvy =0 ; - piocbq->iocb.ulpClass = (pnode->nlp_fcp_info &0x0f ); + piocbq->iocb.ulpClass = (pnode->nlp_fcp_info &NLP_FCP_CLASS_MASK ); piocbq->io_buf = lpfc_cmd;if (!piocbq->cmd_cmpl) piocbq->cmd_cmpl = lpfc_scsi_cmd_iocb_cmpl;
@@ -4777,7 +4777,7 @@ static int lpfc_scsi_prep_cmnd_buf_s4(struct lpfc_vport *vport,bf_set (wqe_erp, &wqe->generic.wqe_com,1 );bf_set (wqe_class, &wqe->generic.wqe_com, - (pnode->nlp_fcp_info &0x0f )); + (pnode->nlp_fcp_info &NLP_FCP_CLASS_MASK ));/* Word 8 */ wqe->generic.wqe_com.abort_tag = pwqeq->iotag;
@@ -4877,7 +4877,7 @@ lpfc_scsi_prep_task_mgmt_cmd_s3(struct lpfc_vport *vport, piocb->ulpCommand =CMD_FCP_ICMND64_CR ; piocb->ulpContext = ndlp->nlp_rpi; piocb->ulpFCP2Rcvy = (ndlp->nlp_fcp_info &NLP_FCP_2_DEVICE ) ?1 :0 ; - piocb->ulpClass = (ndlp->nlp_fcp_info &0x0f ); + piocb->ulpClass = (ndlp->nlp_fcp_info &NLP_FCP_CLASS_MASK ); piocb->ulpPU =0 ; piocb->un.fcpi.fcpi_parm =0 ;
@@ -4945,7 +4945,7 @@ lpfc_scsi_prep_task_mgmt_cmd_s4(struct lpfc_vport *vport,bf_set (wqe_erp, &wqe->fcp_icmd.wqe_com, ((ndlp->nlp_fcp_info &NLP_FCP_2_DEVICE ) ?1 :0 ));bf_set (wqe_class, &wqe->fcp_icmd.wqe_com, - (ndlp->nlp_fcp_info &0x0f )); + (ndlp->nlp_fcp_info &NLP_FCP_CLASS_MASK ));/* ulpTimeout is only one byte */ if (lpfc_cmd->timeout >0xff ) {
Signature · 1 line
2.38.0
PATCH 11/13 lpfc: Restrict first burst to non-FCoE and SLI4 adapters only
In reply to Justin TeeFirst burst is only supported on adapters running in SLI4 mode and that are non-FCoE based. Include sli_rev and FCoE mode checks before setting the write transfer ready disabled bit in PRLIs.
--- drivers/scsi/lpfc/lpfc_els.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_els.c +3 -1
@@ -2649,7 +2649,9 @@ lpfc_issue_els_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, } npr->estabImagePair =1 ; npr->readXferRdyDis =1 ; -if (vport->cfg_first_burst_size) +if (phba->sli_rev ==LPFC_SLI_REV4 && + !test_bit (HBA_FCOE_MODE , &phba->hba_flag) && + vport->cfg_first_burst_size) npr->writeXferRdyDis =1 ;/* For FCP support */
Signature · 1 line
2.38.0
PATCH 12/13 lpfc: Update copyright year string for 2026
In reply to Justin TeeUpdate copyright string to 2026 for this version patch set.
--- drivers/scsi/lpfc/lpfc_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_version.h +2 -2
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2004-2016 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
@@ -32,6 +32,6 @@#define LPFC_MODULE_DESC "Emulex LightPulse Fibre Channel SCSI driver " \ LPFC_DRIVER_VERSION -#define LPFC_COPYRIGHT "Copyright (C) 2017-2025 Broadcom. All Rights " \ +#define LPFC_COPYRIGHT "Copyright (C) 2017-2026 Broadcom. All Rights " \ "Reserved. The term \"Broadcom\" refers to Broadcom Inc. " \ "and/or its subsidiaries."
Signature · 1 line
2.38.0
PATCH 13/13 lpfc: Update lpfc version to 14.4.0.14
In reply to Justin TeeUpdate lpfc version to 14.4.0.14
--- 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.4.0.13" +#define LPFC_DRIVER_VERSION "14.4.0.14"#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.4.0.14
Applied to 7.1/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 8 lines · Justin Tee
Update lpfc to revision 14.4.0.14
This patch set contains updates to log messaging, trivial typecast and pointer changes, bug fixes related to kref accounting and cleanup handling, an update to a WQE submission bitfield, and restriction of first burst to specific HBAs only.
[...]
Applied to 7.1/scsi-queue, thanks!
[01/13] lpfc: Update log message when ndlp kref get is unsuccessful
https://git.kernel.org/mkp/scsi/c/8ecb3ec244ac [02/13] lpfc: Log discarded and insufficient RQE buffer events https://git.kernel.org/mkp/scsi/c/b4082ac8e62c [03/13] lpfc: Add log messages to fabric login error labels https://git.kernel.org/mkp/scsi/c/5f442e54e9ef [04/13] lpfc: Use min_t() instead of min() in lpfc_sli4_driver_resource_setup https://git.kernel.org/mkp/scsi/c/f8c599ad90f5 [05/13] lpfc: Reduce pointer chasing when accessing vmid_flag https://git.kernel.org/mkp/scsi/c/70b468d41b82 [06/13] lpfc: Remove unnecessary ndlp kref get in lpfc_check_nlp_post_devloss https://git.kernel.org/mkp/scsi/c/f6bfb8d14933 [07/13] lpfc: Cleanup error exit paths in lpfc_fdmi_cmd and associated messages https://git.kernel.org/mkp/scsi/c/6b0bcf4b6430 [08/13] lpfc: Fix incorrect txcmplq_cnt during cleanup in lpfc_sli_abort_ring https://git.kernel.org/mkp/scsi/c/2da10bcaa58a [09/13] lpfc: Add clean up of aborted NVMe commands during PCI fcn reset https://git.kernel.org/mkp/scsi/c/559a6c2ab097 [10/13] lpfc: Update class of service bit field to 3 bits for WQE submissions https://git.kernel.org/mkp/scsi/c/9714c5463fd1 [11/13] lpfc: Restrict first burst to non-FCoE and SLI4 adapters only https://git.kernel.org/mkp/scsi/c/5807d96c46d5 [12/13] lpfc: Update copyright year string for 2026 https://git.kernel.org/mkp/scsi/c/107cb8ed4f44 [13/13] lpfc: Update lpfc version to 14.4.0.14 https://git.kernel.org/mkp/scsi/c/6446e8c2b6c7
Signature · 1 line
Martin K. Petersen