@@ -537,12 +537,6 @@ static int aqcs109_config_init(struct phy_device *phydev)
537
537
if (!ret )
538
538
aqr107_chip_info (phydev );
539
539
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
-
546
540
return aqr107_set_downshift (phydev , MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT );
547
541
}
548
542
@@ -731,6 +725,31 @@ static int aqr113c_fill_interface_modes(struct phy_device *phydev)
731
725
return aqr107_fill_interface_modes (phydev );
732
726
}
733
727
728
+ static int aqr115c_get_features (struct phy_device * phydev )
729
+ {
730
+ unsigned long * supported = phydev -> supported ;
731
+
732
+ /* PHY supports speeds up to 2.5G with autoneg. PMA capabilities
733
+ * are not useful.
734
+ */
735
+ linkmode_or (supported , supported , phy_gbit_features );
736
+ linkmode_set_bit (ETHTOOL_LINK_MODE_2500baseT_Full_BIT , supported );
737
+
738
+ return 0 ;
739
+ }
740
+
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
+
734
753
static int aqr113c_config_init (struct phy_device * phydev )
735
754
{
736
755
int ret ;
@@ -767,15 +786,6 @@ static int aqr107_probe(struct phy_device *phydev)
767
786
return aqr_hwmon_probe (phydev );
768
787
}
769
788
770
- static int aqr111_config_init (struct phy_device * phydev )
771
- {
772
- /* AQR111 reports supporting speed up to 10G,
773
- * however only speeds up to 5G are supported.
774
- */
775
- phy_set_max_speed (phydev , SPEED_5000 );
776
-
777
- return aqr107_config_init (phydev );
778
- }
779
789
780
790
static struct phy_driver aqr_driver [] = {
781
791
{
@@ -853,6 +863,7 @@ static struct phy_driver aqr_driver[] = {
853
863
.get_sset_count = aqr107_get_sset_count ,
854
864
.get_strings = aqr107_get_strings ,
855
865
.get_stats = aqr107_get_stats ,
866
+ .get_features = aqr115c_get_features ,
856
867
.link_change_notify = aqr107_link_change_notify ,
857
868
.led_brightness_set = aqr_phy_led_brightness_set ,
858
869
.led_hw_is_supported = aqr_phy_led_hw_is_supported ,
@@ -865,7 +876,7 @@ static struct phy_driver aqr_driver[] = {
865
876
.name = "Aquantia AQR111" ,
866
877
.probe = aqr107_probe ,
867
878
.get_rate_matching = aqr107_get_rate_matching ,
868
- .config_init = aqr111_config_init ,
879
+ .config_init = aqr107_config_init ,
869
880
.config_aneg = aqr_config_aneg ,
870
881
.config_intr = aqr_config_intr ,
871
882
.handle_interrupt = aqr_handle_interrupt ,
@@ -877,6 +888,7 @@ static struct phy_driver aqr_driver[] = {
877
888
.get_sset_count = aqr107_get_sset_count ,
878
889
.get_strings = aqr107_get_strings ,
879
890
.get_stats = aqr107_get_stats ,
891
+ .get_features = aqr111_get_features ,
880
892
.link_change_notify = aqr107_link_change_notify ,
881
893
.led_brightness_set = aqr_phy_led_brightness_set ,
882
894
.led_hw_is_supported = aqr_phy_led_hw_is_supported ,
@@ -889,7 +901,7 @@ static struct phy_driver aqr_driver[] = {
889
901
.name = "Aquantia AQR111B0" ,
890
902
.probe = aqr107_probe ,
891
903
.get_rate_matching = aqr107_get_rate_matching ,
892
- .config_init = aqr111_config_init ,
904
+ .config_init = aqr107_config_init ,
893
905
.config_aneg = aqr_config_aneg ,
894
906
.config_intr = aqr_config_intr ,
895
907
.handle_interrupt = aqr_handle_interrupt ,
@@ -901,6 +913,7 @@ static struct phy_driver aqr_driver[] = {
901
913
.get_sset_count = aqr107_get_sset_count ,
902
914
.get_strings = aqr107_get_strings ,
903
915
.get_stats = aqr107_get_stats ,
916
+ .get_features = aqr111_get_features ,
904
917
.link_change_notify = aqr107_link_change_notify ,
905
918
.led_brightness_set = aqr_phy_led_brightness_set ,
906
919
.led_hw_is_supported = aqr_phy_led_hw_is_supported ,
@@ -1010,7 +1023,7 @@ static struct phy_driver aqr_driver[] = {
1010
1023
.name = "Aquantia AQR114C" ,
1011
1024
.probe = aqr107_probe ,
1012
1025
.get_rate_matching = aqr107_get_rate_matching ,
1013
- .config_init = aqr111_config_init ,
1026
+ .config_init = aqr107_config_init ,
1014
1027
.config_aneg = aqr_config_aneg ,
1015
1028
.config_intr = aqr_config_intr ,
1016
1029
.handle_interrupt = aqr_handle_interrupt ,
@@ -1022,6 +1035,7 @@ static struct phy_driver aqr_driver[] = {
1022
1035
.get_sset_count = aqr107_get_sset_count ,
1023
1036
.get_strings = aqr107_get_strings ,
1024
1037
.get_stats = aqr107_get_stats ,
1038
+ .get_features = aqr111_get_features ,
1025
1039
.link_change_notify = aqr107_link_change_notify ,
1026
1040
.led_brightness_set = aqr_phy_led_brightness_set ,
1027
1041
.led_hw_is_supported = aqr_phy_led_hw_is_supported ,
@@ -1046,6 +1060,7 @@ static struct phy_driver aqr_driver[] = {
1046
1060
.get_sset_count = aqr107_get_sset_count ,
1047
1061
.get_strings = aqr107_get_strings ,
1048
1062
.get_stats = aqr107_get_stats ,
1063
+ .get_features = aqr115c_get_features ,
1049
1064
.link_change_notify = aqr107_link_change_notify ,
1050
1065
.led_brightness_set = aqr_phy_led_brightness_set ,
1051
1066
.led_hw_is_supported = aqr_phy_led_hw_is_supported ,
0 commit comments