Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / drivers / infiniband / ulp / iser / iser_verbs.c
index 2044de1..714b8db 100644 (file)
@@ -32,7 +32,6 @@
  *
  * $Id: iser_verbs.c 7051 2006-05-10 12:29:11Z ogerlitz $
  */
-#include <asm/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/delay.h>
@@ -106,7 +105,7 @@ pd_err:
 }
 
 /**
- * iser_free_device_ib_res - destory/dealloc/dereg the DMA MR,
+ * iser_free_device_ib_res - destroy/dealloc/dereg the DMA MR,
  * CQ and PD created with the device associated with the adapator.
  */
 static void iser_free_device_ib_res(struct iser_device *device)
@@ -310,6 +309,29 @@ static int iser_conn_state_comp_exch(struct iser_conn *ib_conn,
        return ret;
 }
 
+/**
+ * Frees all conn objects and deallocs conn descriptor
+ */
+static void iser_conn_release(struct iser_conn *ib_conn)
+{
+       struct iser_device  *device = ib_conn->device;
+
+       BUG_ON(ib_conn->state != ISER_CONN_DOWN);
+
+       mutex_lock(&ig.connlist_mutex);
+       list_del(&ib_conn->conn_list);
+       mutex_unlock(&ig.connlist_mutex);
+
+       iser_free_ib_conn_res(ib_conn);
+       ib_conn->device = NULL;
+       /* on EVENT_ADDR_ERROR there's no device yet for this conn */
+       if (device != NULL)
+               iser_device_try_release(device);
+       if (ib_conn->iser_conn)
+               ib_conn->iser_conn->ib_conn = NULL;
+       kfree(ib_conn);
+}
+
 /**
  * triggers start of the disconnect procedures and wait for them to be done
  */
@@ -453,13 +475,11 @@ static int iser_cma_handler(struct rdma_cm_id *cma_id, struct rdma_cm_event *eve
                iser_disconnected_handler(cma_id);
                break;
        case RDMA_CM_EVENT_DEVICE_REMOVAL:
+               iser_err("Device removal is currently unsupported\n");
                BUG();
                break;
-       case RDMA_CM_EVENT_CONNECT_RESPONSE:
-               BUG();
-               break;
-       case RDMA_CM_EVENT_CONNECT_REQUEST:
        default:
+               iser_err("Unexpected RDMA CM event (%d)\n", event->event);
                break;
        }
        return ret;
@@ -549,30 +569,6 @@ connect_failure:
        return err;
 }
 
-/**
- * Frees all conn objects and deallocs conn descriptor
- */
-void iser_conn_release(struct iser_conn *ib_conn)
-{
-       struct iser_device  *device = ib_conn->device;
-
-       BUG_ON(ib_conn->state != ISER_CONN_DOWN);
-
-       mutex_lock(&ig.connlist_mutex);
-       list_del(&ib_conn->conn_list);
-       mutex_unlock(&ig.connlist_mutex);
-
-       iser_free_ib_conn_res(ib_conn);
-       ib_conn->device = NULL;
-       /* on EVENT_ADDR_ERROR there's no device yet for this conn */
-       if (device != NULL)
-               iser_device_try_release(device);
-       if (ib_conn->iser_conn)
-               ib_conn->iser_conn->ib_conn = NULL;
-       kfree(ib_conn);
-}
-
-
 /**
  * iser_reg_page_vec - Register physical memory
  *