We use LSDK v2.0 17.03 and 20.04 on an LS1046A based platform. We would like to enable Ethernet "Independent Mode" (IM) which is supported according to LSDKUG_Rev20.04_290520. There is also some source code pointing to IM support in the Linux kernel, e.g. drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_im.c.
However, we do not see any way to enable this mode (e.g. via device tree). We also have no idea how to obtain the source code for the mentioned "dpaa_eth_im.ko" kernel module.
How can we enable the Ethernet Independent Mode in Linux and/or where can the "dpaa_eth_im.ko" source code be found?
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.