From c86e491ada1dc2942abf4fcd9826609d35693188 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Fri, 4 Mar 2011 11:03:42 -0800 Subject: [PATCH] refresh --- meta | 7 +++---- patches/port_down | 20 +++++++++++++++----- patches/refresh-temp | 34 ---------------------------------- 3 files changed, 18 insertions(+), 43 deletions(-) delete mode 100644 patches/refresh-temp diff --git a/meta b/meta index 79815ad..a4bef9c 100644 --- a/meta +++ b/meta @@ -1,6 +1,6 @@ Version: 1 -Previous: 712e6a054225013492ad626c1116b90c40cbde9a -Head: f05095ccdd7d18e4b40f50eac8bc42d61beff06e +Previous: 8419406e38a8189a52d23090d24e0e2997ee918e +Head: 3ca40fdbdc57839ee3ee0e18bfd116023db2dba4 Applied: addr_open: 1fd2bfd86e2e2fe78f9d5d6d39aa5502938923f0 open_dev: 4687a6571146acd8d9a1553a96e2e4f7e8318761 @@ -8,8 +8,7 @@ Applied: sm_lid: eb7c2092cc0a44cf84428c536c9dd65da97b8069 sm_lid_get: dc8017769d3dfcbd85ae7ec037c871ac476a4c2d port_up: 1af4666bab8720dd46666a4c13bd93f6dcc1bd1a - port_down: baacfca673d2ca7920d84b0a4a476fc3aa117cc4 - refresh-temp: f05095ccdd7d18e4b40f50eac8bc42d61beff06e + port_down: 3ca40fdbdc57839ee3ee0e18bfd116023db2dba4 Unapplied: autoaddr: 36281f18de15f2482e21ae1304f2e34e9ecf187d async_mc: c51c6e84981821b2541daba97cee9a29cd1d3709 diff --git a/patches/port_down b/patches/port_down index f83747c..d434d67 100644 --- a/patches/port_down +++ b/patches/port_down @@ -1,5 +1,5 @@ Bottom: 01085cac91eb836b6602afd4fa2a60476e32c6ae -Top: 4762755ecc0b080ab2590bb531679dec7f4fd0b6 +Top: e6727799cbccd7777cacc86283b2358e20e53cd0 Author: Sean Hefty Date: 2011-02-23 14:41:48 -0800 @@ -14,7 +14,7 @@ Signed-off-by: Sean Hefty --- diff --git a/src/acm.c b/src/acm.c -index 5040159..222bcad 100644 +index 5040159..0da6c4c 100644 --- a/src/acm.c +++ b/src/acm.c @@ -378,6 +378,27 @@ acm_acquire_dest(struct acm_ep *ep, uint8_t addr_type, uint8_t *addr) @@ -102,15 +102,14 @@ index 5040159..222bcad 100644 for (i = 0; i < port->pkey_cnt; i++) acm_ep_up(port, (uint16_t) i); -@@ -2702,6 +2742,32 @@ static void acm_port_up(struct acm_port *port) +@@ -2702,6 +2742,31 @@ static void acm_port_up(struct acm_port *port) port->state = IBV_PORT_ACTIVE; } +static void acm_port_down(struct acm_port *port) +{ + struct ibv_port_attr attr; -+ union ibv_gid gid; -+ int i, ret; ++ int ret; + + acm_log(1, "%s %d\n", port->dev->verbs->device->name, port->port_num); + ret = ibv_query_port(port->dev->verbs, port->port_num, &attr); @@ -135,3 +134,14 @@ index 5040159..222bcad 100644 /* * There is one event handler thread per device. This is the only thread that * modifies the port state or a port endpoint list. Other threads which access +@@ -2730,6 +2795,10 @@ static void CDECL_FUNC acm_event_handler(void *context) + if (dev->port[i].state != IBV_PORT_ACTIVE) + acm_port_up(&dev->port[i]); + break; ++ case IBV_EVENT_PORT_ERR: ++ if (dev->port[i].state == IBV_PORT_ACTIVE) ++ acm_port_down(&dev->port[i]); ++ break; + default: + break; + } diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index b538199..0000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,34 +0,0 @@ -Bottom: 4762755ecc0b080ab2590bb531679dec7f4fd0b6 -Top: e6727799cbccd7777cacc86283b2358e20e53cd0 -Author: Sean Hefty -Date: 2011-03-04 11:03:42 -0800 - -Refresh of port_down - ---- - -diff --git a/src/acm.c b/src/acm.c -index 222bcad..0da6c4c 100644 ---- a/src/acm.c -+++ b/src/acm.c -@@ -2745,8 +2745,7 @@ static void acm_port_up(struct acm_port *port) - static void acm_port_down(struct acm_port *port) - { - struct ibv_port_attr attr; -- union ibv_gid gid; -- int i, ret; -+ int ret; - - acm_log(1, "%s %d\n", port->dev->verbs->device->name, port->port_num); - ret = ibv_query_port(port->dev->verbs, port->port_num, &attr); -@@ -2796,6 +2795,10 @@ static void CDECL_FUNC acm_event_handler(void *context) - if (dev->port[i].state != IBV_PORT_ACTIVE) - acm_port_up(&dev->port[i]); - break; -+ case IBV_EVENT_PORT_ERR: -+ if (dev->port[i].state == IBV_PORT_ACTIVE) -+ acm_port_down(&dev->port[i]); -+ break; - default: - break; - } -- 2.46.0