From 75d28899e3e93b8fed241744c6687f9606310f72 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 21 Mar 2023 18:25:54 +0100 Subject: net: phy: Synchronize PHY interface modes with Linux Synchronize PHY interface modes with Linux next 6.2.y commit: 0194b64578e90 ("net: phy: improve phy_read_poll_timeout") Retain LX2160A/LX2162A PHY modes as those are not yet supported by the Linux kernel, but isolate those with ifdeffery. Isolate NCSI which are also not supported by Linux kernel. Note that the ifdeffery cannot be avoided with IS_ENABLED() here due to compilation of the entire conditional, which would fail in case NCSI symbols are not available. Signed-off-by: Marek Vasut Reviewed-by: Ramon Fried --- drivers/net/phy/phy.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/net/phy') diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 9b0e497..f720d0a 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1160,7 +1160,11 @@ int phy_clear_bits_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val bool phy_interface_is_ncsi(void) { +#ifdef CONFIG_PHY_NCSI struct eth_pdata *pdata = dev_get_plat(eth_get_dev()); return pdata->phy_interface == PHY_INTERFACE_MODE_NCSI; +#else + return 0; +#endif } -- cgit v1.1