Add .inband_caps function that enforce In Band for USXGMII. With further test it was discovered that the PHY always require In-Band for USXGMII. Signed-off-by: Christian Marangi --- drivers/net/phy/as21xxx.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/phy/as21xxx.c b/drivers/net/phy/as21xxx.c index a6686b4908c6..1b69c2fabc1d 100644 --- a/drivers/net/phy/as21xxx.c +++ b/drivers/net/phy/as21xxx.c @@ -967,6 +967,15 @@ static int as21xxx_match_phy_device(struct phy_device *phydev, return ret; } +static unsigned int as21xxx_inband_caps(struct phy_device *phydev, + phy_interface_t interface) +{ + if (interface == PHY_INTERFACE_MODE_USXGMII) + return LINK_INBAND_ENABLE; + + return 0; +} + static struct phy_driver as21xxx_drivers[] = { { /* PHY expose in C45 as 0x7500 0x9410 @@ -982,6 +991,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21011JB1), .name = "Aeonsemi AS21011JB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -994,6 +1004,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21011PB1), .name = "Aeonsemi AS21011PB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -1006,6 +1017,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21010PB1), .name = "Aeonsemi AS21010PB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -1018,6 +1030,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21010JB1), .name = "Aeonsemi AS21010JB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -1030,6 +1043,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21210PB1), .name = "Aeonsemi AS21210PB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -1042,6 +1056,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21510JB1), .name = "Aeonsemi AS21510JB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -1054,6 +1069,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21510PB1), .name = "Aeonsemi AS21510PB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -1066,6 +1082,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21511JB1), .name = "Aeonsemi AS21511JB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -1078,6 +1095,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21210JB1), .name = "Aeonsemi AS21210JB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, @@ -1090,6 +1108,7 @@ static struct phy_driver as21xxx_drivers[] = { PHY_ID_MATCH_EXACT(PHY_ID_AS21511PB1), .name = "Aeonsemi AS21511PB1", .probe = as21xxx_probe, + .inband_caps = as21xxx_inband_caps, .match_phy_device = as21xxx_match_phy_device, .read_status = as21xxx_read_status, .led_brightness_set = as21xxx_led_brightness_set, -- 2.53.0