Re: [PATCH net-next v3 2/2] net: mdio: add a driver for PIC64-HPSC/HX MDIO controller

Russell King (Oracle)
2026-03-31T14:57:31Z

On Tue, Mar 31, 2026 at 07:43:28AM -0700, Charles Perry wrote:
> On Tue, Mar 31, 2026 at 04:20:55PM +0200, Andrew Lunn wrote:
> > On Tue, Mar 31, 2026 at 03:05:28PM +0100, Russell King (Oracle) wrote:
> > > On Tue, Mar 31, 2026 at 06:42:02AM -0700, Charles Perry wrote:
> > > > I don't know if there's any value in waiting for write completion here as
> > > > write completion doesn't mean that the effects of the write are available
> > > > right now. I also didn't run into any issues in my testing. Let me know if
> > > > you know of a use case where this wouldn't work.
> > > >
> > > > I can add a wait for transaction completion if that's expected by phylib.
> > >
> > > Consider a PHY using a shared interrupt line, and the interrupt being
> > > disabled in at the PHY before being torn down... wouldn't we want the
> > > write to the register which enables interrupts to complete before we
> > > unregister the interrupt handler for the particular PHY?
> > >
> > > I do notice that other MDIO drivers don't wait. Some PHY drivers don't
> > > access the PHY after the write to disable interrupts either. So, maybe
> > > phy_free_interrupt() should read-back from the PHY before calling
> > > free_irq() to guarantee that the write has completed?
> > >
> > > Andrew?
> >
> > The general pattern is to not wait on write.
>
> Ok, then it's status quo for this.

Except someone needs to add that read-back - don't look at me, I
generate too many patches for netdev, so have no capacity for yet
more patches.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!