提交 d2b09a8e 编写于 作者: Y Yangbo Lu 提交者: David S. Miller

net: mscc: ocelot: fix timestamp info if ptp clock does not work

The timestamp info should be only software timestamp capabilities
if ptp clock does not work.
Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2b49d128
...@@ -1349,6 +1349,12 @@ int ocelot_get_ts_info(struct ocelot *ocelot, int port, ...@@ -1349,6 +1349,12 @@ int ocelot_get_ts_info(struct ocelot *ocelot, int port,
{ {
info->phc_index = ocelot->ptp_clock ? info->phc_index = ocelot->ptp_clock ?
ptp_clock_index(ocelot->ptp_clock) : -1; ptp_clock_index(ocelot->ptp_clock) : -1;
if (info->phc_index == -1) {
info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
SOF_TIMESTAMPING_RX_SOFTWARE |
SOF_TIMESTAMPING_SOFTWARE;
return 0;
}
info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE | info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
SOF_TIMESTAMPING_RX_SOFTWARE | SOF_TIMESTAMPING_RX_SOFTWARE |
SOF_TIMESTAMPING_SOFTWARE | SOF_TIMESTAMPING_SOFTWARE |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册