svn commit: r273753 - head/sys/dev/cxgbe/iw_cxgbe
Navdeep Parhar
np at FreeBSD.org
Mon Oct 27 23:11:49 UTC 2014
Author: np
Date: Mon Oct 27 23:11:48 2014
New Revision: 273753
URL: https://svnweb.freebsd.org/changeset/base/273753
Log:
iwcm_event status needs to be populated for close_complete_upcall
Submitted by: Hariprasad at Chelsio dot com
Sponsored by: Chelsio Communications
Modified:
head/sys/dev/cxgbe/iw_cxgbe/cm.c
Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c
==============================================================================
--- head/sys/dev/cxgbe/iw_cxgbe/cm.c Mon Oct 27 23:03:17 2014 (r273752)
+++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Mon Oct 27 23:11:48 2014 (r273753)
@@ -94,7 +94,7 @@ static void abort_socket(struct c4iw_ep
static void send_mpa_req(struct c4iw_ep *ep);
static int send_mpa_reject(struct c4iw_ep *ep, const void *pdata, u8 plen);
static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen);
-static void close_complete_upcall(struct c4iw_ep *ep);
+static void close_complete_upcall(struct c4iw_ep *ep, int status);
static int abort_connection(struct c4iw_ep *ep);
static void peer_close_upcall(struct c4iw_ep *ep);
static void peer_abort_upcall(struct c4iw_ep *ep);
@@ -366,7 +366,7 @@ process_peer_close(struct c4iw_ep *ep)
C4IW_QP_ATTR_NEXT_STATE, &attrs, 1);
}
close_socket(&ep->com, 0);
- close_complete_upcall(ep);
+ close_complete_upcall(ep, 0);
__state_set(&ep->com, DEAD);
release = 1;
disconnect = 0;
@@ -528,7 +528,7 @@ process_close_complete(struct c4iw_ep *e
CTR2(KTR_IW_CXGBE, "%s:pcc4 %p", __func__, ep);
close_socket(&ep->com, 0);
}
- close_complete_upcall(ep);
+ close_complete_upcall(ep, 0);
__state_set(&ep->com, DEAD);
release = 1;
break;
@@ -1192,13 +1192,14 @@ static int send_mpa_reply(struct c4iw_ep
-static void close_complete_upcall(struct c4iw_ep *ep)
+static void close_complete_upcall(struct c4iw_ep *ep, int status)
{
struct iw_cm_event event;
CTR2(KTR_IW_CXGBE, "%s:ccuB %p", __func__, ep);
memset(&event, 0, sizeof(event));
event.event = IW_CM_EVENT_CLOSE;
+ event.status = status;
if (ep->com.cm_id) {
@@ -1217,7 +1218,7 @@ static int abort_connection(struct c4iw_
int err;
CTR2(KTR_IW_CXGBE, "%s:abB %p", __func__, ep);
- close_complete_upcall(ep);
+ close_complete_upcall(ep, -ECONNRESET);
state_set(&ep->com, ABORTING);
abort_socket(ep);
err = close_socket(&ep->com, 0);
@@ -2212,7 +2213,7 @@ int c4iw_ep_disconnect(struct c4iw_ep *e
CTR2(KTR_IW_CXGBE, "%s:ced1 %p", __func__, ep);
fatal = 1;
- close_complete_upcall(ep);
+ close_complete_upcall(ep, -EIO);
ep->com.state = DEAD;
}
CTR3(KTR_IW_CXGBE, "%s:ced2 %p %s", __func__, ep,
More information about the svn-src-all
mailing list