sunvnet: ldc_connect() should not return EINVAL when handshake is in progress.
Subsystems (3)
PATCH 1/1 sunvnet: ldc_connect() should not return EINVAL when handshake is in progress.
The LDC handshake could have been asynchronously triggered after ldc_bind() enables the ldc_rx() receive interrupt-handler (and thus intercepts incoming control packets)
and before vio_port_up() calls ldc_connect(). If that is the case, ldc_connect() should return 0 and let the state-machine progress.
--- arch/sparc/kernel/ldc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/kernel/ldc.c +1 -1
@@ -1336,7 +1336,7 @@ int ldc_connect(struct ldc_channel *lp)if (!(lp->flags &LDC_FLAG_ALLOCED_QUEUES ) || !(lp->flags &LDC_FLAG_REGISTERED_QUEUES ) || lp->hs_state !=LDC_HS_OPEN ) - err = -EINVAL ; + err = ((lp->hs_state >LDC_HS_OPEN ) ?0 : -EINVAL );else err =start_handshake (lp);
Signature · 1 line
1.8.4.2
David Miller
maintainerFrom: Sowmini Varadhan <[email protected]>
Date: Thu, 31 Jul 2014 10:31:26 -0400
Quoted 10 lines
The LDC handshake could have been asynchronously triggered after
ldc_bind()enables theldc_rx()receive interrupt-handler (and thus intercepts incoming control packets)
and beforevio_port_up()callsldc_connect(). If that is the case,ldc_connect()should return 0 and let the state-machine progress.Signed-off-by Sowmini Varadhan <[email protected]>Acked-by Karl Volz <[email protected]>
This is a sparc architecture change, not a networking one.
Please submit it to the appropriate mailing list, as per the top-level MAINTAINERS file.
Thanks.