[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160307.113054.2069588355987832062.davem@davemloft.net>
Date: Mon, 07 Mar 2016 11:30:54 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: blogic@...nwrt.org
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, steven.liu@...iatek.com,
Carlos.Huang@...iatek.com, nbd@...nwrt.org, igvtee@...il.com
Subject: Re: [PATCH V4 2/4] net-next: mediatek: add support for MT7623
ethernet
From: John Crispin <blogic@...nwrt.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.
Powered by blists - more mailing lists