The source code is not compatible to Linux kernel 5.4.3 used in LSDK 20.04. I needed the following changes for compilation:
--- a/dpaa_eth_im.c
+++ b/dpaa_eth_im.c
@@ -753,6 +753,7 @@ static int init_phy(struct net_device *dev)
{
struct fm_im_private* priv = netdev_priv(dev);
u32 supported;
+ u32 tmp_mask_legacy;
priv->oldlink = 0;
priv->oldspeed = 0;
@@ -774,8 +775,14 @@ static int init_phy(struct net_device *dev)
}
/* Remove any features not supported by the controller */
- priv->phydev->supported &= supported;
- priv->phydev->advertising = priv->phydev->supported;
+ ethtool_convert_link_mode_to_legacy_u32(&tmp_mask_legacy,
+ priv->phydev->supported);
+ tmp_mask_legacy &= supported;
+ ethtool_convert_legacy_u32_to_link_mode(priv->phydev->supported,
+ tmp_mask_legacy);
+
+ ethtool_convert_legacy_u32_to_link_mode(priv->phydev->advertising,
+ supported);
return 0;
}
Haven't tested it yet.
Are you sure that the module is compatible with LSDK 20.04? Git metadata suggests that it was written for LSDK 19.06.