Open romatou18 opened 3 years ago
In this specific case, older version of of_get_phy_mode() returned both error code (as negative value) or interface index (as positive value), while the new version returns strictly error code, and writes interface index into &interface address. So change it to:
interface = of_get_phy_mode(np); if (-ENODEV == interface) ... /* not found */
But obviously this patch is not based on mainline 5.4 so there are several occurrences of incompatibility which should be resolved manually.
Hi, While patching an imx8 Zeus yocto Kernel v5.4.7, found that in fec_main.c in kernel/drivers/net/ethernet/freescale The following function has 2 arguments being passed instead of one: static inline int of_get_phy_mode()
fec_main.c call: https://github.com/Microchip-Ethernet/EVB-KSZ9477/blob/c9adfa73042758d643a2e26fc3f29b994d5c9b97/KSZ/linux-drivers/ksz9897/linux-5.4/drivers/net/ethernet/freescale/fec_main.c#L4875
Function definition in kernel 5.4.7: https://elixir.bootlin.com/linux/v5.4.70/source/include/linux/of_net.h#L13
I just fixed this by removing the extra argument, however this just shows that the v5.4 ksz9897 patch or the imx 5.4 patch (identical in this repo), are probably out of sync with kernel source v5.4.x.
Kind Regards
Romain Firmware Engineer