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 01/15] scsi: qla2xxx: Return EBUSY on fcport deletion
Date: Wed, 2 Dec 2020 05:22:58 -0800	[thread overview]
Message-ID: <20201202132312.19966-2-njavali@marvell.com> (raw)
In-Reply-To: <20201202132312.19966-1-njavali@marvell.com>

From: Daniel Wagner <dwagner@suse.de>

When the fcport is about to be deleted we should return EBUSY instead of
ENODEV. Only for EBUSY will the request be requeued in a multipath setup.

Also return EBUSY when the firmware has not yet started to avoid dropping
the request.

Link: https://lore.kernel.org/r/20201014073048.36219-1-dwagner@suse.de
Reviewed-by: Arun Easi <aeasi@marvell.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
 drivers/scsi/qla2xxx/qla_nvme.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
index 1f9005125313..b7a1dc24db38 100644
--- a/drivers/scsi/qla2xxx/qla_nvme.c
+++ b/drivers/scsi/qla2xxx/qla_nvme.c
@@ -554,10 +554,12 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
 
 	fcport = qla_rport->fcport;
 
-	if (!qpair || !fcport || (qpair && !qpair->fw_started) ||
-	    (fcport && fcport->deleted))
+	if (!qpair || !fcport)
 		return -ENODEV;
 
+	if (!qpair->fw_started || fcport->deleted)
+		return -EBUSY;
+
 	vha = fcport->vha;
 
 	if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED))
-- 
2.19.0.rc0


  reply	other threads:[~2020-12-02 13:24 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 ` Nilesh Javali [this message]
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 ` [PATCH v2 13/15] qla2xxx: If fcport is undergoing deletion return IO with retry Nilesh Javali
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-2-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.