From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Antoine Tenart <antoine.tenart@bootlin.com>
Cc: davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com,
hkallweit1@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com,
allan.nielsen@microchip.com
Subject: Re: [PATCH net-next 1/4] net: phy: mscc-miim: use more reasonable delays
Date: Tue, 26 May 2020 23:04:26 +0200 [thread overview]
Message-ID: <20200526210426.GG3972@piout.net> (raw)
In-Reply-To: <20200526162256.466885-2-antoine.tenart@bootlin.com>
On 26/05/2020 18:22:53+0200, Antoine Ténart wrote:
> 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: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> drivers/net/phy/mdio-mscc-miim.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/mdio-mscc-miim.c b/drivers/net/phy/mdio-mscc-miim.c
> index badbc99bedd3..0b7544f593fb 100644
> --- a/drivers/net/phy/mdio-mscc-miim.c
> +++ b/drivers/net/phy/mdio-mscc-miim.c
> @@ -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;
>
> --
> 2.26.2
>
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2020-05-26 21:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 16:22 [PATCH net-next 0/4] net: phy: mscc-miim: reduce waiting time between MDIO transactions Antoine Tenart
2020-05-26 16:22 ` [PATCH net-next 1/4] net: phy: mscc-miim: use more reasonable delays Antoine Tenart
2020-05-26 21:04 ` Alexandre Belloni [this message]
2020-05-26 21:19 ` Florian Fainelli
2020-05-26 16:22 ` [PATCH net-next 2/4] net: phy: mscc-miim: remove redundant timeout check Antoine Tenart
2020-05-26 21:04 ` Alexandre Belloni
2020-05-26 21:19 ` Florian Fainelli
2020-05-26 16:22 ` [PATCH net-next 3/4] net: phy: mscc-miim: improve waiting logic Antoine Tenart
2020-05-26 21:07 ` Alexandre Belloni
2020-05-26 21:21 ` Florian Fainelli
2020-05-26 16:22 ` [PATCH net-next 4/4] net: phy: mscc-miim: read poll when high resolution timers are disabled Antoine Tenart
2020-05-26 21:22 ` Florian Fainelli
2020-05-26 22:01 ` Andrew Lunn
2020-05-26 22:05 ` Florian Fainelli
2020-05-26 17:01 ` [PATCH net-next 0/4] net: phy: mscc-miim: reduce waiting time between MDIO transactions Andrew Lunn
2020-05-27 7:00 ` Antoine Tenart
2020-05-26 22:34 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200526210426.GG3972@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=allan.nielsen@microchip.com \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@bootlin.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.