Version: 1
-Previous: 163118c3c0a75dac53e71383a9ba38abf86c1e7c
-Head: 61bdcb8ec9ed117adccafc12870ed5eee0f04dae
+Previous: d5870f7cc0da6fbc88f5ad4c43111f9246931abf
+Head: 3adebc52bfcb7835bf6c3f0885a611365e536386
Applied:
autoaddr: f7b588cb0a484c2a15c5bd81ef101c815bd992ee
addr_open: 5eb3d268fe35400cda8069a63415d51a035e5797
- open_dev: 3bc9c3af5aeca3a5b8366bdc5f040ca61a4b1d25
- refresh-temp: 61bdcb8ec9ed117adccafc12870ed5eee0f04dae
+ open_dev: 3adebc52bfcb7835bf6c3f0885a611365e536386
Unapplied:
async_mc: c51c6e84981821b2541daba97cee9a29cd1d3709
addr_size: 8de02c47fbf595132105a7050ad6f755f49f9a7a
Bottom: 4ab29560f27d5a7097e5210fa3315e024bf134a3
-Top: 4ab29560f27d5a7097e5210fa3315e024bf134a3
+Top: b9b25b60f3a7d69a05d63b0462a5835ba8da08d3
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2011-01-20 13:26:26 -0800
---
-
+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;
+ }
+++ /dev/null
-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;
- }