linux/drivers/net/ethernet/ti
Grygorii Strashko 8502ab148f net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered
[ Upstream commit 4614792eeb ]

The CPTS driver registers PTP PHC clock when first netif is going up and
unregister it when all netif are down. Now ethtool will show:
 - PTP PHC clock index 0 after boot until first netif is up;
 - the last assigned PTP PHC clock index even if PTP PHC clock is not
registered any more after all netifs are down.

This patch ensures that -1 is returned by ethtool when PTP PHC clock is not
registered any more.

Fixes: 8a2c9a5ab4 ("net: ethernet: ti: cpts: rework initialization/deinitialization")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Link: https://lore.kernel.org/r/20201224162405.28032-1-grygorii.strashko@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:10:18 +01:00
..
cpmac.c
cpsw_ale.c net: ethernet: ti: ale: clean ale tbl on init and intf restart 2019-12-31 16:36:11 +01:00
cpsw_ale.h
cpsw-common.c
cpsw-phy-sel.c net: ethernet: cpsw-phy-sel: prefer phandle for phy sel 2018-09-02 13:52:13 -07:00
cpsw.c net: ethernet: ti: cpsw: fix extra rx interrupt 2019-12-21 10:57:11 +01:00
cpsw.h
cpts.c net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered 2021-01-12 20:10:18 +01:00
cpts.h
davinci_cpdma.c net: ethernet: ti: cpdma: fit rated channels in backward order 2018-07-23 20:34:36 -07:00
davinci_cpdma.h
davinci_emac.c net: davinci_emac: match the mdio device against its compatible if possible 2018-06-21 10:23:48 +09:00
davinci_mdio.c net: davinci: fix building davinci mdio code without CONFIG_OF 2018-05-30 13:21:23 -04:00
Kconfig net: ethernet: ti: add missing GENERIC_ALLOCATOR dependency 2018-09-17 07:49:33 -07:00
Makefile
netcp_core.c net: Add generic ndo_select_queue functions 2018-07-09 13:15:34 -07:00
netcp_ethss.c net: ethernet: ti: fix possible object reference leak 2019-05-04 09:20:19 +02:00
netcp_sgmii.c
netcp_xgbepcsr.c
netcp.h net: netcp: add api to support set rx mode in netcp modules 2018-04-18 21:00:57 -04:00
tlan.c net: tlan: Mark expected switch fall-through 2018-08-07 17:54:21 -07:00
tlan.h