From: Sean Hefty <sean.hefty@intel.com>
Date: Fri, 29 Sep 2006 18:57:09 +0000 (-0700)
Subject: RDMA/cma: Set status correctly on route resolution error
X-Git-Tag: v2.6.19-rc1~369^2~5
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8f0472d331619d5d74927978d0dde5b4935e41a5;p=linux-2.6-omap-h63xx.git

RDMA/cma: Set status correctly on route resolution error

On reporting a route error, also include the status for the error,
rather than indicating a status of 0 when an error has occurred.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
---

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index f383a4f50ab..d10fdf1419b 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1308,6 +1308,7 @@ static void cma_query_handler(int status, struct ib_sa_path_rec *path_rec,
 		work->old_state = CMA_ROUTE_QUERY;
 		work->new_state = CMA_ADDR_RESOLVED;
 		work->event.event = RDMA_CM_EVENT_ROUTE_ERROR;
+		work->event.status = status;
 	}
 
 	queue_work(cma_wq, &work->work);