]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Thu, 20 Jan 2011 23:17:20 +0000 (15:17 -0800)
committerSean Hefty <sean.hefty@intel.com>
Thu, 20 Jan 2011 23:17:20 +0000 (15:17 -0800)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 5ed2506b18441ff87b9d2b01ec829e597ba81848..52e3919c67f41046ced9311a81f72fde3c412971 100644 (file)
--- a/meta
+++ b/meta
@@ -1,10 +1,11 @@
 Version: 1
-Previous: f29c5c6ed3dbb184f75ff146f27aefcbf4fd962e
-Head: 3bc9c3af5aeca3a5b8366bdc5f040ca61a4b1d25
+Previous: 163118c3c0a75dac53e71383a9ba38abf86c1e7c
+Head: 61bdcb8ec9ed117adccafc12870ed5eee0f04dae
 Applied:
   autoaddr: f7b588cb0a484c2a15c5bd81ef101c815bd992ee
   addr_open: 5eb3d268fe35400cda8069a63415d51a035e5797
   open_dev: 3bc9c3af5aeca3a5b8366bdc5f040ca61a4b1d25
+  refresh-temp: 61bdcb8ec9ed117adccafc12870ed5eee0f04dae
 Unapplied:
   async_mc: c51c6e84981821b2541daba97cee9a29cd1d3709
   addr_size: 8de02c47fbf595132105a7050ad6f755f49f9a7a
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..65d8ca2
--- /dev/null
@@ -0,0 +1,87 @@
+Bottom: 4ab29560f27d5a7097e5210fa3315e024bf134a3
+Top:    b9b25b60f3a7d69a05d63b0462a5835ba8da08d3
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2011-01-20 15:17:20 -0800
+
+Refresh of open_dev
+
+---
+
+diff --git a/src/acm.c b/src/acm.c
+index 5f58cf0..cacd469 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -123,7 +123,6 @@ struct acm_device
+       struct ibv_pd           *pd;
+       uint64_t                guid;
+       DLIST_ENTRY             entry;
+-      uint8_t                 active;
+       int                     port_cnt;
+       struct acm_port         port[0];
+ };
+@@ -2647,7 +2646,6 @@ err2:
+       ibv_destroy_ah(port->sa_dest.ah);
+ err1:
+       port->state = IBV_PORT_NOP;
+-      port->dev->active--;
+ }
+ static int acm_activate_dev(struct acm_device *dev)
+@@ -2662,7 +2660,7 @@ static int acm_activate_dev(struct acm_device *dev)
+       dev->channel = ibv_create_comp_channel(dev->verbs);
+       if (!dev->channel) {
+               acm_log(0, "ERROR - unable to create comp channel\n");
+-              goto err1;
++              goto err;
+       }
+       for (i = 0; i < dev->port_cnt; i++) {
+@@ -2671,16 +2669,11 @@ static int acm_activate_dev(struct acm_device *dev)
+                       acm_activate_port(&dev->port[i]);
+       }
+-      if (!dev->active)
+-              goto err2;
+-
+       acm_log(1, "starting completion thread\n");
+       beginthread(acm_comp_handler, dev);
+       return 0;
+-err2:
+-      ibv_destroy_comp_channel(dev->channel);
+-err1:
++err:
+       ibv_dealloc_pd(dev->pd);
+       return -1;
+ }
+@@ -2724,9 +2717,6 @@ static void acm_init_port(struct acm_port *port)
+       port->sa_dest.av.sl = attr.sm_sl;
+       port->sa_dest.av.port_num = port->port_num;
+       port->sa_dest.remote_qpn = 1;
+-
+-      if (port->state == IBV_PORT_ACTIVE)
+-              port->dev->active++;
+ }
+ static void acm_open_dev(struct ibv_device *ibdev)
+@@ -2765,10 +2755,10 @@ static void acm_open_dev(struct ibv_device *ibdev)
+               acm_init_port(&dev->port[i]);
+       }
+-      if (!dev->active || acm_activate_dev(dev))
++      if (acm_activate_dev(dev))
+               goto err2;
+-      acm_log(1, "%s now active\n", ibdev->name);
++      acm_log(1, "%s opened\n", ibdev->name);
+       DListInsertHead(&dev->entry, &dev_list);
+       return;
+@@ -2992,7 +2982,7 @@ int CDECL_FUNC main(int argc, char **argv)
+       ibv_free_device_list(ibdev);
+       if (DListEmpty(&dev_list)) {
+-              acm_log(0, "ERROR - no active devices\n");
++              acm_log(0, "ERROR - no devices\n");
+               return -1;
+       }