stmmac: Correctly report PTP capabilities.
Subsystems (4)
cover stmmac: Correctly report PTP capabilities.
Phil Reid (1):
stmmac: Correctly report PTP capabilities.
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/1 stmmac: Correctly report PTP capabilities.
priv->hwts_*_en indicate if timestamping is enabled/disabled at run time. But priv->dma_cap.time_stamp and priv->dma_cap.atime_stamp indicates HW is support for PTPv1/PTPv2.
--- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +5 -2
@@ -721,10 +721,13 @@ static int stmmac_get_ts_info(struct net_device *dev, {struct stmmac_priv *priv =netdev_priv (dev); -if ((priv->hwts_tx_en) && (priv->hwts_rx_en)) { +if ((priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp)) { - info->so_timestamping =SOF_TIMESTAMPING_TX_HARDWARE | + info->so_timestamping =SOF_TIMESTAMPING_TX_SOFTWARE | +SOF_TIMESTAMPING_TX_HARDWARE | +SOF_TIMESTAMPING_RX_SOFTWARE |SOF_TIMESTAMPING_RX_HARDWARE | +SOF_TIMESTAMPING_SOFTWARE |SOF_TIMESTAMPING_RAW_HARDWARE ;if (priv->ptp_clock)
Signature · 1 line
1.8.3.1
Quoted 5 lines · Phil Reid
priv->hwts_*_en indicate if timestamping is enabled/disabled at run time. But
priv->dma_cap.time_stampandpriv->dma_cap.atime_stampindicates HW is support for PTPv1/PTPv2.Signed-off-by Phil Reid <[email protected]>
Thanks for catching this bug.
David Miller
maintainerFrom: Phil Reid <[email protected]>
Date: Fri, 30 Oct 2015 16:43:55 +0800
Quoted 5 lines
priv->hwts_*_en indicate if timestamping is enabled/disabled at run time. But
priv->dma_cap.time_stampandpriv->dma_cap.atime_stampindicates HW is support for PTPv1/PTPv2.Signed-off-by Phil Reid <[email protected]>
Applied and queued up for -stable, thanks.