lpfc: Update lpfc to revision 14.2.0.5
Subsystems (3)
cover lpfc: Update lpfc to revision 14.2.0.5
Update lpfc to revision 14.2.0.5
This patch set contains mainly fixes.
The patches were cut against Martin's 5.20/scsi-queue tree with patches for 14.2.0.4 (9 patches in 5.19/scsi-fixes) applied prior.
James Smart (12):
lpfc: Fix uninitialized cqe field in lpfc_nvme_cancel_iocb
lpfc: Prevent buffer overflow crashes in debugfs with malformed user
input
lpfc: Set PU field when providing D_ID in XMIT_ELS_RSP64_CX iocb
lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after
VMID
lpfc: Fix possible memory leak when failing to issue CMF WQE
lpfc: Fix attempted FA-PWWN usage after feature disable
lpfc: Fix lost NVME paths during LIF bounce stress test
lpfc: Revert RSCN_MEMENTO workaround for misbehaved configuration
lpfc: Refactor lpfc_nvmet_prep_abort_wqe into lpfc_sli_prep_abort_xri
lpfc: Remove Menlo/Hornet related code
lpfc: Update lpfc version to 14.2.0.5
lpfc: Copyright updates for 14.2.0.5 patches
drivers/scsi/lpfc/lpfc.h | 11 +- drivers/scsi/lpfc/lpfc_attr.c | 27 +-- drivers/scsi/lpfc/lpfc_bsg.c | 324 ------------------------------- drivers/scsi/lpfc/lpfc_bsg.h | 14 +- drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_debugfs.c | 22 +-- drivers/scsi/lpfc/lpfc_els.c | 32 +-- drivers/scsi/lpfc/lpfc_hbadisc.c | 60 +----- drivers/scsi/lpfc/lpfc_hw.h | 10 - drivers/scsi/lpfc/lpfc_hw4.h | 1 - drivers/scsi/lpfc/lpfc_ids.h | 4 +- drivers/scsi/lpfc/lpfc_init.c | 19 +- drivers/scsi/lpfc/lpfc_nvme.c | 1 + drivers/scsi/lpfc/lpfc_nvmet.c | 48 +---- drivers/scsi/lpfc/lpfc_scsi.c | 1 - drivers/scsi/lpfc/lpfc_sli.c | 38 ++-- drivers/scsi/lpfc/lpfc_sli.h | 1 - drivers/scsi/lpfc/lpfc_version.h | 2 +- 18 files changed, 66 insertions(+), 551 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/12 lpfc: Fix uninitialized cqe field in lpfc_nvme_cancel_iocb
In lpfc_nvme_cancel_iocb(), a cqe is created locally from stack storage. The code didn't initialize the total_data_placed word, inheriting stack content.
Initialize the total_data_placed word.
--- drivers/scsi/lpfc/lpfc_nvme.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_nvme.c +1 -0
@@ -2824,6 +2824,7 @@ lpfc_nvme_cancel_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, wcqep->word0 =0 ;bf_set (lpfc_wcqe_c_status, wcqep, stat); wcqep->parameter = param; + wcqep->total_data_placed =0 ; wcqep->word3 =0 ;/* xb is 0 */ /* Call release with XB=1 to queue the IO into the abort list. */
Signature · 1 line
2.26.2
PATCH 2/12 lpfc: Prevent buffer overflow crashes in debugfs with malformed user input
In reply to James SmartMalformed user input to debugfs results in buffer overflow crashes. Adapt input string lengths to fit within internal buffers, leaving space for NULL terminators.
--- drivers/scsi/lpfc/lpfc_debugfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/scsi/lpfc/lpfc_debugfs.c +10 -10
@@ -2607,8 +2607,8 @@ lpfc_debugfs_multixripools_write(struct file *file, const char __user *buf,struct lpfc_sli4_hdw_queue *qp;struct lpfc_multixri_pool *multixri_pool; -if (nbytes >64 ) - nbytes =64 ; +if (nbytes >sizeof (mybuf) -1 ) + nbytes =sizeof (mybuf) -1 ;memset (mybuf,0 ,sizeof (mybuf));
@@ -2688,8 +2688,8 @@ lpfc_debugfs_nvmestat_write(struct file *file, const char __user *buf,if (!phba->targetport)return -ENXIO ; -if (nbytes >64 ) - nbytes =64 ; +if (nbytes >sizeof (mybuf) -1 ) + nbytes =sizeof (mybuf) -1 ;memset (mybuf,0 ,sizeof (mybuf));
@@ -2826,8 +2826,8 @@ lpfc_debugfs_ioktime_write(struct file *file, const char __user *buf,char mybuf[64 ];char *pbuf; -if (nbytes >64 ) - nbytes =64 ; +if (nbytes >sizeof (mybuf) -1 ) + nbytes =sizeof (mybuf) -1 ;memset (mybuf,0 ,sizeof (mybuf));
@@ -2954,8 +2954,8 @@ lpfc_debugfs_nvmeio_trc_write(struct file *file, const char __user *buf,char mybuf[64 ];char *pbuf; -if (nbytes >63 ) - nbytes =63 ; +if (nbytes >sizeof (mybuf) -1 ) + nbytes =sizeof (mybuf) -1 ;memset (mybuf,0 ,sizeof (mybuf));
@@ -3060,8 +3060,8 @@ lpfc_debugfs_hdwqstat_write(struct file *file, const char __user *buf,char *pbuf;int i; -if (nbytes >64 ) - nbytes =64 ; +if (nbytes >sizeof (mybuf) -1 ) + nbytes =sizeof (mybuf) -1 ;memset (mybuf,0 ,sizeof (mybuf));
Signature · 1 line
2.26.2
PATCH 3/12 lpfc: Set PU field when providing D_ID in XMIT_ELS_RSP64_CX iocb
In reply to James SmartWhen providing a D_ID in XMIT_ELS_RSP64_CX iocb the PU field should be set to 3 to describe the parameter being passed to firmware.
--- drivers/scsi/lpfc/lpfc_sli.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_sli.c +1 -0
@@ -10549,6 +10549,7 @@ __lpfc_sli_prep_els_req_rsp_s3(struct lpfc_iocbq *cmdiocbq, cmd->un.elsreq64.bdl.bdeSize =sizeof (struct ulp_bde64 ); cmd->un.genreq64.xmit_els_remoteID = did;/* DID */ cmd->ulpCommand =CMD_XMIT_ELS_RSP64_CX ; + cmd->ulpPU =PARM_NPIV_DID ; } cmd->ulpBdeCount =1 ; cmd->ulpLe =1 ;
Signature · 1 line
2.26.2
PATCH 4/12 lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID
In reply to James SmartVMID introduced an extra increment of cmd_pending, causing double-counting of the I/O. The normal increment ios performed in lpfc_get_scsi_buf.
--- drivers/scsi/lpfc/lpfc_scsi.c | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/lpfc/lpfc_scsi.c +0 -1
@@ -5456,7 +5456,6 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) cur_iocbq->cmd_flag |=LPFC_IO_VMID ; } } -atomic_inc (&ndlp->cmd_pending);#ifdef CONFIG_SCSI_LPFC_DEBUG_FS if (unlikely (phba->hdwqstat_on &LPFC_CHECK_SCSI_IO ))
Signature · 1 line
2.26.2
PATCH 5/12 lpfc: Fix possible memory leak when failing to issue CMF WQE
In reply to James SmartThere is no corresponding free routine if lpfc_sli4_issue_wqe fails to issue the CMF WQE in lpfc_issue_cmf_sync_wqe.
If ret_val is non-zero, then free the iocbq request structure.
--- drivers/scsi/lpfc/lpfc_sli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_sli.c +3 -1
@@ -2003,10 +2003,12 @@ lpfc_issue_cmf_sync_wqe(struct lpfc_hba *phba, u32 ms, u64 total) sync_buf->cmd_flag |=LPFC_IO_CMF ; ret_val =lpfc_sli4_issue_wqe (phba, &phba->sli4_hba.hdwq[0 ], sync_buf); -if (ret_val) +if (ret_val) {lpfc_printf_log (phba,KERN_INFO ,LOG_CGN_MGMT ,"6214 Cannot issue CMF_SYNC_WQE: x%x\n" , ret_val); +__lpfc_sli_release_iocbq (phba, sync_buf); + } out_unlock:spin_unlock_irqrestore (&phba->hbalock, iflags);return ret_val;
Signature · 1 line
2.26.2
PATCH 6/12 lpfc: Fix attempted FA-PWWN usage after feature disable
In reply to James SmartDisabling FA-PWWN should be effective after port reset, but in some cases it was found to be impossible to clear FA-PWWN usage without a driver reload.
Clean up FA-PWWN flag management to make enable and disable of the feature more robust.
--- drivers/scsi/lpfc/lpfc_init.c | 6 +++++- drivers/scsi/lpfc/lpfc_sli.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_init.c +5 -1
@@ -375,6 +375,9 @@ lpfc_update_vport_wwn(struct lpfc_vport *vport)if (phba->sli_rev ==LPFC_SLI_REV4 && vport->port_type ==LPFC_PHYSICAL_PORT && phba->sli4_hba.fawwpn_flag &LPFC_FAWWPN_FABRIC ) { +if (!(phba->sli4_hba.fawwpn_flag &LPFC_FAWWPN_CONFIG )) + phba->sli4_hba.fawwpn_flag &= + ~LPFC_FAWWPN_FABRIC ;lpfc_printf_log (phba,KERN_INFO ,LOG_SLI |LOG_DISCOVERY |LOG_ELS , "2701 FA-PWWN change WWPN from %llx to "
@@ -9975,7 +9978,8 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) "configured on\n"); phba->sli4_hba.fawwpn_flag |=LPFC_FAWWPN_CONFIG ; }else { - phba->sli4_hba.fawwpn_flag =0 ; +/* Clear FW configured flag, preserve driver flag */ + phba->sli4_hba.fawwpn_flag &= ~LPFC_FAWWPN_CONFIG ; } phba->sli4_hba.conf_trunk =
drivers/scsi/lpfc/lpfc_sli.c +6 -1
@@ -5265,7 +5265,8 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba) phba->pport->stopped =0 ; phba->link_state =LPFC_INIT_START ; phba->hba_flag =0 ; - phba->sli4_hba.fawwpn_flag =0 ; +/* Preserve FA-PWWN expectation */ + phba->sli4_hba.fawwpn_flag &=LPFC_FAWWPN_FABRIC ;spin_unlock_irq (&phba->hbalock);memset (&psli->lnk_stat_offsets,0 ,sizeof (psli->lnk_stat_offsets));
@@ -6054,6 +6055,10 @@ lpfc_sli4_retrieve_pport_name(struct lpfc_hba *phba)/* obtain link type and link number via READ_CONFIG */ phba->sli4_hba.lnk_info.lnk_dv =LPFC_LNK_DAT_INVAL ;lpfc_sli4_read_config (phba); + +if (phba->sli4_hba.fawwpn_flag &LPFC_FAWWPN_CONFIG ) + phba->sli4_hba.fawwpn_flag |=LPFC_FAWWPN_FABRIC ; +if (phba->sli4_hba.lnk_info.lnk_dv ==LPFC_LNK_DAT_VAL ) goto retrieve_ppname;
Signature · 1 line
2.26.2
PATCH 7/12 lpfc: Fix lost NVME paths during LIF bounce stress test
In reply to James SmartDuring a target link bounce test, the driver sees a mismatch between the NPortId and the WWPN on the node structures (ndlps) involved. When this occurs, the driver "swaps" the ndlp and new_ndlp node parameters to restore WWPN/DID uniqueness in the fc_nodes list per vport. However, the driver neglected to swap the nlp_fc4_type in the ndlp passed to lpfc_plogi_confirm_nport causing a failure to recover the NVME PLOGI/PRLI and ultimately the NVME paths.
Correct confirm_nport to preserve the fc4 types from the new-ndlp when the data is moved over ot the ndlp structure.
--- drivers/scsi/lpfc/lpfc_els.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/scsi/lpfc/lpfc_els.c +8 -7
@@ -1790,18 +1790,20 @@ lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp,/* Move this back to NPR state */ if (memcmp (&ndlp->nlp_portname, name,sizeof (struct lpfc_name )) ==0 ) { -/* The new_ndlp is replacing ndlp totally, so we need -* to put ndlp on UNUSED list and try to free it. +/* The ndlp doesn't have a portname yet, but does have an +* NPort ID. The new_ndlp portname matches the Rport's +* portname. Reinstantiate the new_ndlp and reset the ndlp. */ lpfc_printf_vlog (vport,KERN_INFO ,LOG_ELS ,"3179 PLOGI confirm NEW: %x %x\n" , new_ndlp->nlp_DID, keepDID);/* Two ndlps cannot have the same did on the nodelist. -* Note: for this case, ndlp has a NULL WWPN so setting -* the nlp_fc4_type isn't required. +* The KeepDID and keep_nlp_fc4_type need to be swapped +* because ndlp is inflight with no WWPN. */ ndlp->nlp_DID = keepDID; + ndlp->nlp_fc4_type = keep_nlp_fc4_type;lpfc_nlp_set_state (vport, ndlp, keep_nlp_state);if (phba->sli_rev ==LPFC_SLI_REV4 && active_rrqs_xri_bitmap)
@@ -1816,9 +1818,8 @@ lpfc_plogi_confirm_nport(struct lpfc_hba *phba, uint32_t *prsp,lpfc_unreg_rpi (vport, ndlp); -/* Two ndlps cannot have the same did and the fc4 -* type must be transferred because the ndlp is in -* flight. +/* The ndlp and new_ndlp both have WWPNs but are swapping +* NPort Ids and attributes. */ ndlp->nlp_DID = keepDID; ndlp->nlp_fc4_type = keep_nlp_fc4_type;
Signature · 1 line
2.26.2
PATCH 8/12 lpfc: Revert RSCN_MEMENTO workaround for misbehaved configuration
In reply to James SmartThe RSCN_MEMENTO logic was to workaround a target that does not register both FCP and NVME FC4 types at the same time. This caused the configuration to not produce a second RSCN for the NVME FC4 type registration in a timely manner. The intention of the RSCN_MEMENTO flag was to always signal to try NVME PRLI.
However, there are other FCP-only target arrays in correctly behaved configurations that reject the NVME PRLI followed by a LOGO leading to never rediscovering the target after an issue_lip (as LOGO causes a repeat of PLOGI/PRLIs).
Revert the RSCN_MEMENTO patch as it is causing correctly behaved configs to fail while it exists only to succeed on a misbehaved config.
--- drivers/scsi/lpfc/lpfc.h | 1 - drivers/scsi/lpfc/lpfc_els.c | 8 ++------ drivers/scsi/lpfc/lpfc_hbadisc.c | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-)
drivers/scsi/lpfc/lpfc.h +0 -1
@@ -604,7 +604,6 @@ struct lpfc_vport {#define FC_VFI_REGISTERED 0x800000/* VFI is registered */ #define FC_FDISC_COMPLETED 0x1000000/* FDISC completed */ #define FC_DISC_DELAYED 0x2000000/* Delay NPort discovery */ -#define FC_RSCN_MEMENTO 0x4000000/* RSCN cmd processed */ uint32_t ct_flags;#define FC_CT_RFF_ID 0x1/* RFF_ID accepted by switch */
drivers/scsi/lpfc/lpfc_els.c +2 -6
@@ -1887,7 +1887,6 @@ lpfc_end_rscn(struct lpfc_vport *vport)else {spin_lock_irq (shost->host_lock); vport->fc_flag &= ~FC_RSCN_MODE ; - vport->fc_flag |=FC_RSCN_MEMENTO ;spin_unlock_irq (shost->host_lock); } }
@@ -2435,14 +2434,13 @@ lpfc_issue_els_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,u32 local_nlp_type, elscmd;/* -* If discovery was kicked off from RSCN mode, -* the FC4 types supported from a +* If we are in RSCN mode, the FC4 types supported from a * previous GFT_ID command may not be accurate. So, if we * are a NVME Initiator, always look for the possibility of * the remote NPort beng a NVME Target. */ if (phba->sli_rev ==LPFC_SLI_REV4 && - vport->fc_flag & (FC_RSCN_MODE |FC_RSCN_MEMENTO ) && + vport->fc_flag &FC_RSCN_MODE && vport->nvmei_support) ndlp->nlp_fc4_type |=NLP_FC4_NVME ; local_nlp_type = ndlp->nlp_fc4_type;
@@ -7916,7 +7914,6 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,if ((rscn_cnt <FC_MAX_HOLD_RSCN ) && !(vport->fc_flag &FC_RSCN_DISCOVERY )) { vport->fc_flag |=FC_RSCN_MODE ; - vport->fc_flag &= ~FC_RSCN_MEMENTO ;spin_unlock_irq (shost->host_lock);if (rscn_cnt) { cmd = vport->fc_rscn_id_list[rscn_cnt-1 ]->virt;
@@ -7966,7 +7963,6 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,spin_lock_irq (shost->host_lock); vport->fc_flag |=FC_RSCN_MODE ; - vport->fc_flag &= ~FC_RSCN_MEMENTO ;spin_unlock_irq (shost->host_lock); vport->fc_rscn_id_list[vport->fc_rscn_id_cnt++] = pcmd;/* Indicate we are done walking fc_rscn_id_list on this vport */
drivers/scsi/lpfc/lpfc_hbadisc.c +1 -2
@@ -1354,8 +1354,7 @@ lpfc_linkup_port(struct lpfc_vport *vport)spin_lock_irq (shost->host_lock); vport->fc_flag &= ~(FC_PT2PT |FC_PT2PT_PLOGI |FC_ABORT_DISCOVERY | -FC_RSCN_MEMENTO |FC_RSCN_MODE | -FC_NLP_MORE |FC_RSCN_DISCOVERY ); +FC_RSCN_MODE |FC_NLP_MORE |FC_RSCN_DISCOVERY ); vport->fc_flag |=FC_NDISC_ACTIVE ; vport->fc_ns_retry =0 ;spin_unlock_irq (shost->host_lock);
Signature · 1 line
2.26.2
PATCH 9/12 lpfc: Refactor lpfc_nvmet_prep_abort_wqe into lpfc_sli_prep_abort_xri
In reply to James Smartlpfc_nvmet_prep_abort_wqe has a lot of common code with lpfc_sli_prep_abort_xri.
Delete lpfc_nvmet_prep_abort_wqe as the wqe can be filled out using the generic lpfc_sli_prep_abort_xri routine.
Add the wqec option to lpfc_sli_prep_abort_xri for lpfc_nvmet_prep_abort_wqe.
--- drivers/scsi/lpfc/lpfc.h | 3 ++- drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_hw4.h | 1 - drivers/scsi/lpfc/lpfc_nvmet.c | 48 ++++------------------------------ drivers/scsi/lpfc/lpfc_sli.c | 16 +++++++----- 5 files changed, 18 insertions(+), 52 deletions(-)
drivers/scsi/lpfc/lpfc.h +2 -1
@@ -986,7 +986,8 @@ struct lpfc_hba { u8 last_seq, u8 cr_cx_cmd);void (*__lpfc_sli_prep_abort_xri)(struct lpfc_iocbq *cmdiocbq,u16 ulp_context,u16 iotag, -u8 ulp_class,u16 cqid,bool ia); +u8 ulp_class,u16 cqid,bool ia, +bool wqec);/* expedite pool */ struct lpfc_epd_pool epd_pool;
drivers/scsi/lpfc/lpfc_crtn.h +1 -1
@@ -370,7 +370,7 @@ void lpfc_sli_prep_xmit_seq64(struct lpfc_hba *phba, u8 cr_cx_cmd);void lpfc_sli_prep_abort_xri (struct lpfc_hba *phba,struct lpfc_iocbq *cmdiocbq,u16 ulp_context,u16 iotag,u8 ulp_class,u16 cqid, -bool ia); +bool ia,bool wqec);struct lpfc_sglq *__lpfc_clear_active_sglq (struct lpfc_hba *phba,uint16_t xri);struct lpfc_sglq *__lpfc_sli_get_nvmet_sglq (struct lpfc_hba *phba,struct lpfc_iocbq *piocbq);
drivers/scsi/lpfc/lpfc_hw4.h +0 -1
@@ -4736,7 +4736,6 @@ struct create_xri_wqe {uint32_t rsvd_12_15[4 ];/* word 12-15 */ }; -#define INHIBIT_ABORT 1#define T_REQUEST_TAG 3#define T_XRI_TAG 1
drivers/scsi/lpfc/lpfc_nvmet.c +5 -43
72 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_sli.c +10 -6
@@ -10863,7 +10863,8 @@ lpfc_sli_prep_xmit_seq64(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocbq,static void __lpfc_sli_prep_abort_xri_s3 (struct lpfc_iocbq *cmdiocbq,u16 ulp_context, -u16 iotag,u8 ulp_class,u16 cqid,bool ia) +u16 iotag,u8 ulp_class,u16 cqid,bool ia, +bool wqec) {IOCB_t *icmd =NULL ;
@@ -10892,7 +10893,8 @@ __lpfc_sli_prep_abort_xri_s3(struct lpfc_iocbq *cmdiocbq, u16 ulp_context,static void __lpfc_sli_prep_abort_xri_s4 (struct lpfc_iocbq *cmdiocbq,u16 ulp_context, -u16 iotag,u8 ulp_class,u16 cqid,bool ia) +u16 iotag,u8 ulp_class,u16 cqid,bool ia, +bool wqec) {union lpfc_wqe128 *wqe;
@@ -10919,6 +10921,8 @@ __lpfc_sli_prep_abort_xri_s4(struct lpfc_iocbq *cmdiocbq, u16 ulp_context,bf_set (wqe_qosd, &wqe->abort_cmd.wqe_com,1 );/* Word 11 */ +if (wqec) +bf_set (wqe_wqec, &wqe->abort_cmd.wqe_com,1 );bf_set (wqe_cqid, &wqe->abort_cmd.wqe_com, cqid);bf_set (wqe_cmd_type, &wqe->abort_cmd.wqe_com,OTHER_COMMAND ); }
@@ -10926,10 +10930,10 @@ __lpfc_sli_prep_abort_xri_s4(struct lpfc_iocbq *cmdiocbq, u16 ulp_context,void lpfc_sli_prep_abort_xri (struct lpfc_hba *phba,struct lpfc_iocbq *cmdiocbq,u16 ulp_context,u16 iotag,u8 ulp_class,u16 cqid, -bool ia) +bool ia,bool wqec) { phba->__lpfc_sli_prep_abort_xri (cmdiocbq, ulp_context, iotag, ulp_class, - cqid, ia); + cqid, ia, wqec); }/**
@@ -12207,7 +12211,7 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,lpfc_sli_prep_abort_xri (phba, abtsiocbp, ulp_context, iotag, cmdiocb->iocb.ulpClass, -LPFC_WQE_CQ_ID_DEFAULT , ia); +LPFC_WQE_CQ_ID_DEFAULT , ia, false); abtsiocbp->vport = vport;
@@ -12667,7 +12671,7 @@ lpfc_sli_abort_taskmgmt(struct lpfc_vport *vport, struct lpfc_sli_ring *pring,lpfc_sli_prep_abort_xri (phba, abtsiocbq, ulp_context, iotag, iocbq->iocb.ulpClass, cqid, - ia); + ia, false); abtsiocbq->vport = vport;
Signature · 1 line
2.26.2
PATCH 10/12 lpfc: Remove Menlo/Hornet related code
In reply to James SmartThe Menlo/Hornet adapter was never released to the field. As such, driver code specific to the adapter is unnecessary and should be removed.
--- drivers/scsi/lpfc/lpfc.h | 7 - drivers/scsi/lpfc/lpfc_attr.c | 27 +-- drivers/scsi/lpfc/lpfc_bsg.c | 324 ------------------------------- drivers/scsi/lpfc/lpfc_bsg.h | 12 -- drivers/scsi/lpfc/lpfc_els.c | 9 - drivers/scsi/lpfc/lpfc_hbadisc.c | 57 +----- drivers/scsi/lpfc/lpfc_hw.h | 10 - drivers/scsi/lpfc/lpfc_ids.h | 2 - drivers/scsi/lpfc/lpfc_init.c | 13 -- drivers/scsi/lpfc/lpfc_sli.c | 10 - drivers/scsi/lpfc/lpfc_sli.h | 1 - 11 files changed, 7 insertions(+), 465 deletions(-)
drivers/scsi/lpfc/lpfc.h +0 -7
@@ -48,9 +48,6 @@ struct lpfc_sli2_slim;the NameServer before giving up. */ #define LPFC_CMD_PER_LUN 3/* max outstanding cmds per lun */ #define LPFC_DEFAULT_SG_SEG_CNT 64/* sg element count per scsi cmnd */ -#define LPFC_DEFAULT_MENLO_SG_SEG_CNT 128/* sg element count per scsi -cmnd for menlo needs nearly twice as for firmware -downloads using bsg */ #define LPFC_DEFAULT_XPSGL_SIZE 256#define LPFC_MAX_SG_TABLESIZE 0xffff
@@ -1439,8 +1436,6 @@ struct lpfc_hba {*/ #define QUE_BUFTAG_BIT (1<<31)uint32_t buffer_tag_count; -int wait_4_mlo_maint_flg; -wait_queue_head_t wait_4_mlo_m_q;/* data structure used for latency data collection */ #define LPFC_NO_BUCKET 0#define LPFC_LINEAR_BUCKET 1
@@ -1475,8 +1470,6 @@ struct lpfc_hba {/* RAS Support */ struct lpfc_ras_fwlog ras_fwlog; -uint8_t menlo_flag;/* menlo generic flags */ -#define HBA_MENLO_SUPPORT 0x1/* HBA supports menlo commands */ uint32_t iocb_cnt;uint32_t iocb_max;atomic_t sdev_cnt;
drivers/scsi/lpfc/lpfc_attr.c +1 -26
@@ -921,25 +921,6 @@ lpfc_programtype_show(struct device *dev, struct device_attribute *attr,return scnprintf (buf,PAGE_SIZE ,"%s\n" , phba->ProgramType); } -/** -* lpfc_mlomgmt_show - Return the Menlo Maintenance sli flag -* @dev: class converted to a Scsi_host structure. -* @attr: device attribute, not used. -* @buf: on return contains the Menlo Maintenance sli flag. -* -* Returns: size of formatted string. -**/ -static ssize_t -lpfc_mlomgmt_show (struct device *dev,struct device_attribute *attr,char *buf) -{ -struct Scsi_Host *shost =class_to_shost (dev); -struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; -struct lpfc_hba *phba = vport->phba; - -return scnprintf (buf,PAGE_SIZE ,"%d\n" , - (phba->sli.sli_flag &LPFC_MENLO_MAINT )); -} -/** * lpfc_vportnum_show - Return the port number in ascii of the hba * @dev: class converted to a Scsi_host structure.
@@ -1109,10 +1090,7 @@ lpfc_link_state_show(struct device *dev, struct device_attribute *attr, "Unknown\n");break ; } -if (phba->sli.sli_flag &LPFC_MENLO_MAINT ) - len +=scnprintf (buf + len,PAGE_SIZE -len, -" Menlo Maint Mode\n" ); -else if (phba->fc_topology ==LPFC_TOPOLOGY_LOOP ) { +if (phba->fc_topology ==LPFC_TOPOLOGY_LOOP ) {if (vport->fc_flag &FC_PUBLIC_LOOP ) len +=scnprintf (buf + len,PAGE_SIZE -len," Public Loop\n" );
@@ -2827,7 +2805,6 @@ static DEVICE_ATTR(option_rom_version, S_IRUGO, lpfc_option_rom_version_show, NULL); static DEVICE_ATTR(num_discovered_ports, S_IRUGO, lpfc_num_discovered_ports_show, NULL); -static DEVICE_ATTR(menlo_mgmt_mode, S_IRUGO, lpfc_mlomgmt_show, NULL); static DEVICE_ATTR(nport_evt_cnt, S_IRUGO, lpfc_nport_evt_cnt_show, NULL);static DEVICE_ATTR_RO (lpfc_drvr_version);static DEVICE_ATTR_RO (lpfc_enable_fip);
@@ -6220,7 +6197,6 @@ static struct attribute *lpfc_hba_attrs[] = { &dev_attr_option_rom_version.attr, &dev_attr_link_state.attr, &dev_attr_num_discovered_ports.attr, - &dev_attr_menlo_mgmt_mode.attr, &dev_attr_lpfc_drvr_version.attr, &dev_attr_lpfc_enable_fip.attr, &dev_attr_lpfc_temp_sensor.attr,
@@ -7396,7 +7372,6 @@ lpfc_get_hba_function_mode(struct lpfc_hba *phba)case PCI_DEVICE_ID_LANCER_FCOE :case PCI_DEVICE_ID_LANCER_FCOE_VF :case PCI_DEVICE_ID_ZEPHYR_DCSP : -case PCI_DEVICE_ID_HORNET :case PCI_DEVICE_ID_TIGERSHARK :case PCI_DEVICE_ID_TOMCAT : phba->hba_flag |=HBA_FCOE_MODE ;
drivers/scsi/lpfc/lpfc_bsg.c +0 -324
363 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_bsg.h +0 -12
@@ -33,8 +33,6 @@#define LPFC_BSG_VENDOR_DIAG_RUN_LOOPBACK 5#define LPFC_BSG_VENDOR_GET_MGMT_REV 6#define LPFC_BSG_VENDOR_MBOX 7 -#define LPFC_BSG_VENDOR_MENLO_CMD 8 -#define LPFC_BSG_VENDOR_MENLO_DATA 9#define LPFC_BSG_VENDOR_DIAG_MODE_END 10#define LPFC_BSG_VENDOR_LINK_DIAG_TEST 11#define LPFC_BSG_VENDOR_FORCED_LINK_SPEED 14
@@ -131,16 +129,6 @@ struct dfc_mbox_req {uint32_t extSeqNum; }; -/* Used for menlo command or menlo data. The xri is only used for menlo data */ -struct menlo_command { -uint32_t cmd; -uint32_t xri; -}; - -struct menlo_response { -uint32_t xri;/* return the xri of the iocb exchange */ -}; -/* * macros and data structures for handling sli-config mailbox command * pass-through support, this header file is shared between user and
drivers/scsi/lpfc/lpfc_els.c +0 -9
@@ -4570,15 +4570,6 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,case IOSTAT_LOCAL_REJECT :switch ((ulp_word4 &IOERR_PARAM_MASK )) {case IOERR_LOOP_OPEN_FAILURE : -if (cmd ==ELS_CMD_FLOGI ) { -if (PCI_DEVICE_ID_HORNET == - phba->pcidev->device) { - phba->fc_topology =LPFC_TOPOLOGY_LOOP ; - phba->pport->fc_myDID =0 ; - phba->alpa_map[0 ] =0 ; - phba->alpa_map[1 ] =0 ; - } - }if (cmd ==ELS_CMD_PLOGI && cmdiocb->retry ==0 ) delay =1000 ; retry =1 ;
drivers/scsi/lpfc/lpfc_hbadisc.c +6 -51
97 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_hw.h +0 -10
@@ -1728,7 +1728,6 @@ struct lpfc_fdmi_reg_portattr {#define PCI_DEVICE_ID_HELIOS_SCSP 0xfd11#define PCI_DEVICE_ID_HELIOS_DCSP 0xfd12#define PCI_DEVICE_ID_ZEPHYR 0xfe00 -#define PCI_DEVICE_ID_HORNET 0xfe05#define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11#define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12#define PCI_VENDOR_ID_SERVERENGINE 0x19a2
@@ -1773,7 +1772,6 @@ struct lpfc_fdmi_reg_portattr {#define ZEPHYR_JEDEC_ID 0x0577#define VIPER_JEDEC_ID 0x4838#define SATURN_JEDEC_ID 0x1004 -#define HORNET_JDEC_ID 0x2057706D#define JEDEC_ID_MASK 0x0FFFF000#define JEDEC_ID_SHIFT 12
@@ -3074,7 +3072,6 @@ struct lpfc_mbx_read_top {#define lpfc_mbx_read_top_topology_WORD word3#define LPFC_TOPOLOGY_PT_PT 0x01/* Topology is pt-pt / pt-fabric */ #define LPFC_TOPOLOGY_LOOP 0x02/* Topology is FC-AL */ -#define LPFC_TOPOLOGY_MM 0x05/* maint mode zephtr to menlo */ /* store the LILP AL_PA position map into */ struct ulp_bde64 lilpBde64;#define LPFC_ALPA_MAP_SIZE 128
@@ -4423,11 +4420,4 @@ lpfc_error_lost_link(u32 ulp_status, u32 ulp_word4) ulp_word4 == IOERR_SLI_DOWN)); } -#define MENLO_TRANSPORT_TYPE 0xfe -#define MENLO_CONTEXT 0 -#define MENLO_PU 3 -#define MENLO_TIMEOUT 30 -#define SETVAR_MLOMNT 0x103107 -#define SETVAR_MLORST 0x103007 -#define BPL_ALIGN_SZ 8/* 8 byte alignment for bpl and mbufs */
drivers/scsi/lpfc/lpfc_ids.h +0 -2
@@ -60,8 +60,6 @@ const struct pci_device_id lpfc_id_table[] = { PCI_ANY_ID, PCI_ANY_ID, }, {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR, PCI_ANY_ID, PCI_ANY_ID, }, - {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_HORNET, - PCI_ANY_ID, PCI_ANY_ID, }, {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_SCSP, PCI_ANY_ID, PCI_ANY_ID, }, {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_DCSP,
drivers/scsi/lpfc/lpfc_init.c +0 -13
@@ -2685,11 +2685,6 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp)case PCI_DEVICE_ID_SAT_S : m = (typeof (m )){"LPe12000-S" ,"PCIe" ,"Fibre Channel Adapter" };break ; -case PCI_DEVICE_ID_HORNET : - m = (typeof (m )){"LP21000" ,"PCIe" , -"Obsolete, Unsupported FCoE Adapter" }; -GE =1 ; -break ;case PCI_DEVICE_ID_PROTEUS_VF : m = (typeof (m )){"LPev12000" ,"PCIe IOV" ,"Obsolete, Unsupported Fibre Channel Adapter" };
@@ -7695,7 +7690,6 @@ lpfc_setup_driver_resource_phase1(struct lpfc_hba *phba)INIT_LIST_HEAD (&phba->port_list);INIT_LIST_HEAD (&phba->work_list); -init_waitqueue_head (&phba->wait_4_mlo_m_q);/* Initialize the wait queue head for the kernel thread */ init_waitqueue_head (&phba->work_waitq);
@@ -7779,13 +7773,6 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)if (rc)return -ENODEV ; -if (phba->pcidev->device ==PCI_DEVICE_ID_HORNET ) { - phba->menlo_flag |=HBA_MENLO_SUPPORT ; -/* check for menlo minimum sg count */ -if (phba->cfg_sg_seg_cnt <LPFC_DEFAULT_MENLO_SG_SEG_CNT ) - phba->cfg_sg_seg_cnt =LPFC_DEFAULT_MENLO_SG_SEG_CNT ; - } -if (!phba->sli.sli3_ring) phba->sli.sli3_ring = kcalloc(LPFC_SLI3_MAX_RING, sizeof(struct lpfc_sli_ring),
drivers/scsi/lpfc/lpfc_sli.c +0 -10
@@ -10223,16 +10223,6 @@ __lpfc_sli_issue_iocb_s3(struct lpfc_hba *phba, uint32_t ring_number,* can be issued if the link is not up. */ switch (piocb->iocb.ulpCommand) { -case CMD_GEN_REQUEST64_CR : -case CMD_GEN_REQUEST64_CX : -if (!(phba->sli.sli_flag &LPFC_MENLO_MAINT ) || - (piocb->iocb.un.genreq64.w5.hcsw.Rctl != -FC_RCTL_DD_UNSOL_CMD ) || - (piocb->iocb.un.genreq64.w5.hcsw.Type != -MENLO_TRANSPORT_TYPE )) - - goto iocb_busy; -break ;case CMD_QUE_RING_BUF_CN :case CMD_QUE_RING_BUF64_CN :/*
drivers/scsi/lpfc/lpfc_sli.h +0 -1
@@ -355,7 +355,6 @@ struct lpfc_sli {#define LPFC_SLI_ACTIVE 0x200/* SLI in firmware is active */ #define LPFC_PROCESS_LA 0x400/* Able to process link attention */ #define LPFC_BLOCK_MGMT_IO 0x800/* Don't allow mgmt mbx or iocb cmds */ -#define LPFC_MENLO_MAINT 0x1000/* need for menl fw download */ #define LPFC_SLI_ASYNC_MBX_BLK 0x2000/* Async mailbox is blocked */ #define LPFC_SLI_SUPPRESS_RSP 0x4000/* Suppress RSP feature is supported */ #define LPFC_SLI_USE_EQDR 0x8000/* EQ Delay Register is supported */
Signature · 1 line
2.26.2
PATCH 11/12 lpfc: Update lpfc version to 14.2.0.5
In reply to James SmartUpdate lpfc version to 14.2.0.5
--- 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.4" +#define LPFC_DRIVER_VERSION "14.2.0.5"#define LPFC_DRIVER_NAME "lpfc"/* Used for SLI 2/3 */
Signature · 1 line
2.26.2
PATCH 12/12 lpfc: Copyright updates for 14.2.0.5 patches
In reply to James SmartUpdate copyrights to 2022 for files modified in the 14.2.0.5 patch set.
--- drivers/scsi/lpfc/lpfc_bsg.h | 2 +- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/lpfc/lpfc_ids.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/lpfc/lpfc_bsg.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2010-2015 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
drivers/scsi/lpfc/lpfc_debugfs.c +1 -1
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term * * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * * Copyright (C) 2007-2015 Emulex. All rights reserved. * * EMULEX and SLI are trademarks of Emulex. *
drivers/scsi/lpfc/lpfc_ids.h +1 -1
@@ -1,7 +1,7 @@/******************************************************************* * This file is part of the Emulex Linux Device Driver for * * Fibre Channel Host Bus Adapters. * -* Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term * +* Copyright (C) 2017-2022 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. *
Signature · 1 line
2.26.2
Martin K. Petersen
AppliedJames,
Quoted 1 line
Update lpfc to revision 14.2.0.5
Applied to 5.20/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · James Smart
Update lpfc to revision 14.2.0.5
This patch set contains mainly fixes.
The patches were cut against Martin's 5.20/scsi-queue tree with patches for 14.2.0.4 (9 patches in 5.19/scsi-fixes) applied prior.
[...]
Applied to 5.20/scsi-queue, thanks!
[01/12] lpfc: Fix uninitialized cqe field in lpfc_nvme_cancel_iocb
https://git.kernel.org/mkp/scsi/c/4ecc9b0271a7 [02/12] lpfc: Prevent buffer overflow crashes in debugfs with malformed user input https://git.kernel.org/mkp/scsi/c/f8191d40aa61 [03/12] lpfc: Set PU field when providing D_ID in XMIT_ELS_RSP64_CX iocb https://git.kernel.org/mkp/scsi/c/35251b4d79db [04/12] lpfc: Remove extra atomic_inc on cmd_pending in queuecommand after VMID https://git.kernel.org/mkp/scsi/c/0948a9c53860 [05/12] lpfc: Fix possible memory leak when failing to issue CMF WQE https://git.kernel.org/mkp/scsi/c/2f67dc7970bc [06/12] lpfc: Fix attempted FA-PWWN usage after feature disable https://git.kernel.org/mkp/scsi/c/43e19a96a789 [07/12] lpfc: Fix lost NVME paths during LIF bounce stress test https://git.kernel.org/mkp/scsi/c/ea92e173dc55 [08/12] lpfc: Revert RSCN_MEMENTO workaround for misbehaved configuration https://git.kernel.org/mkp/scsi/c/ffc566411ade [09/12] lpfc: Refactor lpfc_nvmet_prep_abort_wqe into lpfc_sli_prep_abort_xri https://git.kernel.org/mkp/scsi/c/b21c9deb1479 [10/12] lpfc: Remove Menlo/Hornet related code https://git.kernel.org/mkp/scsi/c/7f86d2b84708 [11/12] lpfc: Update lpfc version to 14.2.0.5 https://git.kernel.org/mkp/scsi/c/71faf8d30fdb [12/12] lpfc: Copyright updates for 14.2.0.5 patches https://git.kernel.org/mkp/scsi/c/b3d11f195cbb
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering