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:
parent
d18c9c70cd
commit
8d27cd9437
@ -94,7 +94,7 @@ static void abort_socket(struct c4iw_ep *ep);
|
|||||||
static void send_mpa_req(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_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 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 int abort_connection(struct c4iw_ep *ep);
|
||||||
static void peer_close_upcall(struct c4iw_ep *ep);
|
static void peer_close_upcall(struct c4iw_ep *ep);
|
||||||
static void peer_abort_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);
|
C4IW_QP_ATTR_NEXT_STATE, &attrs, 1);
|
||||||
}
|
}
|
||||||
close_socket(&ep->com, 0);
|
close_socket(&ep->com, 0);
|
||||||
close_complete_upcall(ep);
|
close_complete_upcall(ep, 0);
|
||||||
__state_set(&ep->com, DEAD);
|
__state_set(&ep->com, DEAD);
|
||||||
release = 1;
|
release = 1;
|
||||||
disconnect = 0;
|
disconnect = 0;
|
||||||
@ -528,7 +528,7 @@ process_close_complete(struct c4iw_ep *ep)
|
|||||||
CTR2(KTR_IW_CXGBE, "%s:pcc4 %p", __func__, ep);
|
CTR2(KTR_IW_CXGBE, "%s:pcc4 %p", __func__, ep);
|
||||||
close_socket(&ep->com, 0);
|
close_socket(&ep->com, 0);
|
||||||
}
|
}
|
||||||
close_complete_upcall(ep);
|
close_complete_upcall(ep, 0);
|
||||||
__state_set(&ep->com, DEAD);
|
__state_set(&ep->com, DEAD);
|
||||||
release = 1;
|
release = 1;
|
||||||
break;
|
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;
|
struct iw_cm_event event;
|
||||||
|
|
||||||
CTR2(KTR_IW_CXGBE, "%s:ccuB %p", __func__, ep);
|
CTR2(KTR_IW_CXGBE, "%s:ccuB %p", __func__, ep);
|
||||||
memset(&event, 0, sizeof(event));
|
memset(&event, 0, sizeof(event));
|
||||||
event.event = IW_CM_EVENT_CLOSE;
|
event.event = IW_CM_EVENT_CLOSE;
|
||||||
|
event.status = status;
|
||||||
|
|
||||||
if (ep->com.cm_id) {
|
if (ep->com.cm_id) {
|
||||||
|
|
||||||
@ -1217,7 +1218,7 @@ static int abort_connection(struct c4iw_ep *ep)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
CTR2(KTR_IW_CXGBE, "%s:abB %p", __func__, ep);
|
CTR2(KTR_IW_CXGBE, "%s:abB %p", __func__, ep);
|
||||||
close_complete_upcall(ep);
|
close_complete_upcall(ep, -ECONNRESET);
|
||||||
state_set(&ep->com, ABORTING);
|
state_set(&ep->com, ABORTING);
|
||||||
abort_socket(ep);
|
abort_socket(ep);
|
||||||
err = close_socket(&ep->com, 0);
|
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);
|
CTR2(KTR_IW_CXGBE, "%s:ced1 %p", __func__, ep);
|
||||||
fatal = 1;
|
fatal = 1;
|
||||||
close_complete_upcall(ep);
|
close_complete_upcall(ep, -EIO);
|
||||||
ep->com.state = DEAD;
|
ep->com.state = DEAD;
|
||||||
}
|
}
|
||||||
CTR3(KTR_IW_CXGBE, "%s:ced2 %p %s", __func__, ep,
|
CTR3(KTR_IW_CXGBE, "%s:ced2 %p %s", __func__, ep,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user