On Thu, 26 Nov 2026 23:08:33 +0900 SeungJong Ha <engi…@gmail.com> wrote:
> /// Overrides the default MMD read function for reading a MMD register. > - fn read_mmd(_dev: &mut Device, _devnum: u8, _regnum: u16) -> Result<u16> { > + /// > + /// PHYLIB calls this with the MDIO bus lock held, so calling [`Device::read`] or > + /// [`Device::write`] here deadlocks.
As sashiko pointed out, genphy_suspend() also takes the MDIO bus lock. Maybe say "methods that take the MDIO bus lock" instead of listing them.
> + fn read_mmd(_dev: &Device, _devnum: u8, _regnum: u16) -> Result<u16> { > build_error!(VTABLE_DEFAULT_ERROR) > } > > /// Overrides the default MMD write function for writing a MMD register. > - fn write_mmd(_dev: &mut Device, _devnum: u8, _regnum: u16, _val: u16) -> Result { > + /// > + /// PHYLIB calls this with the MDIO bus lock held, so calling [`Device::read`] or > + /// [`Device::write`] here deadlocks.
Ditto.