Re: ERROR: modpost: "__delay" [drivers/net/mdio/mdio-cavium.ko] undefined!

From: Andrew Lunn
Date: Mon May 31 2021 - 12:34:25 EST


> > No, we should just fix the driver instead.
> >
> > + /* Wait 1000 clocks so we don't saturate the RSL bus
> > + * doing reads.
> > + */
> > + __delay(1000);
> >
> > As this is used only on Cavium Octeon and Thunder SoCs, running
> > at 400-600 MHz resp. 1800-2000 Mhz, what about replacing the __delay()
> > call by a call to udelay(1) or udelay(2)?
>
> Yeah, I was planning to look into that change this week,
> but it would probably be better for David to do it.

If you look at the bigger picture, using linux/iopoll.h would be a
better solution.

Andrew