All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nilesh Javali <njavali@marvell.com>
To: <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <GR-QLogic-Storage-Upstream@marvell.com>
Subject: [PATCH v2 13/15] qla2xxx: If fcport is undergoing deletion return IO with retry
Date: Wed, 2 Dec 2020 05:23:10 -0800	[thread overview]
Message-ID: <20201202132312.19966-14-njavali@marvell.com> (raw)
In-Reply-To: <20201202132312.19966-1-njavali@marvell.com>

From: Saurav Kashyap <skashyap@marvell.com>

Driver unload with IOs causes server to crash.
Return IO with retry if fcport undergoing deletion.

CPU: 44 PID: 35008 Comm: qla2xxx_4_dpc Kdump: loaded Tainted: G
OE  X   5.3.18-22-default #1 SLE15-SP2 (unreleased)
Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 07/16/2020
RIP: 0010:dma_direct_unmap_sg+0x24/0x60
Code: 4c 8b 04 24 eb b9 0f 1f 44 00 00 85 d2 7e 4e 41 57
      4d 89 c7 41 56 41 89 ce 41 55 49 89 fd 41 54 41 89 d4 55 31 ed 53 48 89
      f3 <8b> 53 18 48 8b 73 10 4d 89 f8 44 89 f1 4c 89 ef 83 c5 01 e8 44 ff
RSP: 0018:ffffc0c661037d88 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000002
RDX: 000000000000001d RSI: 0000000000000000 RDI: ffff9a51ee53b0b0
RBP: 0000000000000000 R08: 0000000000000000 R09: ffff9a51ee53b0b0
R10: ffffc0c646463dc8 R11: ffff9a4a067087c8 R12: 000000000000001d
R13: ffff9a51ee53b0b0 R14: 0000000000000002 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff9a523f800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000018 CR3: 000000043740a004 CR4: 00000000007606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
qla2xxx_qpair_sp_free_dma+0x20d/0x3c0 [qla2xxx]
qla2xxx_qpair_sp_compl+0x35/0x90 [qla2xxx]
__qla2x00_abort_all_cmds+0x180/0x390 [qla2xxx]
? qla24xx_process_purex_list+0x100/0x100 [qla2xxx]
qla2x00_abort_all_cmds+0x5e/0x80 [qla2xxx]
qla2x00_do_dpc+0x317/0xa30 [qla2xxx]
kthread+0x10d/0x130
? kthread_park+0xa0/0xa0
ret_from_fork+0x35/0x40

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
---
 drivers/scsi/qla2xxx/qla_os.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index a75edba2b334..be9d10092dd3 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -884,8 +884,8 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
 			goto qc24_fail_command;
 	}
 
-	if (!fcport) {
-		cmd->result = DID_NO_CONNECT << 16;
+	if (!fcport || fcport->deleted) {
+		cmd->result = DID_IMM_RETRY << 16;
 		goto qc24_fail_command;
 	}
 
@@ -966,8 +966,8 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
 		goto qc24_fail_command;
 	}
 
-	if (!fcport) {
-		cmd->result = DID_NO_CONNECT << 16;
+	if (!fcport || fcport->deleted) {
+		cmd->result = DID_IMM_RETRY << 16;
 		goto qc24_fail_command;
 	}
 
-- 
2.19.0.rc0


  parent reply	other threads:[~2020-12-02 13:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 13:22 [PATCH v2 00/15] qla2xxx bug fixes Nilesh Javali
2020-12-02 13:22 ` [PATCH v2 01/15] scsi: qla2xxx: Return EBUSY on fcport deletion Nilesh Javali
2020-12-02 13:22 ` [PATCH v2 02/15] qla2xxx: Change post del message from debug level to log level Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 03/15] qla2xxx: limit interrupt vectors to number of cpu Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 04/15] qla2xxx: tear down session if FW say its down Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 05/15] qla2xxx: Don't check for fw_started while posting nvme command Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 06/15] qla2xxx: Fix compilation issue in PPC systems Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 07/15] qla2xxx: Fix crash during driver load on big endian machines Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 08/15] qla2xxx: Fix FW initialization error " Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 09/15] qla2xxx: fix N2N and NVME connect retry failure Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 10/15] qla2xxx: Handle aborts correctly for port undergoing deletion Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 11/15] qla2xxx: Fix flash update in 28XX adapters on big endian machines Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 12/15] qla2xxx: Fix the call trace for flush workqueue Nilesh Javali
2020-12-02 13:23 ` Nilesh Javali [this message]
2020-12-02 13:23 ` [PATCH v2 14/15] qla2xxx: Fix device loss on 4G and older HBAs Nilesh Javali
2020-12-02 13:23 ` [PATCH v2 15/15] qla2xxx: Update version to 10.02.00.104-k Nilesh Javali
2020-12-08  2:10 ` [PATCH v2 00/15] qla2xxx bug fixes Martin K. Petersen
2020-12-09 17:23 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201202132312.19966-14-njavali@marvell.com \
    --to=njavali@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.