diff options
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 09deef4bed09..653d076eafe5 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -38,6 +38,9 @@ #include <asm/irq.h> +#define CREATE_TRACE_POINTS +#include <trace/events/mdio.h> + int mdiobus_register_device(struct mdio_device *mdiodev) { if (mdiodev->bus->mdio_map[mdiodev->addr]) @@ -461,6 +464,8 @@ int mdiobus_read_nested(struct mii_bus *bus, int addr, u32 regnum) retval = bus->read(bus, addr, regnum); mutex_unlock(&bus->mdio_lock); + trace_mdio_access(bus, 1, addr, regnum, retval, retval); + return retval; } EXPORT_SYMBOL(mdiobus_read_nested); @@ -485,6 +490,8 @@ int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum) retval = bus->read(bus, addr, regnum); mutex_unlock(&bus->mdio_lock); + trace_mdio_access(bus, 1, addr, regnum, retval, retval); + return retval; } EXPORT_SYMBOL(mdiobus_read); @@ -513,6 +520,8 @@ int mdiobus_write_nested(struct mii_bus *bus, int addr, u32 regnum, u16 val) err = bus->write(bus, addr, regnum, val); mutex_unlock(&bus->mdio_lock); + trace_mdio_access(bus, 0, addr, regnum, val, err); + return err; } EXPORT_SYMBOL(mdiobus_write_nested); @@ -538,6 +547,8 @@ int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val) err = bus->write(bus, addr, regnum, val); mutex_unlock(&bus->mdio_lock); + trace_mdio_access(bus, 0, addr, regnum, val, err); + return err; } EXPORT_SYMBOL(mdiobus_write); |