All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@cavium.com>
To: target-devel@vger.kernel.org, Bart.VanAssche@sandisk.com,
	nab@linux-iscsi.org
Cc: giridhar.malavali@cavium.com, linux-scsi@vger.kernel.org,
	himanshu.madhani@cavium.com
Subject: [PATCH v3 12/14] qla2xxx: Add async new target notification
Date: Fri, 24 Feb 2017 13:37:41 -0800	[thread overview]
Message-ID: <1487972263-3795-13-git-send-email-himanshu.madhani@cavium.com> (raw)
In-Reply-To: <1487972263-3795-1-git-send-email-himanshu.madhani@cavium.com>

From: Quinn Tran <quinn.tran@cavium.com>

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
---
 drivers/scsi/qla2xxx/qla_target.c | 6 +++---
 drivers/scsi/qla2xxx/qla_target.h | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index b751eb6..e523c49 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -6011,13 +6011,13 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
 	tgt->datasegs_per_cmd = QLA_TGT_DATASEGS_PER_CMD_24XX;
 	tgt->datasegs_per_cont = QLA_TGT_DATASEGS_PER_CONT_24XX;
 
-	if (base_vha->fc_vport)
-		return 0;
-
 	mutex_lock(&qla_tgt_mutex);
 	list_add_tail(&tgt->tgt_list_entry, &qla_tgt_glist);
 	mutex_unlock(&qla_tgt_mutex);
 
+	if (ha->tgt.tgt_ops && ha->tgt.tgt_ops->add_target)
+		ha->tgt.tgt_ops->add_target(base_vha);
+
 	return 0;
 }
 
diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
index c73c938..26fa6a4 100644
--- a/drivers/scsi/qla2xxx/qla_target.h
+++ b/drivers/scsi/qla2xxx/qla_target.h
@@ -693,6 +693,7 @@ struct qla_tgt_func_tmpl {
 	void (*shutdown_sess)(struct fc_port *);
 	int (*get_dif_tags)(struct qla_tgt_cmd *cmd, uint16_t *pfw_prot_opts);
 	int (*chk_dif_tags)(uint32_t tag);
+	void (*add_target)(struct scsi_qla_host *);
 };
 
 int qla2x00_wait_for_hba_online(struct scsi_qla_host *);
-- 
1.8.3.1

  parent reply	other threads:[~2017-02-24 21:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 21:37 [PATCH v3 00/14] qla2xxx: Bug Fixes and updates for target Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 01/14] qla2xxx: Fix delayed response to command for loop mode/direct connect Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 02/14] qla2xxx: Allow relogin to proceed if remote login did not finish Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 03/14] qla2xxx: Allow vref count to timeout on vport delete Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 04/14] qla2xxx: Use IOCB interface to submit non-critical MBX Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 05/14] qla2xxx: Add DebugFS node to display Port Database Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 06/14] qla2xxx: Improve T10-DIF/PI handling in driver Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 07/14] qla2xxx: Export DIF stats via debugfs Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 08/14] qla2xxx: Change scsi host lookup method Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 09/14] qla2xxx: Fix memory leak for abts processing Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 10/14] qla2xxx: Fix request queue corruption Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 11/14] qla2xxx: Fix inadequate lock protection for ABTS Himanshu Madhani
2017-02-24 21:37 ` Himanshu Madhani [this message]
2017-02-24 21:37 ` [PATCH v3 13/14] qla2xxx: Fix sess_lock & hardware_lock lock order problem Himanshu Madhani
2017-02-24 21:37 ` [PATCH v3 14/14] qla2xxx: Update driver version to 9.00.00.00-k Himanshu Madhani
2017-02-28 22:00 ` [PATCH v3 00/14] qla2xxx: Bug Fixes and updates for target Madhani, Himanshu
2017-02-28 22:09   ` Bart Van Assche
2017-02-28 22:13     ` Madhani, Himanshu
2017-03-02  7:24 ` Nicholas A. Bellinger
2017-03-06  0:43 ` Bart Van Assche
2017-03-06  5:05   ` Madhani, Himanshu
2017-03-08  7:34   ` Nicholas A. Bellinger
2017-03-08 15:20     ` Bart Van Assche
2017-03-08 18:30       ` Malavali, Giridhar
2017-03-09  3:42         ` Nicholas A. Bellinger
2017-03-09 21:08           ` Malavali, Giridhar
2017-03-09  3:38       ` Nicholas A. Bellinger

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=1487972263-3795-13-git-send-email-himanshu.madhani@cavium.com \
    --to=himanshu.madhani@cavium.com \
    --cc=Bart.VanAssche@sandisk.com \
    --cc=giridhar.malavali@cavium.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    /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.