According to upsteam commit ce64c1f77a9d("net: phy:
aquantia: add USXGMII support and warn if XGMII mode is set ").
When using aquantia phy(e.g AQR107), it needs to support
usxgmii interface mode in network driver.

Signed-off-by: Meng Li <[email protected]>
---
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c    | 3 ++-
 drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c | 3 ++-
 drivers/net/ethernet/freescale/sdk_dpaa/mac.c     | 2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c 
b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 685d2d8a3b36..199e2cf0334e 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2931,7 +2931,8 @@ static int dpaa_phy_init(struct net_device *net_dev)
        }
 
        /* Unless the PHY is capable of rate adaptation */
-       if (mac_dev->phy_if != PHY_INTERFACE_MODE_XGMII ||
+       if ((mac_dev->phy_if != PHY_INTERFACE_MODE_XGMII &&
+               mac_dev->phy_if != PHY_INTERFACE_MODE_USXGMII) ||
            ((phy_dev->drv->phy_id & GENMASK(31, 10)) != PHY_VEND_AQUANTIA)) {
                /* remove any features not supported by the controller */
                ethtool_convert_legacy_u32_to_link_mode(mask,
diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c 
b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
index 2f7c52ecdeeb..6833fe060f3c 100644
--- a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
@@ -546,7 +546,8 @@ static int memac_init_phy(struct net_device *net_dev,
        }
 
        /* Unless the PHY is capable of rate adaptation */
-       if (mac_dev->phy_if != PHY_INTERFACE_MODE_XGMII ||
+       if ((mac_dev->phy_if != PHY_INTERFACE_MODE_XGMII &&
+               mac_dev->phy_if != PHY_INTERFACE_MODE_USXGMII) ||
            ((phy_dev->drv->phy_id & GENMASK(31, 10)) != PHY_VEND_AQUANTIA)) {
                /* Remove any features not supported by the controller */
                ethtool_convert_legacy_u32_to_link_mode(mask,
diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac.c 
b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c
index 41c0605e10df..67764a70e292 100644
--- a/drivers/net/ethernet/freescale/sdk_dpaa/mac.c
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c
@@ -77,6 +77,7 @@ static const char phy_str[][11] = {
        [PHY_INTERFACE_MODE_RTBI]       = "rtbi",
        [PHY_INTERFACE_MODE_XGMII]      = "xgmii",
        [PHY_INTERFACE_MODE_2500BASEX] = "sgmii-2500",
+       [PHY_INTERFACE_MODE_USXGMII]    = "usxgmii",
 };
 
 static phy_interface_t __pure __attribute__((nonnull)) str2phy(const char *str)
@@ -104,6 +105,7 @@ static const uint16_t phy2speed[] = {
        [PHY_INTERFACE_MODE_RTBI]       = SPEED_1000,
        [PHY_INTERFACE_MODE_XGMII]      = SPEED_10000,
        [PHY_INTERFACE_MODE_2500BASEX] = SPEED_2500,
+       [PHY_INTERFACE_MODE_USXGMII]    = SPEED_10000,
 };
 
 static struct mac_device * __cold
-- 
2.35.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11244): 
https://lists.yoctoproject.org/g/linux-yocto/message/11244
Mute This Topic: https://lists.yoctoproject.org/mt/90680487/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to