public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Himanshu Madhani <himanshu.madhani@cavium.com>
Cc: James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 5/7] qla2xxx: Simpify unregistration of FC-NVMe local/remote ports
Date: Thu, 20 Jul 2017 09:03:09 +0200	[thread overview]
Message-ID: <20170720070308.GF5240@linux-x5ow.site> (raw)
In-Reply-To: <20170719185151.8564-6-himanshu.madhani@cavium.com>

On Wed, Jul 19, 2017 at 11:51:49AM -0700, Himanshu Madhani wrote:
> -static void qla_nvme_abort_all(fc_port_t *fcport)
> -{
> -	int que, cnt;
> -	unsigned long flags;
> -	srb_t *sp;
> -	struct qla_hw_data *ha = fcport->vha->hw;
> -	struct req_que *req;
> -
> -	spin_lock_irqsave(&ha->hardware_lock, flags);
> -	for (que = 0; que < ha->max_req_queues; que++) {
> -		req = ha->req_q_map[que];
> -		if (!req)
> -			continue;
> -		if (!req->outstanding_cmds)
> -			continue;
> -		for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) {
> -			sp = req->outstanding_cmds[cnt];
> -			if ((sp) && ((sp->type == SRB_NVME_CMD) ||
> -			    (sp->type == SRB_NVME_LS)) &&
> -				(sp->fcport == fcport)) {
> -				atomic_inc(&sp->ref_count);
> -				spin_unlock_irqrestore(&ha->hardware_lock,
> -				    flags);
> -				qla_nvme_abort(ha, sp);
> -				spin_lock_irqsave(&ha->hardware_lock, flags);
> -				req->outstanding_cmds[cnt] = NULL;
> -				sp->done(sp, 1);
> -			}
> -		}
> -	}
> -	spin_unlock_irqrestore(&ha->hardware_lock, flags);
> -}
> -
>  static void qla_nvme_unregister_remote_port(struct work_struct *work)
>  {
>  	struct fc_port *fcport = container_of(work, struct fc_port,
> @@ -719,12 +679,13 @@ void qla_nvme_delete(struct scsi_qla_host *vha)
>  		ql_log(ql_log_info, fcport->vha, 0x2114, "%s: fcport=%p\n",
>  		    __func__, fcport);
>  
> +		init_completion(&fcport->nvme_del_done);
>  		nvme_fc_unregister_remoteport(fcport->nvme_remote_port);
>  		qla_nvme_wait_on_rport_del(fcport);
> -		qla_nvme_abort_all(fcport);

What changed the need to abort all outstanding commands?

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2017-07-20  7:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 18:51 [PATCH 0/7] qla2xxx: Bug fixes for driver Himanshu Madhani
2017-07-19 18:51 ` [PATCH 1/7] qla2xxx: Cleanup NVMe code Himanshu Madhani
2017-07-19 20:44   ` Bart Van Assche
2017-07-19 20:58     ` Madhani, Himanshu
2017-07-20  6:40     ` Johannes Thumshirn
2017-07-20  6:44   ` Johannes Thumshirn
2017-07-19 18:51 ` [PATCH 2/7] qla2xxx: Move function prototype to correct header Himanshu Madhani
2017-07-20  6:49   ` Johannes Thumshirn
2017-07-19 18:51 ` [PATCH 3/7] qla2xxx: Add command completion wq for error path Himanshu Madhani
2017-07-19 20:46   ` Bart Van Assche
2017-07-20 17:17     ` Madhani, Himanshu
2017-07-19 18:51 ` [PATCH 4/7] qla2xxx: Added change to enable ZIO for FC-NVMe devices Himanshu Madhani
2017-07-20  7:00   ` Johannes Thumshirn
2017-07-20 16:55     ` Madhani, Himanshu
2017-07-19 18:51 ` [PATCH 5/7] qla2xxx: Simpify unregistration of FC-NVMe local/remote ports Himanshu Madhani
2017-07-20  7:03   ` Johannes Thumshirn [this message]
2017-07-21 16:25     ` Madhani, Himanshu
2017-07-19 18:51 ` [PATCH 6/7] qla2xxx: Fix remoteport disconnect for FC-NVMe Himanshu Madhani
2017-07-20  7:04   ` Johannes Thumshirn
2017-07-19 18:51 ` [PATCH 7/7] qla2xxx: Refactor usage of Active command arrays Himanshu Madhani

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=20170720070308.GF5240@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=himanshu.madhani@cavium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox