From: David Miller <davem@davemloft.net>
To: blogic@openwrt.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, steven.liu@mediatek.com,
Carlos.Huang@mediatek.com, nbd@openwrt.org, igvtee@gmail.com
Subject: Re: [PATCH V4 2/4] net-next: mediatek: add support for MT7623 ethernet
Date: Mon, 07 Mar 2016 11:30:54 -0500 (EST) [thread overview]
Message-ID: <20160307.113054.2069588355987832062.davem@davemloft.net> (raw)
In-Reply-To: <1457340997-23116-3-git-send-email-blogic@openwrt.org>
From: John Crispin <blogic@openwrt.org>
Date: Mon, 7 Mar 2016 09:56:35 +0100
> +static int mtk_mdio_busy_wait(struct mtk_eth *eth)
> +{
> + unsigned long t_start = jiffies;
> +
> + while (1) {
> + if (!(mtk_r32(eth, MTK_PHY_IAC) & PHY_IAC_ACCESS))
> + return 0;
> + if (time_after(jiffies, t_start + PHY_IAC_TIMEOUT))
> + break;
> + }
> +
> + dev_err(eth->dev, "mdio: MDIO timeout\n");
> + return -1;
> +}
Busy polling in a loop for up to 5 seconds with no preemption points
is not something you can do, sorry.
next prev parent reply other threads:[~2016-03-07 16:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 8:56 [PATCH V4 0/4] net-next: mediatek: add ethernet driver John Crispin
2016-03-07 8:56 ` [PATCH V4 1/4] net-next: mediatek: document MediaTek SoC ethernet binding John Crispin
2016-03-07 8:56 ` [PATCH V4 2/4] net-next: mediatek: add support for MT7623 ethernet John Crispin
2016-03-07 16:30 ` David Miller [this message]
[not found] ` <1457340997-23116-1-git-send-email-blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
2016-03-07 8:56 ` [PATCH V4 3/4] net-next: mediatek: add Kconfig and Makefile John Crispin
2016-03-07 8:56 ` [PATCH V4 4/4] net-next: mediatek: add an entry to MAINTAINERS John Crispin
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=20160307.113054.2069588355987832062.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Carlos.Huang@mediatek.com \
--cc=blogic@openwrt.org \
--cc=igvtee@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=nbd@openwrt.org \
--cc=netdev@vger.kernel.org \
--cc=steven.liu@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).