linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lpfc: Fix failure to transmit ABTS on FC link
@ 2021-05-28 21:22 James Smart
  2021-06-02  5:45 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2021-05-28 21:22 UTC (permalink / raw)
  To: linux-scsi; +Cc: James Smart, stable

The abort_cmd_ia flag in an abort wqe describes whether an ABTS basic
link service should be transmitted on the FC link or not.
Code added in lpfc_sli4_issue_abort_iotag() set the abort_cmd_ia flag
incorrectly, surpressing ABTS transmission.

A previous LPFC change to build an abort wqe inverted prior logic that
determined whether an ABTS was to be issued on the FC link.

Revert this logic to its proper state.

Fixes: db7531d2b377 ("scsi: lpfc: Convert abort handling to SLI-3 and SLI-4 handlers")
Cc: <stable@vger.kernel.org> # v5.11+
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
 drivers/scsi/lpfc/lpfc_sli.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 1ad1beb2a8a8..e2cfb86f7e61 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -20615,10 +20615,8 @@ lpfc_sli4_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
 	abtswqe = &abtsiocb->wqe;
 	memset(abtswqe, 0, sizeof(*abtswqe));
 
-	if (lpfc_is_link_up(phba))
+	if (!lpfc_is_link_up(phba))
 		bf_set(abort_cmd_ia, &abtswqe->abort_cmd, 1);
-	else
-		bf_set(abort_cmd_ia, &abtswqe->abort_cmd, 0);
 	bf_set(abort_cmd_criteria, &abtswqe->abort_cmd, T_XRI_TAG);
 	abtswqe->abort_cmd.rsrvd5 = 0;
 	abtswqe->abort_cmd.wqe_com.abort_tag = xritag;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lpfc: Fix failure to transmit ABTS on FC link
  2021-05-28 21:22 [PATCH] lpfc: Fix failure to transmit ABTS on FC link James Smart
@ 2021-06-02  5:45 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-06-02  5:45 UTC (permalink / raw)
  To: linux-scsi, James Smart; +Cc: Martin K . Petersen, stable

On Fri, 28 May 2021 14:22:40 -0700, James Smart wrote:

> The abort_cmd_ia flag in an abort wqe describes whether an ABTS basic
> link service should be transmitted on the FC link or not.
> Code added in lpfc_sli4_issue_abort_iotag() set the abort_cmd_ia flag
> incorrectly, surpressing ABTS transmission.
> 
> A previous LPFC change to build an abort wqe inverted prior logic that
> determined whether an ABTS was to be issued on the FC link.
> 
> [...]

Applied to 5.13/scsi-fixes, thanks!

[1/1] lpfc: Fix failure to transmit ABTS on FC link
      https://git.kernel.org/mkp/scsi/c/696770e72f2b

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-02  5:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 21:22 [PATCH] lpfc: Fix failure to transmit ABTS on FC link James Smart
2021-06-02  5:45 ` 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;
as well as URLs for NNTP newsgroup(s).