summaryrefslogtreecommitdiff
path: root/drivers/target/loopback/tcm_loop.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2014-11-26 14:58:57 +0100
committerNicholas Bellinger <nab@linux-iscsi.org>2014-12-01 21:36:21 -0800
commit506787a2c7daed45f0a213674ca706cbc83a9089 (patch)
treed8734240e8977854cc1845d7fa173d76bc3d923c /drivers/target/loopback/tcm_loop.h
parent4b2f57e5ced40e91cbf8886d7dc40a9474d2f5c0 (diff)
tcm_loop: Fix wrong I_T nexus association
tcm_loop has the I_T nexus associated with the HBA. This causes commands to become misdirected if the HBA has more than one target portal group; any command is then being sent to the first target portal group instead of the correct one. The nexus needs to be associated with the target portal group instead. Signed-off-by: Hannes Reinecke <hare@suse.de> Cc: <stable@vger.kernel.org> # 3.0+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/loopback/tcm_loop.h')
-rw-r--r--drivers/target/loopback/tcm_loop.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/target/loopback/tcm_loop.h b/drivers/target/loopback/tcm_loop.h
index 54c59d0b6608..6ae49f272ba6 100644
--- a/drivers/target/loopback/tcm_loop.h
+++ b/drivers/target/loopback/tcm_loop.h
@@ -27,11 +27,6 @@ struct tcm_loop_tmr {
};
struct tcm_loop_nexus {
- int it_nexus_active;
- /*
- * Pointer to Linux/SCSI HBA from linux/include/scsi_host.h
- */
- struct scsi_host *sh;
/*
* Pointer to TCM session for I_T Nexus
*/
@@ -51,6 +46,7 @@ struct tcm_loop_tpg {
atomic_t tl_tpg_port_count;
struct se_portal_group tl_se_tpg;
struct tcm_loop_hba *tl_hba;
+ struct tcm_loop_nexus *tl_nexus;
};
struct tcm_loop_hba {
@@ -59,7 +55,6 @@ struct tcm_loop_hba {
struct se_hba_s *se_hba;
struct se_lun *tl_hba_lun;
struct se_port *tl_hba_lun_sep;
- struct tcm_loop_nexus *tl_nexus;
struct device dev;
struct Scsi_Host *sh;
struct tcm_loop_tpg tl_hba_tpgs[TL_TPGS_PER_HBA];