summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-05-21 22:54:00 +0200
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 15:22:16 +0200
commita4804cd6eb19318ae8d08ea967cfeaaf5c5b68a6 (patch)
treea69acbfdf4e3646ebb7583f0627b7b7952d13b10 /drivers/infiniband
parent[SCSI] iscsi: remove session and host binding in libiscsi (diff)
downloadlinux-a4804cd6eb19318ae8d08ea967cfeaaf5c5b68a6.tar.xz
linux-a4804cd6eb19318ae8d08ea967cfeaaf5c5b68a6.zip
[SCSI] iscsi: add iscsi host helpers
This finishes the host/session unbinding, by adding some helpers to add and remove hosts and the session they manage. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 5a750042e2b2..62e35e503e49 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -371,10 +371,8 @@ static void iscsi_iser_session_destroy(struct iscsi_cls_session *cls_session)
{
struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
- iscsi_session_teardown(cls_session);
- scsi_remove_host(shost);
- iscsi_host_teardown(shost);
- scsi_host_put(shost);
+ iscsi_host_remove(shost);
+ iscsi_host_free(shost);
}
static struct iscsi_cls_session *
@@ -396,7 +394,7 @@ iscsi_iser_session_create(struct Scsi_Host *shost,
return NULL;
}
- shost = scsi_host_alloc(&iscsi_iser_sht, 0);
+ shost = iscsi_host_alloc(&iscsi_iser_sht, 0, ISCSI_MAX_CMD_PER_LUN);
if (!shost)
return NULL;
shost->transportt = iscsi_iser_scsi_transport;
@@ -405,9 +403,7 @@ iscsi_iser_session_create(struct Scsi_Host *shost,
shost->max_channel = 0;
shost->max_cmd_len = 16;
- iscsi_host_setup(shost, qdepth);
-
- if (scsi_add_host(shost, NULL))
+ if (iscsi_host_add(shost, NULL))
goto free_host;
*hostno = shost->host_no;
@@ -443,10 +439,9 @@ iscsi_iser_session_create(struct Scsi_Host *shost,
return cls_session;
remove_host:
- scsi_remove_host(shost);
+ iscsi_host_remove(shost);
free_host:
- iscsi_host_teardown(shost);
- scsi_host_put(shost);
+ iscsi_host_free(shost);
return NULL;
}