Skip to content

Commit 40648fa

Browse files
RyceancurryNipaLocal
authored andcommitted
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 <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 2587430 commit 40648fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/mdio/mdio-bcm-unimac.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ static inline unsigned int unimac_mdio_busy(struct unimac_mdio_priv *priv)
8181
static int unimac_mdio_poll(void *wait_func_data)
8282
{
8383
struct unimac_mdio_priv *priv = wait_func_data;
84-
unsigned int timeout = 1000;
84+
unsigned int timeout = 100;
85+
86+
udelay(30);
8587

8688
do {
8789
if (!unimac_mdio_busy(priv))

0 commit comments

Comments
 (0)