Version: 1
-Previous: b55a05981ac2af8b3d6ded8c7242d93ac939f329
-Head: 23476de2344ea8621ce5e627bd48854459a5027f
+Previous: 0366cbdba22ae09de9b6c8e00d7bec953e15cdf8
+Head: 0bcda24396c5fb7eca0a5065f3f643b04d3d1ad6
Applied:
addr_open: 1fd2bfd86e2e2fe78f9d5d6d39aa5502938923f0
open_dev: 4687a6571146acd8d9a1553a96e2e4f7e8318761
ep_active: 77fc3b61749ca5785e28bf487a5df84189466ecb
sm_lid: eb7c2092cc0a44cf84428c536c9dd65da97b8069
sm_lid_get: dc8017769d3dfcbd85ae7ec037c871ac476a4c2d
- port_up: e0428c7bc9e76f22a771e1c770fd9f05c10792fc
- refresh-temp: 23476de2344ea8621ce5e627bd48854459a5027f
+ port_up: 0bcda24396c5fb7eca0a5065f3f643b04d3d1ad6
Unapplied:
port_down: 8208380a044b1c2c1fc5c7a9732169b8a5e42430
autoaddr: 36281f18de15f2482e21ae1304f2e34e9ecf187d
Bottom: 74ae0221f2792e6abb76fa789cd3beb3d720e95b
-Top: 97be99963c4e96b8d2169a2de8d6113a0f70dc91
+Top: 4381f9bcb469126f7e5da7ce921c1e4ce6a1608c
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2011-02-22 10:26:01 -0800
---
diff --git a/src/acm.c b/src/acm.c
-index 3590c16..551c291 100644
+index 3590c16..3f4c6a1 100644
--- a/src/acm.c
+++ b/src/acm.c
-@@ -2499,14 +2499,35 @@ static int acm_init_ep_loopback(struct acm_ep *ep)
+@@ -2499,14 +2499,36 @@ static int acm_init_ep_loopback(struct acm_ep *ep)
return 0;
}
+static struct acm_alloc_ep(struct acm_port *port, uint16_t pkey, uint16_t pkey_index)
+{
+ struct acm_ep *ep;
-+
+
+ acm_log(1, "\n");
+ ep = calloc(1, sizeof *ep);
+ if (!ep)
+ return NULL;
-
-- acm_log(1, "\n");
++
ep->port = port;
+ ep->pkey = pkey;
ep->pkey_index = pkey_index;
ep->resolve_queue.credits = resolve_depth;
ep->sa_queue.credits = sa_depth;
-@@ -2517,15 +2538,33 @@ static int acm_ep_up(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_ind
+@@ -2517,15 +2539,33 @@ static int acm_ep_up(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_ind
DListInit(&ep->active_queue);
DListInit(&ep->wait_queue);
lock_init(&ep->lock);
}
sq_size = resolve_depth + sa_depth + send_depth;
-@@ -2533,7 +2572,7 @@ static int acm_ep_up(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_ind
+@@ -2533,7 +2573,7 @@ static int acm_ep_up(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_ind
ep, port->dev->channel, 0);
if (!ep->cq) {
acm_log(0, "ERROR - failed to create CQ\n");
}
ret = ibv_req_notify_cq(ep->cq, 0);
-@@ -2593,13 +2632,17 @@ static int acm_ep_up(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_ind
+@@ -2593,13 +2633,17 @@ static int acm_ep_up(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_ind
acm_log(0, "ERROR - unable to init loopback\n");
goto err2;
}
}
static void acm_port_up(struct acm_port *port)
-@@ -2624,13 +2667,13 @@ static void acm_port_up(struct acm_port *port)
+@@ -2624,13 +2668,13 @@ static void acm_port_up(struct acm_port *port)
port->mtu = attr.active_mtu;
port->rate = acm_get_rate(attr.active_width, attr.active_speed);
port->subnet_timeout = 1 << (attr.subnet_timeout - 8);
ret = ibv_query_pkey(port->dev->verbs, port->port_num, port->pkey_cnt, &pkey);
if (ret || !pkey)
break;
-@@ -2651,20 +2694,8 @@ static void acm_port_up(struct acm_port *port)
+@@ -2651,20 +2695,8 @@ static void acm_port_up(struct acm_port *port)
if (!port->sa_dest.ah)
return;
acm_port_join(port);
lock_acquire(&port->lock);
-@@ -2681,13 +2712,31 @@ static void acm_port_up(struct acm_port *port)
+@@ -2681,13 +2713,31 @@ static void acm_port_up(struct acm_port *port)
static void CDECL_FUNC acm_event_handler(void *context)
{
struct acm_device *dev = (struct acm_device *) context;