From: Chuck Lever Date: Mon, 23 Dec 2019 15:28:44 +0000 (-0500) Subject: SUNRPC: call_connect_status should handle -EPROTO X-Git-Tag: v5.15~4515^2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8457606d95f219052cbcf07bd54c24c4290cd49;p=platform%2Fkernel%2Flinux-starfive.git SUNRPC: call_connect_status should handle -EPROTO The xprtrdma connect logic can return -EPROTO if the underlying device or network path does not support RDMA. This can happen after a device removal/insertion. - When SOFTCONN is set, EPROTO is a permanent error. - When SOFTCONN is not set, EPROTO is treated as a temporary error. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index a337976..7324b21 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2130,6 +2130,7 @@ call_connect_status(struct rpc_task *task) case -ENETUNREACH: case -EHOSTUNREACH: case -EPIPE: + case -EPROTO: xprt_conditional_disconnect(task->tk_rqstp->rq_xprt, task->tk_rqstp->rq_connect_cookie); if (RPC_IS_SOFTCONN(task))