Skip to content

Commit 9dbdfd4

Browse files
sean-anderson-secokuba-moo
authored andcommitted
net: dpaa: Fix <1G ethernet on LS1046ARDB
As discussed in commit 73a21fa ("dpaa_eth: support all modes with rate adapting PHYs"), we must add a workaround for Aquantia phys with in-tree support in order to keep 1G support working. Update this workaround for the AQR113C phy found on revision C LS1046ARDB boards. Fixes: 12cf1b8 ("net: phy: Add support for AQR113C EPHY") Signed-off-by: Sean Anderson <[email protected]> Acked-by: Camelia Groza <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 4c2d0b0 commit 9dbdfd4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2886,13 +2886,15 @@ static void dpaa_adjust_link(struct net_device *net_dev)
28862886

28872887
/* The Aquantia PHYs are capable of performing rate adaptation */
28882888
#define PHY_VEND_AQUANTIA 0x03a1b400
2889+
#define PHY_VEND_AQUANTIA2 0x31c31c00
28892890

28902891
static int dpaa_phy_init(struct net_device *net_dev)
28912892
{
28922893
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
28932894
struct mac_device *mac_dev;
28942895
struct phy_device *phy_dev;
28952896
struct dpaa_priv *priv;
2897+
u32 phy_vendor;
28962898

28972899
priv = netdev_priv(net_dev);
28982900
mac_dev = priv->mac_dev;
@@ -2905,9 +2907,11 @@ static int dpaa_phy_init(struct net_device *net_dev)
29052907
return -ENODEV;
29062908
}
29072909

2910+
phy_vendor = phy_dev->drv->phy_id & GENMASK(31, 10);
29082911
/* Unless the PHY is capable of rate adaptation */
29092912
if (mac_dev->phy_if != PHY_INTERFACE_MODE_XGMII ||
2910-
((phy_dev->drv->phy_id & GENMASK(31, 10)) != PHY_VEND_AQUANTIA)) {
2913+
(phy_vendor != PHY_VEND_AQUANTIA &&
2914+
phy_vendor != PHY_VEND_AQUANTIA2)) {
29112915
/* remove any features not supported by the controller */
29122916
ethtool_convert_legacy_u32_to_link_mode(mask,
29132917
mac_dev->if_support);

0 commit comments

Comments
 (0)