ERROR: Unable to read status (-5)
I'm running mdio command on a TI's AM335x (BeagleBone-like) machine with kernel 6.1.27:
# mdio
[ 42.970370] mdio_netlink: loading out-of-tree module taints kernel.
4a101000.mdio
fixed-0
# mdio 4*
ERROR: Unable to read status (-5)
Are there any special requirements for the kernel and network chip features?
I also get the following compiler (GCC 12.2.0) notice:
mdio.c: In function ‘mdio_prog_push’:
mdio.c:283:6: note: parameter passing for argument of type ‘struct mdio_nl_insn’ changed in GCC 9.1
283 | void mdio_prog_push(struct mdio_prog *prog, struct mdio_nl_insn insn)
| ^~~~~~~~~~~~~~
I believe some MDIO controllers will report an error when trying to address a non-existing PHY. What happens if you try to read the status of a single PHY attached to the bus, rather than probing all addresses?
Reading the status of a single PHY is working. Thanks. Are you planing to also make a library so that the users can link it to their programs?
Any news about the upstream status of this patch?
No plans for a library at this time. What is your use-case for that?
I could use such functionality for the production tests. For a switch chip, we still need to read/write certain registers (port enable/disable) as the chip is still not supported via DSA.
But one can, of course, use the kernel API directly. Hence, I am looking forward for the patch being upstreamed.
What kind of ASIC is it?
I'd be happy to add an addressing mode for it - then you could update the required registers by execing mdio from your prod test scripts.
I have an IP175D IC. There are some non-DSA implementations in OpenWrt and this one.
I've the same issue on a BeagleBone Black single board computer, kernel version 6.1.33
# mdio
[ 173.833227] mdio_netlink: loading out-of-tree module taints kernel.
4a101000.mdio
fixed-0
# mdio 4a101000.mdio
ERROR: Unable to read status (-5)