Thread (16 messages) 16 messages, 2 authors, 3d ago

RE: [PATCH net-next v5 10/13] net: phy: add generic helpers for direct C45 MMD access

From: Selvamani Rajagopal <hidden>
Date: 2026-07-09 02:29:45
Also in: linux-devicetree, linux-doc, lkml

+int genphy_read_mmd_c45(struct phy_device *phydev, int devnum, u16 regnum)
+{
+ struct mii_bus *bus = phydev->mdio.bus;
+ int addr = phydev->mdio.addr;
You may want to insert the lockdep_assert here. That'll ensure that read/write APIs are called
after the mdio-lock is taken. Andrew's suggestion.

   lockdep_assert_held(&bus->mdio_lock)

+ return __mdiobus_c45_read(bus, addr, devnum, regnum);
+}
+int genphy_write_mmd_c45(struct phy_device *phydev, int devnum, u16 regnum,
+ u16 val)
+{
+ struct mii_bus *bus = phydev->mdio.bus;
+ int addr = phydev->mdio.addr;

And here too.

+ return __mdiobus_c45_write(bus, addr, devnum, regnum, val);
+}
+EXPORT_SYMBOL(genphy_write_mmd_c45);
+
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help