[SCSI] iscsi: rm channel usage from iscsi
authorMike Christie <michaelc@cs.wisc.edu>
Wed, 28 Jun 2006 17:00:29 +0000 (12:00 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Thu, 29 Jun 2006 15:08:31 +0000 (11:08 -0400)
I do not remember what I was thinking when we added the channel
as a argument to the session create function. It was probably
due to too much cut and paste work from the FC transport class.

The channel is meaningless for iscsi drivers so this patch drops
its usage everywhere in the iscsi related code.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/libiscsi.c
drivers/scsi/scsi_transport_iscsi.c
include/scsi/scsi_transport_iscsi.h

index 7e6e031cc41bf0a09541d55bc6f6bb6f9850178c..499e79f0cac57dd808c2ba080ce6441bddad41fa 100644 (file)
@@ -1290,7 +1290,7 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
        if (!try_module_get(iscsit->owner))
                goto cls_session_fail;
 
-       cls_session = iscsi_create_session(shost, iscsit, 0);
+       cls_session = iscsi_create_session(shost, iscsit);
        if (!cls_session)
                goto module_put;
        *(unsigned long*)shost->hostdata = (unsigned long)cls_session;
index 8717ff51ba4b9c70dcb23e7636b087a3bfe59725..c0ec502835eea2647484b9b65539c0bc20e50c2b 100644 (file)
@@ -248,10 +248,9 @@ static int iscsi_user_scan(struct Scsi_Host *shost, uint channel,
 
        mutex_lock(&ihost->mutex);
        list_for_each_entry(session, &ihost->sessions, host_list) {
-               if ((channel == SCAN_WILD_CARD ||
-                    channel == session->channel) &&
+               if ((channel == SCAN_WILD_CARD || channel == 0) &&
                    (id == SCAN_WILD_CARD || id == session->target_id))
-                       scsi_scan_target(&session->dev, session->channel,
+                       scsi_scan_target(&session->dev, 0,
                                         session->target_id, lun, 1);
        }
        mutex_unlock(&ihost->mutex);
@@ -297,7 +296,7 @@ EXPORT_SYMBOL_GPL(iscsi_block_session);
  **/
 struct iscsi_cls_session *
 iscsi_create_session(struct Scsi_Host *shost,
-                    struct iscsi_transport *transport, int channel)
+                    struct iscsi_transport *transport)
 {
        struct iscsi_host *ihost;
        struct iscsi_cls_session *session;
@@ -322,7 +321,6 @@ iscsi_create_session(struct Scsi_Host *shost,
        ihost = shost->shost_data;
 
        session->sid = iscsi_session_nr++;
-       session->channel = channel;
        session->target_id = ihost->next_target_id++;
 
        snprintf(session->dev.bus_id, BUS_ID_SIZE, "session%u",
index 05397058a9b87d237aa8590346efb1d4ac4b5813..2e3cb37af04753094613f618cc4e1d86c45750b4 100644 (file)
@@ -187,7 +187,6 @@ struct iscsi_cls_session {
        struct work_struct recovery_work;
 
        int target_id;
-       int channel;
 
        int sid;                                /* session id */
        void *dd_data;                          /* LLD private data */
@@ -210,7 +209,7 @@ struct iscsi_host {
  * session and connection functions that can be used by HW iSCSI LLDs
  */
 extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
-                               struct iscsi_transport *t, int channel);
+                                               struct iscsi_transport *t);
 extern int iscsi_destroy_session(struct iscsi_cls_session *session);
 extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess,
                                            uint32_t cid);