mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
scsi: lpfc: Resolve some cleanup issues following SLI path refactoring
Following refactoring and consolidation in SLI processing, fix up some
minor issues related to SLI path:
- Correct the setting of LPFC_EXCHANGE_BUSY flag in response IOCB.
- Fix some typographical errors.
- Fix duplicate log messages.
Link: https://lore.kernel.org/r/20220603174329.63777-4-jsmart2021@gmail.com
Fixes: 1b64aa9eae
("scsi: lpfc: SLI path split: Refactor fast and slow paths to native SLI4")
Cc: <stable@vger.kernel.org> # v5.18
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
24e1f05667
commit
e27f05147b
2 changed files with 13 additions and 14 deletions
|
@ -12188,7 +12188,7 @@ lpfc_sli_enable_msi(struct lpfc_hba *phba)
|
||||||
rc = pci_enable_msi(phba->pcidev);
|
rc = pci_enable_msi(phba->pcidev);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
||||||
"0462 PCI enable MSI mode success.\n");
|
"0012 PCI enable MSI mode success.\n");
|
||||||
else {
|
else {
|
||||||
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
||||||
"0471 PCI enable MSI mode failed (%d)\n", rc);
|
"0471 PCI enable MSI mode failed (%d)\n", rc);
|
||||||
|
|
|
@ -1930,7 +1930,7 @@ lpfc_issue_cmf_sync_wqe(struct lpfc_hba *phba, u32 ms, u64 total)
|
||||||
sync_buf = __lpfc_sli_get_iocbq(phba);
|
sync_buf = __lpfc_sli_get_iocbq(phba);
|
||||||
if (!sync_buf) {
|
if (!sync_buf) {
|
||||||
lpfc_printf_log(phba, KERN_ERR, LOG_CGN_MGMT,
|
lpfc_printf_log(phba, KERN_ERR, LOG_CGN_MGMT,
|
||||||
"6213 No available WQEs for CMF_SYNC_WQE\n");
|
"6244 No available WQEs for CMF_SYNC_WQE\n");
|
||||||
ret_val = ENOMEM;
|
ret_val = ENOMEM;
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
}
|
}
|
||||||
|
@ -3805,7 +3805,7 @@ lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
|
||||||
set_job_ulpword4(cmdiocbp,
|
set_job_ulpword4(cmdiocbp,
|
||||||
IOERR_ABORT_REQUESTED);
|
IOERR_ABORT_REQUESTED);
|
||||||
/*
|
/*
|
||||||
* For SLI4, irsiocb contains
|
* For SLI4, irspiocb contains
|
||||||
* NO_XRI in sli_xritag, it
|
* NO_XRI in sli_xritag, it
|
||||||
* shall not affect releasing
|
* shall not affect releasing
|
||||||
* sgl (xri) process.
|
* sgl (xri) process.
|
||||||
|
@ -3823,7 +3823,7 @@ lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(cmdiocbp->cmd_cmpl) (phba, cmdiocbp, saveq);
|
cmdiocbp->cmd_cmpl(phba, cmdiocbp, saveq);
|
||||||
} else
|
} else
|
||||||
lpfc_sli_release_iocbq(phba, cmdiocbp);
|
lpfc_sli_release_iocbq(phba, cmdiocbp);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4063,8 +4063,7 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba *phba,
|
||||||
cmdiocbq->cmd_flag &= ~LPFC_DRIVER_ABORTED;
|
cmdiocbq->cmd_flag &= ~LPFC_DRIVER_ABORTED;
|
||||||
if (cmdiocbq->cmd_cmpl) {
|
if (cmdiocbq->cmd_cmpl) {
|
||||||
spin_unlock_irqrestore(&phba->hbalock, iflag);
|
spin_unlock_irqrestore(&phba->hbalock, iflag);
|
||||||
(cmdiocbq->cmd_cmpl)(phba, cmdiocbq,
|
cmdiocbq->cmd_cmpl(phba, cmdiocbq, &rspiocbq);
|
||||||
&rspiocbq);
|
|
||||||
spin_lock_irqsave(&phba->hbalock, iflag);
|
spin_lock_irqsave(&phba->hbalock, iflag);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -10288,7 +10287,7 @@ __lpfc_sli_issue_iocb_s3(struct lpfc_hba *phba, uint32_t ring_number,
|
||||||
* @flag: Flag indicating if this command can be put into txq.
|
* @flag: Flag indicating if this command can be put into txq.
|
||||||
*
|
*
|
||||||
* __lpfc_sli_issue_fcp_io_s3 is wrapper function to invoke lockless func to
|
* __lpfc_sli_issue_fcp_io_s3 is wrapper function to invoke lockless func to
|
||||||
* send an iocb command to an HBA with SLI-4 interface spec.
|
* send an iocb command to an HBA with SLI-3 interface spec.
|
||||||
*
|
*
|
||||||
* This function takes the hbalock before invoking the lockless version.
|
* This function takes the hbalock before invoking the lockless version.
|
||||||
* The function will return success after it successfully submit the wqe to
|
* The function will return success after it successfully submit the wqe to
|
||||||
|
@ -12740,7 +12739,7 @@ lpfc_sli_wake_iocb_wait(struct lpfc_hba *phba,
|
||||||
cmdiocbq->cmd_cmpl = cmdiocbq->wait_cmd_cmpl;
|
cmdiocbq->cmd_cmpl = cmdiocbq->wait_cmd_cmpl;
|
||||||
cmdiocbq->wait_cmd_cmpl = NULL;
|
cmdiocbq->wait_cmd_cmpl = NULL;
|
||||||
if (cmdiocbq->cmd_cmpl)
|
if (cmdiocbq->cmd_cmpl)
|
||||||
(cmdiocbq->cmd_cmpl)(phba, cmdiocbq, NULL);
|
cmdiocbq->cmd_cmpl(phba, cmdiocbq, NULL);
|
||||||
else
|
else
|
||||||
lpfc_sli_release_iocbq(phba, cmdiocbq);
|
lpfc_sli_release_iocbq(phba, cmdiocbq);
|
||||||
return;
|
return;
|
||||||
|
@ -13896,7 +13895,7 @@ void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *phba)
|
||||||
* @irspiocbq: Pointer to work-queue completion queue entry.
|
* @irspiocbq: Pointer to work-queue completion queue entry.
|
||||||
*
|
*
|
||||||
* This routine handles an ELS work-queue completion event and construct
|
* This routine handles an ELS work-queue completion event and construct
|
||||||
* a pseudo response ELS IODBQ from the SLI4 ELS WCQE for the common
|
* a pseudo response ELS IOCBQ from the SLI4 ELS WCQE for the common
|
||||||
* discovery engine to handle.
|
* discovery engine to handle.
|
||||||
*
|
*
|
||||||
* Return: Pointer to the receive IOCBQ, NULL otherwise.
|
* Return: Pointer to the receive IOCBQ, NULL otherwise.
|
||||||
|
@ -13940,7 +13939,7 @@ lpfc_sli4_els_preprocess_rspiocbq(struct lpfc_hba *phba,
|
||||||
|
|
||||||
if (bf_get(lpfc_wcqe_c_xb, wcqe)) {
|
if (bf_get(lpfc_wcqe_c_xb, wcqe)) {
|
||||||
spin_lock_irqsave(&phba->hbalock, iflags);
|
spin_lock_irqsave(&phba->hbalock, iflags);
|
||||||
cmdiocbq->cmd_flag |= LPFC_EXCHANGE_BUSY;
|
irspiocbq->cmd_flag |= LPFC_EXCHANGE_BUSY;
|
||||||
spin_unlock_irqrestore(&phba->hbalock, iflags);
|
spin_unlock_irqrestore(&phba->hbalock, iflags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14799,7 +14798,7 @@ lpfc_sli4_fp_handle_fcp_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
|
||||||
/* Pass the cmd_iocb and the wcqe to the upper layer */
|
/* Pass the cmd_iocb and the wcqe to the upper layer */
|
||||||
memcpy(&cmdiocbq->wcqe_cmpl, wcqe,
|
memcpy(&cmdiocbq->wcqe_cmpl, wcqe,
|
||||||
sizeof(struct lpfc_wcqe_complete));
|
sizeof(struct lpfc_wcqe_complete));
|
||||||
(cmdiocbq->cmd_cmpl)(phba, cmdiocbq, cmdiocbq);
|
cmdiocbq->cmd_cmpl(phba, cmdiocbq, cmdiocbq);
|
||||||
} else {
|
} else {
|
||||||
lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
|
lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
|
||||||
"0375 FCP cmdiocb not callback function "
|
"0375 FCP cmdiocb not callback function "
|
||||||
|
|
Loading…
Add table
Reference in a new issue