Re: [PATCH net-next 4/4] net: phy: mscc-miim: read poll when high resolution timers are disabled

2020-05-26 Thread Florian Fainelli
On 5/26/2020 3:01 PM, Andrew Lunn wrote: >>> +/* When high resolution timers aren't built-in: we can't use >>> usleep_range() as >>> + * we would sleep way too long. Use udelay() instead. >>> + */ >>> +#define mscc_readl_poll_timeout(addr, val, cond, delay_us, timeout_us) >>> \ >>> +({

Re: [PATCH net-next 4/4] net: phy: mscc-miim: read poll when high resolution timers are disabled

2020-05-26 Thread Andrew Lunn
> > +/* When high resolution timers aren't built-in: we can't use > > usleep_range() as > > + * we would sleep way too long. Use udelay() instead. > > + */ > > +#define mscc_readl_poll_timeout(addr, val, cond, delay_us, timeout_us) > > \ > > +({

Re: [PATCH net-next 4/4] net: phy: mscc-miim: read poll when high resolution timers are disabled

2020-05-26 Thread Florian Fainelli
On 5/26/2020 9:22 AM, Antoine Tenart wrote: > The driver uses a read polling mechanism to check the status of the MDIO > bus, to know if it is ready to accept next commands. This polling > mechanism uses usleep_delay() under the hood between reads which is fine > as long as high resolution timer

[PATCH net-next 4/4] net: phy: mscc-miim: read poll when high resolution timers are disabled

2020-05-26 Thread Antoine Tenart
The driver uses a read polling mechanism to check the status of the MDIO bus, to know if it is ready to accept next commands. This polling mechanism uses usleep_delay() under the hood between reads which is fine as long as high resolution timers are enabled. Otherwise the delays will end up to be m