aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-05-21 16:54:12 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:20 -0400
commit7970634b81a6e3561954517bca42615542c4535b (patch)
treee8a6aea24c5db8c1198173b75945746333cdbd4d /drivers/scsi/libiscsi.c
parent2261ec3d686e35c1a6088ab7f00a1d02b528b994 (diff)
[SCSI] iscsi class: user device_for_each_child instead of duplicating session list
Currently we duplicate the list of sessions, because we were using the test for if a session was on the host list to indicate if the session was bound or unbound. We can instead use the target_id and fix up the class so that drivers like bnx2i do not have to manage the target id space. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 92ee6d94aaf9..e88b726ab2e0 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1897,7 +1897,7 @@ EXPORT_SYMBOL_GPL(iscsi_host_free);
1897struct iscsi_cls_session * 1897struct iscsi_cls_session *
1898iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost, 1898iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost,
1899 uint16_t scsi_cmds_max, int cmd_task_size, 1899 uint16_t scsi_cmds_max, int cmd_task_size,
1900 uint32_t initial_cmdsn) 1900 uint32_t initial_cmdsn, unsigned int id)
1901{ 1901{
1902 struct iscsi_session *session; 1902 struct iscsi_session *session;
1903 struct iscsi_cls_session *cls_session; 1903 struct iscsi_cls_session *cls_session;
@@ -1957,7 +1957,7 @@ iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost,
1957 if (!try_module_get(iscsit->owner)) 1957 if (!try_module_get(iscsit->owner))
1958 goto module_get_fail; 1958 goto module_get_fail;
1959 1959
1960 if (iscsi_add_session(cls_session, 0)) 1960 if (iscsi_add_session(cls_session, id))
1961 goto cls_session_fail; 1961 goto cls_session_fail;
1962 return cls_session; 1962 return cls_session;
1963 1963