All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH 11/20] fnic: use fc_block_rport() correctly
Date: Thu, 12 May 2022 13:12:27 +0200	[thread overview]
Message-ID: <20220512111236.109851-12-hare@suse.de> (raw)
In-Reply-To: <20220512111236.109851-1-hare@suse.de>

Use fc_block_rport() instead of fc_block_scsi_eh() and evaluate
the return value to avoid issuing TMF commands when the port
is still blocked.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 drivers/scsi/fnic/fnic_scsi.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 4f72fac583b7..155662b13c83 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -1733,9 +1733,6 @@ int fnic_abort_cmd(struct scsi_cmnd *sc)
 	unsigned long abt_issued_time;
 	DECLARE_COMPLETION_ONSTACK(tm_done);
 
-	/* Wait for rport to unblock */
-	fc_block_scsi_eh(sc);
-
 	/* Get local-port, check ready and link up */
 	lp = shost_priv(sc->device->host);
 
@@ -1745,6 +1742,10 @@ int fnic_abort_cmd(struct scsi_cmnd *sc)
 	term_stats = &fnic->fnic_stats.term_stats;
 
 	rport = starget_to_rport(scsi_target(sc->device));
+	ret = fc_block_rport(rport);
+	if (ret)
+		return ret;
+
 	FNIC_SCSI_DBG(KERN_DEBUG,
 		fnic->lport->host,
 		"Abort Cmd called FCID 0x%x, LUN 0x%llx TAG %x flags %x\n",
-- 
2.29.2


  parent reply	other threads:[~2022-05-12 11:13 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 11:12 [PATCHv3 00/20] scsi: EH rework prep patches, part 1 Hannes Reinecke
2022-05-12 11:12 ` [PATCH 01/20] csiostor: use fc_block_rport() Hannes Reinecke
2022-05-12 11:12 ` [PATCH 02/20] fc_fcp: " Hannes Reinecke
2022-05-12 11:12 ` [PATCH 03/20] mptfc: simplify mpt_fc_block_error_handler() Hannes Reinecke
2022-05-12 11:12 ` [PATCH 04/20] mptfusion: correct definitions for mptscsih_dev_reset() Hannes Reinecke
2022-05-19 17:27   ` Ewan Milne
2022-05-23 12:25     ` Hannes Reinecke
2022-05-12 11:12 ` [PATCH 05/20] mptfc: open-code mptfc_block_error_handler() for bus reset Hannes Reinecke
2022-05-19 17:05   ` Ewan Milne
2022-05-20  6:42     ` Hannes Reinecke
2022-05-12 11:12 ` [PATCH 06/20] qedf: use fc rport as argument for qedf_initiate_tmf() Hannes Reinecke
2022-05-19 18:22   ` Ewan Milne
2022-05-20  6:49     ` Hannes Reinecke
2022-05-25 19:06       ` Ewan Milne
2022-05-27  5:39         ` Hannes Reinecke
2022-05-12 11:12 ` [PATCH 07/20] bnx2fc: Do not rely on a scsi command for lun or target reset Hannes Reinecke
2022-05-12 11:12 ` [PATCH 08/20] ibmvfc: open-code reset loop for " Hannes Reinecke
2022-05-19 20:05   ` Ewan Milne
2022-05-20  5:52     ` Hannes Reinecke
2022-05-12 11:12 ` [PATCH 09/20] ibmvfc: use fc_block_rport() Hannes Reinecke
2022-05-12 11:12 ` [PATCH 10/20] fnic: use dedicated device reset command Hannes Reinecke
2022-05-12 11:12 ` Hannes Reinecke [this message]
2022-05-12 11:12 ` [PATCH 12/20] aic7xxx: make BUILD_SCSIID() a function Hannes Reinecke
2022-05-16  5:49   ` Christoph Hellwig
2022-05-12 11:12 ` [PATCH 13/20] aic79xx: " Hannes Reinecke
2022-05-16  5:49   ` Christoph Hellwig
2022-05-12 11:12 ` [PATCH 14/20] aic7xxx: do not reference scsi command when resetting device Hannes Reinecke
2022-05-12 11:12 ` [PATCH 15/20] aic79xx: " Hannes Reinecke
2022-05-12 11:12 ` [PATCH 16/20] snic: reserve tag for TMF Hannes Reinecke
2022-05-13  8:03   ` John Garry
2022-05-12 11:12 ` [PATCH 17/20] snic: use dedicated device reset command Hannes Reinecke
2022-05-12 11:12 ` [PATCH 18/20] snic: Use scsi_host_busy_iter() to traverse commands Hannes Reinecke
2022-05-12 11:12 ` [PATCH 19/20] ips: Do not try to abort command from host reset Hannes Reinecke
2022-05-12 11:12 ` [PATCH 20/20] megaraid: pass in NULL scb for " Hannes Reinecke

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=20220512111236.109851-12-hare@suse.de \
    --to=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=johannes.thumshirn@wdc.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.