Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: mxl-gpy: fill in possible_interfaces for GPY21x chipset

Fill in the possible_interfaces member.
GPY21x phys support the SGMII and 2500base-X interfaces

Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
Link: https://lore.kernel.org/r/20240216054435.22380-1-Raju.Lakkaraju@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Raju Lakkaraju and committed by
Jakub Kicinski
59f95f5d ca61ba38

+14 -6
+14 -6
drivers/net/phy/mxl-gpy.c
··· 274 274 return ret < 0 ? ret : 0; 275 275 } 276 276 277 + static int gpy21x_config_init(struct phy_device *phydev) 278 + { 279 + __set_bit(PHY_INTERFACE_MODE_2500BASEX, phydev->possible_interfaces); 280 + __set_bit(PHY_INTERFACE_MODE_SGMII, phydev->possible_interfaces); 281 + 282 + return gpy_config_init(phydev); 283 + } 284 + 277 285 static int gpy_probe(struct phy_device *phydev) 278 286 { 279 287 struct device *dev = &phydev->mdio.dev; ··· 875 867 .phy_id_mask = PHY_ID_GPY21xB_MASK, 876 868 .name = "Maxlinear Ethernet GPY211B", 877 869 .get_features = genphy_c45_pma_read_abilities, 878 - .config_init = gpy_config_init, 870 + .config_init = gpy21x_config_init, 879 871 .probe = gpy_probe, 880 872 .suspend = genphy_suspend, 881 873 .resume = genphy_resume, ··· 892 884 PHY_ID_MATCH_MODEL(PHY_ID_GPY211C), 893 885 .name = "Maxlinear Ethernet GPY211C", 894 886 .get_features = genphy_c45_pma_read_abilities, 895 - .config_init = gpy_config_init, 887 + .config_init = gpy21x_config_init, 896 888 .probe = gpy_probe, 897 889 .suspend = genphy_suspend, 898 890 .resume = genphy_resume, ··· 910 902 .phy_id_mask = PHY_ID_GPY21xB_MASK, 911 903 .name = "Maxlinear Ethernet GPY212B", 912 904 .get_features = genphy_c45_pma_read_abilities, 913 - .config_init = gpy_config_init, 905 + .config_init = gpy21x_config_init, 914 906 .probe = gpy_probe, 915 907 .suspend = genphy_suspend, 916 908 .resume = genphy_resume, ··· 927 919 PHY_ID_MATCH_MODEL(PHY_ID_GPY212C), 928 920 .name = "Maxlinear Ethernet GPY212C", 929 921 .get_features = genphy_c45_pma_read_abilities, 930 - .config_init = gpy_config_init, 922 + .config_init = gpy21x_config_init, 931 923 .probe = gpy_probe, 932 924 .suspend = genphy_suspend, 933 925 .resume = genphy_resume, ··· 945 937 .phy_id_mask = PHY_ID_GPYx15B_MASK, 946 938 .name = "Maxlinear Ethernet GPY215B", 947 939 .get_features = genphy_c45_pma_read_abilities, 948 - .config_init = gpy_config_init, 940 + .config_init = gpy21x_config_init, 949 941 .probe = gpy_probe, 950 942 .suspend = genphy_suspend, 951 943 .resume = genphy_resume, ··· 962 954 PHY_ID_MATCH_MODEL(PHY_ID_GPY215C), 963 955 .name = "Maxlinear Ethernet GPY215C", 964 956 .get_features = genphy_c45_pma_read_abilities, 965 - .config_init = gpy_config_init, 957 + .config_init = gpy21x_config_init, 966 958 .probe = gpy_probe, 967 959 .suspend = genphy_suspend, 968 960 .resume = genphy_resume,