From: Karan Tilak Kumar <kartilak@cisco.com>
To: sebaddel@cisco.com
Cc: arulponn@cisco.com, djhawar@cisco.com, gcboffa@cisco.com,
aeasi@cisco.com, mkai2@cisco.com, satishkh@cisco.com,
jejb@linux.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
jmeneghi@redhat.com, revers@redhat.com, dan.carpenter@linaro.org,
Karan Tilak Kumar <kartilak@cisco.com>,
Hannes Reinecke <hare@kernel.org>
Subject: [PATCH 4/5] scsi: fnic: Refactor in_remove flag and call to fnic_fcpio_reset()
Date: Tue, 17 Feb 2026 14:39:42 -0800 [thread overview]
Message-ID: <20260217223943.7938-4-kartilak@cisco.com> (raw)
In-Reply-To: <20260217223943.7938-1-kartilak@cisco.com>
Modify logic to remove unnecessary acquire/release of spinlock
to set in_remove flag. There's also no need to check for init status
to call fnic_fcpio_reset.
Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Co-developed-by: Hannes Reinecke <hare@kernel.org>
---
drivers/scsi/fnic/fnic_scsi.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 05b203b9b69b..7e41bb8a7628 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -1972,14 +1972,11 @@ void fnic_scsi_unload(struct fnic *fnic)
*/
spin_lock_irqsave(&fnic->fnic_lock, flags);
fnic->iport.state = FNIC_IPORT_STATE_LINK_WAIT;
- spin_unlock_irqrestore(&fnic->fnic_lock, flags);
-
- if (fdls_get_state(&fnic->iport.fabric) != FDLS_STATE_INIT)
- fnic_fcpio_reset(fnic);
- spin_lock_irqsave(&fnic->fnic_lock, flags);
fnic->in_remove = 1;
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
+ fnic_fcpio_reset(fnic);
+
fnic_flush_tport_event_list(fnic);
fnic_delete_fcp_tports(fnic);
}
--
2.47.1
next prev parent reply other threads:[~2026-02-17 22:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 22:39 [PATCH 1/5] scsi: fnic: Use mempool for receive frames Karan Tilak Kumar
2026-02-17 22:39 ` [PATCH 2/5] scsi: fnic: Do not use GFP_ZERO for mempools Karan Tilak Kumar
2026-02-19 6:06 ` Dan Carpenter
2026-02-19 19:30 ` Karan Tilak Kumar (kartilak)
2026-02-17 22:39 ` [PATCH 3/5] scsi: fnic: Rename fnic_scsi_fcpio_reset() Karan Tilak Kumar
2026-02-17 22:39 ` Karan Tilak Kumar [this message]
2026-02-17 22:39 ` [PATCH 5/5] scsi: fnic: Bump up version number Karan Tilak Kumar
2026-02-24 19:13 ` [PATCH 1/5] scsi: fnic: Use mempool for receive frames Martin K. Petersen
2026-02-28 22:22 ` Martin K. Petersen
2026-03-01 2:16 ` 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=20260217223943.7938-4-kartilak@cisco.com \
--to=kartilak@cisco.com \
--cc=aeasi@cisco.com \
--cc=arulponn@cisco.com \
--cc=dan.carpenter@linaro.org \
--cc=djhawar@cisco.com \
--cc=gcboffa@cisco.com \
--cc=hare@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=jmeneghi@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mkai2@cisco.com \
--cc=revers@redhat.com \
--cc=satishkh@cisco.com \
--cc=sebaddel@cisco.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®