From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Max Uvarov <muvarov@gmail.com>, netdev@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCHv2 1/2] drivers: net: davinci_mdio: remove busy loop on wait user access
Date: Thu, 10 Aug 2017 11:24:50 -0500 [thread overview]
Message-ID: <d176da18-b608-9738-317c-6ca01cb937e9@ti.com> (raw)
In-Reply-To: <1502351267-23841-1-git-send-email-muvarov@gmail.com>
On 08/10/2017 02:47 AM, Max Uvarov wrote:
> Polling 14 mdio devices on single mdio bus eats 30% of 1Ghz cpu time
> due to busy loop in wait(). Add small delay to relax cpu.
>
> Signed-off-by: Max Uvarov <muvarov@gmail.com>
yep. cover letter is good to have.
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
> v2: fix spelling in commit description.
>
> drivers/net/ethernet/ti/davinci_mdio.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
> index 33df340..611e7cc 100644
> --- a/drivers/net/ethernet/ti/davinci_mdio.c
> +++ b/drivers/net/ethernet/ti/davinci_mdio.c
> @@ -198,8 +198,10 @@ static inline int wait_for_user_access(struct davinci_mdio_data *data)
> return 0;
>
> reg = __raw_readl(®s->control);
> - if ((reg & CONTROL_IDLE) == 0)
> + if ((reg & CONTROL_IDLE) == 0) {
> + usleep_range(100, 200);
> continue;
> + }
>
> /*
> * An emac soft_reset may have clobbered the mdio controller's
>
--
regards,
-grygorii
next prev parent reply other threads:[~2017-08-10 16:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 7:47 [PATCHv2 1/2] drivers: net: davinci_mdio: remove busy loop on wait user access Max Uvarov
2017-08-10 7:47 ` [PATCHv2 2/2] drivers: net: davinci_mdio: print bus frequency Max Uvarov
2017-08-10 16:18 ` Grygorii Strashko
2017-08-11 21:24 ` David Miller
2017-08-10 14:40 ` [PATCHv2 1/2] drivers: net: davinci_mdio: remove busy loop on wait user access Andrew Lunn
2017-08-10 16:24 ` Grygorii Strashko [this message]
2017-08-11 21:24 ` 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=d176da18-b608-9738-317c-6ca01cb937e9@ti.com \
--to=grygorii.strashko@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=muvarov@gmail.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox