@@ -537,12 +537,6 @@ static int aqcs109_config_init(struct phy_device *phydev)
537537 if (!ret )
538538 aqr107_chip_info (phydev );
539539
540- /* AQCS109 belongs to a chip family partially supporting 10G and 5G.
541- * PMA speed ability bits are the same for all members of the family,
542- * AQCS109 however supports speeds up to 2.5G only.
543- */
544- phy_set_max_speed (phydev , SPEED_2500 );
545-
546540 return aqr107_set_downshift (phydev , MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT );
547541}
548542
@@ -744,6 +738,18 @@ static int aqr115c_get_features(struct phy_device *phydev)
744738 return 0 ;
745739}
746740
741+ static int aqr111_get_features (struct phy_device * phydev )
742+ {
743+ /* PHY supports speeds up to 5G with autoneg. PMA capabilities
744+ * are not useful.
745+ */
746+ aqr115c_get_features (phydev );
747+ linkmode_set_bit (ETHTOOL_LINK_MODE_5000baseT_Full_BIT ,
748+ phydev -> supported );
749+
750+ return 0 ;
751+ }
752+
747753static int aqr113c_config_init (struct phy_device * phydev )
748754{
749755 int ret ;
@@ -780,15 +786,6 @@ static int aqr107_probe(struct phy_device *phydev)
780786 return aqr_hwmon_probe (phydev );
781787}
782788
783- static int aqr111_config_init (struct phy_device * phydev )
784- {
785- /* AQR111 reports supporting speed up to 10G,
786- * however only speeds up to 5G are supported.
787- */
788- phy_set_max_speed (phydev , SPEED_5000 );
789-
790- return aqr107_config_init (phydev );
791- }
792789
793790static struct phy_driver aqr_driver [] = {
794791{
@@ -866,6 +863,7 @@ static struct phy_driver aqr_driver[] = {
866863 .get_sset_count = aqr107_get_sset_count ,
867864 .get_strings = aqr107_get_strings ,
868865 .get_stats = aqr107_get_stats ,
866+ .get_features = aqr115c_get_features ,
869867 .link_change_notify = aqr107_link_change_notify ,
870868 .led_brightness_set = aqr_phy_led_brightness_set ,
871869 .led_hw_is_supported = aqr_phy_led_hw_is_supported ,
@@ -878,7 +876,7 @@ static struct phy_driver aqr_driver[] = {
878876 .name = "Aquantia AQR111" ,
879877 .probe = aqr107_probe ,
880878 .get_rate_matching = aqr107_get_rate_matching ,
881- .config_init = aqr111_config_init ,
879+ .config_init = aqr107_config_init ,
882880 .config_aneg = aqr_config_aneg ,
883881 .config_intr = aqr_config_intr ,
884882 .handle_interrupt = aqr_handle_interrupt ,
@@ -890,6 +888,7 @@ static struct phy_driver aqr_driver[] = {
890888 .get_sset_count = aqr107_get_sset_count ,
891889 .get_strings = aqr107_get_strings ,
892890 .get_stats = aqr107_get_stats ,
891+ .get_features = aqr111_get_features ,
893892 .link_change_notify = aqr107_link_change_notify ,
894893 .led_brightness_set = aqr_phy_led_brightness_set ,
895894 .led_hw_is_supported = aqr_phy_led_hw_is_supported ,
@@ -902,7 +901,7 @@ static struct phy_driver aqr_driver[] = {
902901 .name = "Aquantia AQR111B0" ,
903902 .probe = aqr107_probe ,
904903 .get_rate_matching = aqr107_get_rate_matching ,
905- .config_init = aqr111_config_init ,
904+ .config_init = aqr107_config_init ,
906905 .config_aneg = aqr_config_aneg ,
907906 .config_intr = aqr_config_intr ,
908907 .handle_interrupt = aqr_handle_interrupt ,
@@ -914,6 +913,7 @@ static struct phy_driver aqr_driver[] = {
914913 .get_sset_count = aqr107_get_sset_count ,
915914 .get_strings = aqr107_get_strings ,
916915 .get_stats = aqr107_get_stats ,
916+ .get_features = aqr111_get_features ,
917917 .link_change_notify = aqr107_link_change_notify ,
918918 .led_brightness_set = aqr_phy_led_brightness_set ,
919919 .led_hw_is_supported = aqr_phy_led_hw_is_supported ,
@@ -1023,7 +1023,7 @@ static struct phy_driver aqr_driver[] = {
10231023 .name = "Aquantia AQR114C" ,
10241024 .probe = aqr107_probe ,
10251025 .get_rate_matching = aqr107_get_rate_matching ,
1026- .config_init = aqr111_config_init ,
1026+ .config_init = aqr107_config_init ,
10271027 .config_aneg = aqr_config_aneg ,
10281028 .config_intr = aqr_config_intr ,
10291029 .handle_interrupt = aqr_handle_interrupt ,
@@ -1035,6 +1035,7 @@ static struct phy_driver aqr_driver[] = {
10351035 .get_sset_count = aqr107_get_sset_count ,
10361036 .get_strings = aqr107_get_strings ,
10371037 .get_stats = aqr107_get_stats ,
1038+ .get_features = aqr111_get_features ,
10381039 .link_change_notify = aqr107_link_change_notify ,
10391040 .led_brightness_set = aqr_phy_led_brightness_set ,
10401041 .led_hw_is_supported = aqr_phy_led_hw_is_supported ,
0 commit comments