提交 9513167e 编写于 作者: A Antoine Tenart 提交者: David S. Miller

net: phy: mscc-miim: use more reasonable delays

The MSCC MIIM MDIO driver uses delays to read poll a status register. I
made multiple tests on a Ocelot PCS120 platform which led me to reduce
those delays. The delay in between which the polling function is allowed
to sleep is reduced from 100us to 50us which in almost all cases is a
good value to succeed at the first retry. The overall delay is also
lowered as the prior value was really way to high, 10000us is large
enough.
Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 90ce665c
......@@ -44,7 +44,7 @@ static int mscc_miim_wait_ready(struct mii_bus *bus)
u32 val;
readl_poll_timeout(miim->regs + MSCC_MIIM_REG_STATUS, val,
!(val & MSCC_MIIM_STATUS_STAT_BUSY), 100, 250000);
!(val & MSCC_MIIM_STATUS_STAT_BUSY), 50, 10000);
if (val & MSCC_MIIM_STATUS_STAT_BUSY)
return -ETIMEDOUT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册