Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1351780
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V4 2/4] net-next: mediatek: add support for MT7623 ethernet |
| Date | 2016-03-07 17:40 +0100 |
| Message-ID | <ra6mm-5hg-15@gated-at.bofh.it> (permalink) |
| References | <r9Zbc-yj-3@gated-at.bofh.it> <r9Zbe-yj-47@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH V4 0/4] net-next: mediatek: add ethernet driver John Crispin <blogic@openwrt.org> - 2016-03-07 10:00 +0100 [PATCH V4 3/4] net-next: mediatek: add Kconfig and Makefile John Crispin <blogic@openwrt.org> - 2016-03-07 10:00 +0100 [PATCH V4 1/4] net-next: mediatek: document MediaTek SoC ethernet binding John Crispin <blogic@openwrt.org> - 2016-03-07 10:00 +0100 Re: [PATCH V4 2/4] net-next: mediatek: add support for MT7623 ethernet David Miller <davem@davemloft.net> - 2016-03-07 17:40 +0100
csiph-web