The final patch will implement a non-blocking connect, which means SIW_CM_WORK_MPATIMEOUT can also happen during SIW_EPSTATE_CONNECTING. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Stefan Metzmacher <metze@xxxxxxxxx> Cc: Bernard Metzler <bmt@xxxxxxxxxxxxxx> Cc: linux-rdma@xxxxxxxxxxxxxxx --- drivers/infiniband/sw/siw/siw_cm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c index ed33533ff9e6..8e9f5ce5ce29 100644 --- a/drivers/infiniband/sw/siw/siw_cm.c +++ b/drivers/infiniband/sw/siw/siw_cm.c @@ -138,6 +138,14 @@ static void __siw_cep_terminate_upcall(struct siw_cep *cep, } switch (cep->state) { + case SIW_EPSTATE_CONNECTING: + /* + * The TCP connect got rejected or timed out. + */ + siw_cm_upcall(cep, IW_CM_EVENT_CONNECT_REPLY, + reply_status); + break; + case SIW_EPSTATE_AWAIT_MPAREP: /* * MPA reply not received, but connection drop, @@ -202,7 +210,6 @@ static void __siw_cep_terminate_upcall(struct siw_cep *cep, case SIW_EPSTATE_IDLE: case SIW_EPSTATE_LISTENING: - case SIW_EPSTATE_CONNECTING: case SIW_EPSTATE_CLOSED: default: /* -- 2.25.1