* [PATCH net-next] sunvnet: ldc_connect() should not return EINVAL when handshake is in progress.
@ 2014-07-31 14:31 Sowmini Varadhan
2014-08-01 5:11 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Sowmini Varadhan @ 2014-07-31 14:31 UTC (permalink / raw)
To: davem, karl.volz, sowmini.varadhan; +Cc: netdev
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.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Karl Volz <karl.volz@oracle.com>
---
arch/sparc/kernel/ldc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index e01d75d..66dacd5 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -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);
--
1.8.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] sunvnet: ldc_connect() should not return EINVAL when handshake is in progress.
2014-07-31 14:31 [PATCH net-next] sunvnet: ldc_connect() should not return EINVAL when handshake is in progress Sowmini Varadhan
@ 2014-08-01 5:11 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-08-01 5:11 UTC (permalink / raw)
To: sowmini.varadhan; +Cc: karl.volz, netdev
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Thu, 31 Jul 2014 10:31:26 -0400
>
> 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.
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> Acked-by: Karl Volz <karl.volz@oracle.com>
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-01 5:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 14:31 [PATCH net-next] sunvnet: ldc_connect() should not return EINVAL when handshake is in progress Sowmini Varadhan
2014-08-01 5:11 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).