]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/ulp/iser/iscsi_iser.c
Merge branch 'linus' into x86/amd-iommu
[linux-2.6-omap-h63xx.git] / drivers / infiniband / ulp / iser / iscsi_iser.c
index 42e95b833092c3d2c95dd7b8fe27df1d4a93ca46..5a1cf2580e16a3dd45517d9484986709e75bafeb 100644 (file)
@@ -42,9 +42,6 @@
  *     Zhenyu Wang
  * Modified by:
  *      Erez Zilber
- *
- *
- * $Id: iscsi_iser.c 6965 2006-05-07 11:36:20Z ogerlitz $
  */
 
 #include <linux/types.h>
@@ -281,9 +278,6 @@ iscsi_iser_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
        conn->max_recv_dlength = 128;
 
        iser_conn = conn->dd_data;
-       /* currently this is the only field which need to be initiated */
-       rwlock_init(&iser_conn->lock);
-
        conn->dd_data = iser_conn;
        iser_conn->iscsi_conn = conn;
 
@@ -342,9 +336,6 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session,
        ib_conn->iser_conn = iser_conn;
        iser_conn->ib_conn  = ib_conn;
        iser_conn_get(ib_conn);
-
-       conn->recv_lock = &iser_conn->lock;
-
        return 0;
 }
 
@@ -355,12 +346,18 @@ iscsi_iser_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
        struct iscsi_iser_conn *iser_conn = conn->dd_data;
        struct iser_conn *ib_conn = iser_conn->ib_conn;
 
-       iscsi_conn_stop(cls_conn, flag);
        /*
-        * There is no unbind event so the stop callback
-        * must release the ref from the bind.
+        * Userspace may have goofed up and not bound the connection or
+        * might have only partially setup the connection.
         */
-       iser_conn_put(ib_conn);
+       if (ib_conn) {
+               iscsi_conn_stop(cls_conn, flag);
+               /*
+                * There is no unbind event so the stop callback
+                * must release the ref from the bind.
+                */
+               iser_conn_put(ib_conn);
+       }
        iser_conn->ib_conn = NULL;
 }
 
@@ -595,7 +592,6 @@ static struct scsi_host_template iscsi_iser_sht = {
        .name                   = "iSCSI Initiator over iSER, v." DRV_VER,
        .queuecommand           = iscsi_queuecommand,
        .change_queue_depth     = iscsi_change_queue_depth,
-       .can_queue              = ISCSI_DEF_XMIT_CMDS_MAX - 1,
        .sg_tablesize           = ISCSI_ISER_SG_TABLESIZE,
        .max_sectors            = 1024,
        .cmd_per_lun            = ISCSI_MAX_CMD_PER_LUN,
@@ -629,7 +625,8 @@ static struct iscsi_transport iscsi_iser_transport = {
                                  ISCSI_USERNAME | ISCSI_PASSWORD |
                                  ISCSI_USERNAME_IN | ISCSI_PASSWORD_IN |
                                  ISCSI_FAST_ABORT | ISCSI_ABORT_TMO |
-                                 ISCSI_PING_TMO | ISCSI_RECV_TMO,
+                                 ISCSI_PING_TMO | ISCSI_RECV_TMO |
+                                 ISCSI_IFACE_NAME | ISCSI_INITIATOR_NAME,
        .host_param_mask        = ISCSI_HOST_HWADDRESS |
                                  ISCSI_HOST_NETDEV_NAME |
                                  ISCSI_HOST_INITIATOR_NAME,