lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <20231213000249.2020835-1-justin.chen@broadcom.com>
Date: Tue, 12 Dec 2023 16:02:49 -0800
From: Justin Chen <justin.chen@...adcom.com>
To: netdev@...r.kernel.org
Cc: Justin Chen <justin.chen@...adcom.com>,
Doug Berger <opendmb@...il.com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] net: mdio: mdio-bcm-unimac: Delay before first poll
With a clock interval of 400 nsec and a 64 bit transactions (32 bit
preamble & 16 bit control & 16 bit data), it is reasonable to assume
the mdio transaction will take 25.6 usec. Add a 30 usec delay before
the first poll to reduce the chance of a 1000-2000 usec sleep.
Reduce the timeout from 1000ms to 100ms as it is unlikely for the bus
to take this long.
Signed-off-by: Justin Chen <justin.chen@...adcom.com>
---
drivers/net/mdio/mdio-bcm-unimac.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mdio/mdio-bcm-unimac.c b/drivers/net/mdio/mdio-bcm-unimac.c
index e8cd8eef319b..1f89b1bdb90f 100644
--- a/drivers/net/mdio/mdio-bcm-unimac.c
+++ b/drivers/net/mdio/mdio-bcm-unimac.c
@@ -81,7 +81,9 @@ static inline unsigned int unimac_mdio_busy(struct unimac_mdio_priv *priv)
static int unimac_mdio_poll(void *wait_func_data)
{
struct unimac_mdio_priv *priv = wait_func_data;
- unsigned int timeout = 1000;
+ unsigned int timeout = 100;
+
+ udelay(30);
do {
if (!unimac_mdio_busy(priv))
--
2.34.1
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4206 bytes)
Powered by blists - more mailing lists