Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Unable to read status (-5) #27

Open
yegorich opened this issue May 3, 2023 · 8 comments
Open

ERROR: Unable to read status (-5) #27

yegorich opened this issue May 3, 2023 · 8 comments

Comments

@yegorich
Copy link
Contributor

yegorich commented May 3, 2023

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
Copy link
Contributor Author

yegorich commented May 3, 2023

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

@wkz
Copy link
Owner

wkz commented May 3, 2023

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?

@yegorich
Copy link
Contributor Author

yegorich commented May 3, 2023

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?

@wkz
Copy link
Owner

wkz commented May 5, 2023

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

@yegorich
Copy link
Contributor Author

yegorich commented May 5, 2023

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.

@wkz
Copy link
Owner

wkz commented May 5, 2023

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.

@yegorich
Copy link
Contributor Author

yegorich commented May 8, 2023

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

@vredzhepov
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants