1
0
Fork 0
alistair23-linux/drivers/net/ethernet/ti
Grygorii Strashko c076e11985 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:16:14 +01:00
..
Kconfig net: ethernet: ti: Add dependency for TI_DAVINCI_EMAC 2019-12-31 16:45:24 +01:00
Makefile net: ethernet: ti: netcp_ethss: fix build 2019-05-13 09:56:05 -07:00
cpmac.c net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
cpsw-common.c net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
cpsw-phy-sel.c bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
cpsw.c net: ethernet: ti: cpsw: fix error return code in cpsw_probe() 2020-11-24 13:28:57 +01:00
cpsw.h net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
cpsw_ale.c net: ethernet: ti: ale: clean ale tbl on init and intf restart 2019-12-31 16:45:42 +01:00
cpsw_ale.h net: ethernet: ti: cpsw: fix allmulti cfg in dual_mac mode 2019-04-27 17:11:49 -04:00
cpsw_ethtool.c net: ethernet: ti: cpsw: add XDP support 2019-07-08 14:58:04 -07:00
cpsw_priv.c net: ethernet: ti: cpsw: switch to use mac sl api 2019-04-27 17:11:49 -04:00
cpsw_priv.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
cpsw_sl.c net: ethernet: ti: cpsw: introduce mac sl module api 2019-04-27 17:11:49 -04:00
cpsw_sl.h net: ethernet: ti: cpsw: introduce mac sl module api 2019-04-27 17:11:49 -04:00
cpts.c net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered 2021-01-12 20:16:14 +01:00
cpts.h net: ethernet: ti: cpts: add support for ext rftclk selection 2019-06-09 12:53:06 -07:00
davinci_cpdma.c net: ethernet: ti: davinci_cpdma: fix warning "device driver frees DMA memory with different size" 2019-12-31 16:41:44 +01:00
davinci_cpdma.h net: ethernet: ti: davinci_cpdma: allow desc split while down 2019-07-08 14:58:04 -07:00
davinci_emac.c Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
davinci_mdio.c drivers: net: davinci_mdio: fix potential NULL dereference in davinci_mdio_probe() 2020-06-22 09:31:02 +02:00
netcp.h net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
netcp_core.c net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
netcp_ethss.c net: ethernet: ti: netcp_ethss: add support for child cpts node 2019-06-09 12:53:06 -07:00
netcp_sgmii.c net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
netcp_xgbepcsr.c net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
tlan.c ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
tlan.h