]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] iscsi class: remove host no argument from session creation callout
authorMike Christie <michaelc@cs.wisc.edu>
Thu, 5 Mar 2009 20:46:06 +0000 (14:46 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 13 Mar 2009 20:29:39 +0000 (15:29 -0500)
We do not need to have llds set the host no for the session's
parent, because we know the session's parent is going to be
the host. This removes it from the session creation callback
and converts the drivers.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/infiniband/ulp/iser/iscsi_iser.c
drivers/scsi/cxgb3i/cxgb3i_iscsi.c
drivers/scsi/iscsi_tcp.c
drivers/scsi/scsi_transport_iscsi.c
include/scsi/scsi_transport_iscsi.h

index 6c61ed12f29993a57a83430cddf92f9932e97e78..13d7674b293d44e64b920cd0d5ed84fb89c35820 100644 (file)
@@ -397,7 +397,7 @@ static void iscsi_iser_session_destroy(struct iscsi_cls_session *cls_session)
 static struct iscsi_cls_session *
 iscsi_iser_session_create(struct iscsi_endpoint *ep,
                          uint16_t cmds_max, uint16_t qdepth,
-                         uint32_t initial_cmdsn, uint32_t *hostno)
+                         uint32_t initial_cmdsn)
 {
        struct iscsi_cls_session *cls_session;
        struct iscsi_session *session;
@@ -423,7 +423,6 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,
        if (iscsi_host_add(shost,
                           ep ? ib_conn->device->ib_device->dma_device : NULL))
                goto free_host;
-       *hostno = shost->host_no;
 
        /*
         * we do not support setting can_queue cmd_per_lun from userspace yet
index 307f55e329f587ac7756c1c58ca6161651ae5bfb..ae4a93090725811a2aedcaebda854316466499dc 100644 (file)
@@ -334,13 +334,12 @@ static void cxgb3i_ep_disconnect(struct iscsi_endpoint *ep)
  * @cmds_max:          max # of commands
  * @qdepth:            scsi queue depth
  * @initial_cmdsn:     initial iscsi CMDSN for this session
- * @host_no:           pointer to return host no
  *
  * Creates a new iSCSI session
  */
 static struct iscsi_cls_session *
 cxgb3i_session_create(struct iscsi_endpoint *ep, u16 cmds_max, u16 qdepth,
-                     u32 initial_cmdsn, u32 *host_no)
+                     u32 initial_cmdsn)
 {
        struct cxgb3i_endpoint *cep;
        struct cxgb3i_hba *hba;
@@ -359,8 +358,6 @@ cxgb3i_session_create(struct iscsi_endpoint *ep, u16 cmds_max, u16 qdepth,
        cxgb3i_api_debug("ep 0x%p, cep 0x%p, hba 0x%p.\n", ep, cep, hba);
        BUG_ON(hba != iscsi_host_priv(shost));
 
-       *host_no = shost->host_no;
-
        cls_session = iscsi_session_setup(&cxgb3i_iscsi_transport, shost,
                                          cmds_max,
                                          sizeof(struct iscsi_tcp_task) +
index ad8676c98c68f26bd9b32539f1003c657ce4e336..b3e5e08e44ab3848b3dff1ccaaa0ccb36eb3dba0 100644 (file)
@@ -765,8 +765,7 @@ iscsi_sw_tcp_conn_get_stats(struct iscsi_cls_conn *cls_conn,
 
 static struct iscsi_cls_session *
 iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max,
-                           uint16_t qdepth, uint32_t initial_cmdsn,
-                           uint32_t *hostno)
+                           uint16_t qdepth, uint32_t initial_cmdsn)
 {
        struct iscsi_cls_session *cls_session;
        struct iscsi_session *session;
@@ -789,7 +788,6 @@ iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max,
 
        if (iscsi_host_add(shost, NULL))
                goto free_host;
-       *hostno = shost->host_no;
 
        cls_session = iscsi_session_setup(&iscsi_sw_tcp_transport, shost,
                                          cmds_max,
index 4f22f9e37c5aa99423df40efba241a6a720ff969..2340e2c5c02178452ce79e4fe93ab76a6e86068e 100644 (file)
@@ -1197,14 +1197,15 @@ iscsi_if_create_session(struct iscsi_internal *priv, struct iscsi_endpoint *ep,
 {
        struct iscsi_transport *transport = priv->iscsi_transport;
        struct iscsi_cls_session *session;
-       uint32_t host_no;
+       struct Scsi_Host *shost;
 
        session = transport->create_session(ep, cmds_max, queue_depth,
-                                           initial_cmdsn, &host_no);
+                                           initial_cmdsn);
        if (!session)
                return -ENOMEM;
 
-       ev->r.c_session_ret.host_no = host_no;
+       shost = iscsi_session_to_shost(session);
+       ev->r.c_session_ret.host_no = shost->host_no;
        ev->r.c_session_ret.sid = session->sid;
        return 0;
 }
index ac29fbd3554481313e0aa8aea2d69cb84f3e7d2d..457588e1119bd4cf3c429ffe6cea6aa8ded3deff 100644 (file)
@@ -88,7 +88,7 @@ struct iscsi_transport {
        uint64_t host_param_mask;
        struct iscsi_cls_session *(*create_session) (struct iscsi_endpoint *ep,
                                        uint16_t cmds_max, uint16_t qdepth,
-                                       uint32_t sn, uint32_t *hn);
+                                       uint32_t sn);
        void (*destroy_session) (struct iscsi_cls_session *session);
        struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess,
                                uint32_t cid);