mdio-tools icon indicating copy to clipboard operation
mdio-tools copied to clipboard

ERROR: Unable to read status (-5)

Open yegorich opened this issue 2 years ago • 8 comments

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?

yegorich avatar May 03 '23 14:05 yegorich

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)
      |      ^~~~~~~~~~~~~~

yegorich avatar May 03 '23 14:05 yegorich

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?

wkz avatar May 03 '23 20:05 wkz

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?

yegorich avatar May 03 '23 20:05 yegorich

No plans for a library at this time. What is your use-case for that?

wkz avatar May 05 '23 06:05 wkz

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.

yegorich avatar May 05 '23 07:05 yegorich

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.

wkz avatar May 05 '23 20:05 wkz

I have an IP175D IC. There are some non-DSA implementations in OpenWrt and this one.

yegorich avatar May 08 '23 10:05 yegorich

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)

vredzhepov avatar Jul 11 '23 17:07 vredzhepov