/linux/net/core/ |
H A D | timestamping.c | 16 skb->dev->phydev->mii_ts)) in classify() 24 struct mii_timestamper *mii_ts; in skb_clone_tx_timestamp() local 36 mii_ts = skb->dev->phydev->mii_ts; in skb_clone_tx_timestamp() 37 if (likely(mii_ts->txtstamp)) { in skb_clone_tx_timestamp() 41 mii_ts->txtstamp(mii_ts, clone, type); in skb_clone_tx_timestamp() 48 struct mii_timestamper *mii_ts; in skb_defer_rx_timestamp() local 66 mii_ts = skb->dev->phydev->mii_ts; in skb_defer_rx_timestamp() 67 if (likely(mii_ts->rxtstamp)) in skb_defer_rx_timestamp() 68 return mii_ts->rxtstamp(mii_ts, skb, type); in skb_defer_rx_timestamp()
|
/linux/drivers/net/phy/ |
H A D | mii_timestamper.c | 81 struct mii_timestamper *mii_ts = NULL; in register_mii_timestamper() local 89 mii_ts = desc->ctrl->probe_channel(desc->device, port); in register_mii_timestamper() 90 if (!IS_ERR(mii_ts)) { in register_mii_timestamper() 91 mii_ts->device = desc->device; in register_mii_timestamper() 99 return mii_ts ? mii_ts : ERR_PTR(-EPROBE_DEFER); in register_mii_timestamper() 109 void unregister_mii_timestamper(struct mii_timestamper *mii_ts) in unregister_mii_timestamper() argument 114 if (!mii_ts) in unregister_mii_timestamper() 121 if (!mii_ts->device) in unregister_mii_timestamper() 127 if (desc->device == mii_ts->device) { in unregister_mii_timestamper() 128 desc->ctrl->release_channel(desc->device, mii_ts); in unregister_mii_timestamper()
|
H A D | bcm-phy-ptp.c | 131 struct mii_timestamper mii_ts; member 167 static struct bcm_ptp_private *mii2priv(struct mii_timestamper *mii_ts) in mii2priv() argument 169 return container_of(mii_ts, struct bcm_ptp_private, mii_ts); in mii2priv() 385 static bool bcm_ptp_rxtstamp(struct mii_timestamper *mii_ts, in bcm_ptp_rxtstamp() argument 388 struct bcm_ptp_private *priv = mii2priv(mii_ts); in bcm_ptp_rxtstamp() 745 static void bcm_ptp_txtstamp(struct mii_timestamper *mii_ts, in bcm_ptp_txtstamp() argument 748 struct bcm_ptp_private *priv = mii2priv(mii_ts); in bcm_ptp_txtstamp() 784 static int bcm_ptp_hwtstamp(struct mii_timestamper *mii_ts, in bcm_ptp_hwtstamp() argument 788 struct bcm_ptp_private *priv = mii2priv(mii_ts); in bcm_ptp_hwtstamp() 843 static int bcm_ptp_ts_info(struct mii_timestamper *mii_ts, in bcm_ptp_ts_info() argument [all …]
|
H A D | dp83640.c | 109 struct mii_timestamper mii_ts; member 1210 static int dp83640_hwtstamp(struct mii_timestamper *mii_ts, in dp83640_hwtstamp() argument 1215 container_of(mii_ts, struct dp83640_private, mii_ts); in dp83640_hwtstamp() 1319 static bool dp83640_rxtstamp(struct mii_timestamper *mii_ts, in dp83640_rxtstamp() argument 1323 container_of(mii_ts, struct dp83640_private, mii_ts); in dp83640_rxtstamp() 1369 static void dp83640_txtstamp(struct mii_timestamper *mii_ts, in dp83640_txtstamp() argument 1374 container_of(mii_ts, struct dp83640_private, mii_ts); in dp83640_txtstamp() 1397 static int dp83640_ts_info(struct mii_timestamper *mii_ts, in dp83640_ts_info() argument 1401 container_of(mii_ts, struct dp83640_private, mii_ts); in dp83640_ts_info() 1439 dp83640->mii_ts.rxtstamp = dp83640_rxtstamp; in dp83640_probe() [all …]
|
H A D | micrel.c | 406 struct mii_timestamper mii_ts; member 2631 static int lan8814_ts_info(struct mii_timestamper *mii_ts, struct kernel_ethtool_ts_info *info) in lan8814_ts_info() argument 2633 struct kszphy_ptp_priv *ptp_priv = container_of(mii_ts, struct kszphy_ptp_priv, mii_ts); in lan8814_ts_info() 2670 static int lan8814_hwtstamp(struct mii_timestamper *mii_ts, in lan8814_hwtstamp() argument 2675 container_of(mii_ts, struct kszphy_ptp_priv, mii_ts); in lan8814_hwtstamp() 2754 static void lan8814_txtstamp(struct mii_timestamper *mii_ts, in lan8814_txtstamp() argument 2757 struct kszphy_ptp_priv *ptp_priv = container_of(mii_ts, struct kszphy_ptp_priv, mii_ts); in lan8814_txtstamp() 2830 static bool lan8814_rxtstamp(struct mii_timestamper *mii_ts, struct sk_buff *skb, int type) in lan8814_rxtstamp() argument 2833 container_of(mii_ts, struct kszphy_ptp_priv, mii_ts); in lan8814_rxtstamp() 3854 ptp_priv->mii_ts.rxtstamp = lan8814_rxtstamp; in lan8814_ptp_init() [all …]
|
H A D | phy.c | 423 if (phydev->mii_ts && phydev->mii_ts->hwtstamp) { in phy_mii_ioctl() 428 ret = phydev->mii_ts->hwtstamp(phydev->mii_ts, &kernel_cfg, &extack); in phy_mii_ioctl() 511 if (phydev->mii_ts && phydev->mii_ts->hwtstamp) in __phy_hwtstamp_set() 512 return phydev->mii_ts->hwtstamp(phydev->mii_ts, config, extack); in __phy_hwtstamp_set()
|
H A D | phy_device.c | 1060 unregister_mii_timestamper(phydev->mii_ts); in phy_device_remove() 1113 if (phydev->mii_ts && phydev->mii_ts->link_state) in phy_link_change() 1114 phydev->mii_ts->link_state(phydev->mii_ts, phydev); in phy_link_change()
|
/linux/drivers/net/mdio/ |
H A D | fwnode_mdio.c | 43 struct mii_timestamper *mii_ts; in fwnode_find_mii_timestamper() local 58 mii_ts = ERR_PTR(-EINVAL); in fwnode_find_mii_timestamper() 62 mii_ts = register_mii_timestamper(arg.np, arg.args[0]); in fwnode_find_mii_timestamper() 66 return mii_ts; in fwnode_find_mii_timestamper() 124 struct mii_timestamper *mii_ts = NULL; in fwnode_mdiobus_register_phy() local 135 mii_ts = fwnode_find_mii_timestamper(child); in fwnode_mdiobus_register_phy() 136 if (IS_ERR(mii_ts)) { in fwnode_mdiobus_register_phy() 137 rc = PTR_ERR(mii_ts); in fwnode_mdiobus_register_phy() 178 if (mii_ts) in fwnode_mdiobus_register_phy() 179 phy->mii_ts = mii_ts; in fwnode_mdiobus_register_phy() [all …]
|
/linux/include/linux/ |
H A D | mii_timestamper.h | 48 bool (*rxtstamp)(struct mii_timestamper *mii_ts, 51 void (*txtstamp)(struct mii_timestamper *mii_ts, 54 int (*hwtstamp)(struct mii_timestamper *mii_ts, 58 void (*link_state)(struct mii_timestamper *mii_ts, 61 int (*ts_info)(struct mii_timestamper *mii_ts, 82 struct mii_timestamper *mii_ts); 95 void unregister_mii_timestamper(struct mii_timestamper *mii_ts); 117 static inline void unregister_mii_timestamper(struct mii_timestamper *mii_ts) in unregister_mii_timestamper() argument
|
H A D | phy.h | 771 struct mii_timestamper *mii_ts; member 1592 return phydev && phydev->mii_ts && phydev->mii_ts->hwtstamp; in phy_has_hwtstamp() 1601 return phydev && phydev->mii_ts && phydev->mii_ts->rxtstamp; in phy_has_rxtstamp() 1611 return phydev && phydev->mii_ts && phydev->mii_ts->ts_info; in phy_has_tsinfo() 1620 return phydev && phydev->mii_ts && phydev->mii_ts->txtstamp; in phy_has_txtstamp() 1627 return phydev->mii_ts->hwtstamp(phydev->mii_ts, cfg, extack); in phy_hwtstamp() 1633 return phydev->mii_ts->rxtstamp(phydev->mii_ts, skb, type); in phy_rxtstamp() 1639 return phydev->mii_ts->ts_info(phydev->mii_ts, tsinfo); in phy_ts_info() 1645 phydev->mii_ts->txtstamp(phydev->mii_ts, skb, type); in phy_txtstamp()
|
/linux/drivers/ptp/ |
H A D | ptp_ines.c | 147 struct mii_timestamper mii_ts; member 331 static int ines_hwtstamp(struct mii_timestamper *mii_ts, in ines_hwtstamp() argument 335 struct ines_port *port = container_of(mii_ts, struct ines_port, mii_ts); in ines_hwtstamp() 397 static void ines_link_state(struct mii_timestamper *mii_ts, in ines_link_state() argument 400 struct ines_port *port = container_of(mii_ts, struct ines_port, mii_ts); in ines_link_state() 473 static bool ines_rxtstamp(struct mii_timestamper *mii_ts, in ines_rxtstamp() argument 476 struct ines_port *port = container_of(mii_ts, struct ines_port, mii_ts); in ines_rxtstamp() 558 static int ines_ts_info(struct mii_timestamper *mii_ts, in ines_ts_info() argument 611 static void ines_txtstamp(struct mii_timestamper *mii_ts, in ines_txtstamp() argument 614 struct ines_port *port = container_of(mii_ts, struct ines_port, mii_ts); in ines_txtstamp() [all …]
|
/linux/drivers/net/phy/mscc/ |
H A D | mscc_ptp.c | 1048 static int vsc85xx_hwtstamp(struct mii_timestamper *mii_ts, in vsc85xx_hwtstamp() argument 1053 container_of(mii_ts, struct vsc8531_private, mii_ts); in vsc85xx_hwtstamp() 1136 static int vsc85xx_ts_info(struct mii_timestamper *mii_ts, in vsc85xx_ts_info() argument 1140 container_of(mii_ts, struct vsc8531_private, mii_ts); in vsc85xx_ts_info() 1159 static void vsc85xx_txtstamp(struct mii_timestamper *mii_ts, in vsc85xx_txtstamp() argument 1163 container_of(mii_ts, struct vsc8531_private, mii_ts); in vsc85xx_txtstamp() 1180 static bool vsc85xx_rxtstamp(struct mii_timestamper *mii_ts, in vsc85xx_rxtstamp() argument 1184 container_of(mii_ts, struct vsc8531_private, mii_ts); in vsc85xx_rxtstamp() 1482 vsc8531->mii_ts.rxtstamp = vsc85xx_rxtstamp; in __vsc8584_init_ptp() 1483 vsc8531->mii_ts.txtstamp = vsc85xx_txtstamp; in __vsc8584_init_ptp() [all …]
|
H A D | mscc.h | 393 struct mii_timestamper mii_ts; member
|
/linux/Documentation/networking/ |
H A D | timestamping.rst | 746 mii_timestamper`` and add a pointer to it in ``phydev->mii_ts``. The presence 763 enabled, and ``skb->dev->phydev->mii_ts`` exists, its ``.rxtstamp()`` hook 775 function that calls the ``mii_ts->txtstamp()`` hook is named 790 for the rest, they use the same mii_ts infrastructure as those. See
|