linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netpoll: Remove 4s sleep during carrier detection
@ 2023-01-19 16:44 Breno Leitao
  2023-01-19 18:00 ` [RFC PATCH v2] " Breno Leitao
  0 siblings, 1 reply; 4+ messages in thread
From: Breno Leitao @ 2023-01-19 16:44 UTC (permalink / raw)
  To: leitao, kuba, netdev
  Cc: leit, davem, edumazet, pabeni, sa+renesas, linux-kernel,
	Michael van der Westhuizen

This patch proposes to remove the msleep(4s) during netpoll_setup() if
the carrier appears instantly.

Modern NICs do not seem to have this bouncing problem anymore, and this
sleep slows down the machine boot unnecessarily

Reported-by: Michael van der Westhuizen <rmikey@meta.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 net/core/netpoll.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 9be762e1d042..6f45aeaf3da0 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -704,15 +704,6 @@ int netpoll_setup(struct netpoll *np)
 			msleep(1);
 		}
 
-		/* If carrier appears to come up instantly, we don't
-		 * trust it and pause so that we don't pump all our
-		 * queued console messages into the bitbucket.
-		 */
-
-		if (time_before(jiffies, atleast)) {
-			np_notice(np, "carrier detect appears untrustworthy, waiting 4 seconds\n");
-			msleep(4000);
-		}
 		rtnl_lock();
 	}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-23 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19 16:44 [PATCH] netpoll: Remove 4s sleep during carrier detection Breno Leitao
2023-01-19 18:00 ` [RFC PATCH v2] " Breno Leitao
2023-01-19 19:04   ` Jakub Kicinski
2023-01-23 13:56     ` Andrew Lunn

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).