1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

iwcm_event status needs to be populated for close_complete_upcall

Submitted by:	Hariprasad at Chelsio dot com
Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2014-10-27 23:11:48 +00:00
parent 55edfde154
commit 3030c8bce9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273753

View File

@ -94,7 +94,7 @@ static void abort_socket(struct c4iw_ep *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 *ep)
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 *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)
{
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_ep *ep)
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 *ep, int abrupt, gfp_t gfp)
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,