struct rpcrdma_ia *ia = &r_xprt->rx_ia;
struct rpcrdma_ep *ep = &r_xprt->rx_ep;
struct rpc_xprt *xprt = &r_xprt->rx_xprt;
- int connstate = 0;
might_sleep();
return 1;
case RDMA_CM_EVENT_ESTABLISHED:
++xprt->connect_cookie;
- connstate = 1;
+ ep->rep_connected = 1;
rpcrdma_update_connect_private(r_xprt, &event->param.conn);
goto connected;
case RDMA_CM_EVENT_CONNECT_ERROR:
- connstate = -ENOTCONN;
+ ep->rep_connected = -ENOTCONN;
goto connected;
case RDMA_CM_EVENT_UNREACHABLE:
- connstate = -ENETUNREACH;
+ ep->rep_connected = -ENETUNREACH;
goto connected;
case RDMA_CM_EVENT_REJECTED:
dprintk("rpcrdma: connection to %s:%s rejected: %s\n",
rpcrdma_addrstr(r_xprt), rpcrdma_portstr(r_xprt),
rdma_reject_msg(id, event->status));
- connstate = -ECONNREFUSED;
+ ep->rep_connected = -ECONNREFUSED;
if (event->status == IB_CM_REJ_STALE_CONN)
- connstate = -EAGAIN;
+ ep->rep_connected = -EAGAIN;
goto connected;
case RDMA_CM_EVENT_DISCONNECTED:
++xprt->connect_cookie;
- connstate = -ECONNABORTED;
+ ep->rep_connected = -ECONNABORTED;
connected:
- ep->rep_connected = connstate;
rpcrdma_conn_func(ep);
wake_up_all(&ep->rep_connect_wait);
/*FALLTHROUGH*/