Re: [PATCH net-next 1/7] net: korina: Fix MDIO functions

2021-04-14 Thread Thomas Bogendoerfer
On Wed, Apr 14, 2021 at 09:36:04PM +0200, Andrew Lunn wrote: > > +static int korina_mdio_wait(struct korina_private *lp) > > +{ > > + int timeout = 1000; > > + > > + while ((readl(>eth_regs->miimind) & 1) && timeout-- > 0) > > + udelay(1); > > + > > + if (timeout <= 0) > > +

Re: [PATCH net-next 1/7] net: korina: Fix MDIO functions

2021-04-14 Thread Andrew Lunn
> +static int korina_mdio_wait(struct korina_private *lp) > +{ > + int timeout = 1000; > + > + while ((readl(>eth_regs->miimind) & 1) && timeout-- > 0) > + udelay(1); > + > + if (timeout <= 0) > + return -1; > + > + return 0; Using

[PATCH net-next 1/7] net: korina: Fix MDIO functions

2021-04-13 Thread Thomas Bogendoerfer
Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 57 +++ 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/korina.c