Re: Ethernet device with shared mdio

From: Milan Obuch <freebsd-net_at_dino.sk>
Date: Fri, 13 Sep 2024 14:13:32 UTC
On Fri, 13 Sep 2024 13:40:55 +0000
Mike Belanger <mibelanger@blackberry.com> wrote:

> Thank you for the response and for sharing your scenario.
> 
> We’ve also hacked up the cgem and the ffec driver to support a shared
> mdio. That was not too difficult, but we have a new scenario where
> the mdio is now being shared between two different devices that use
> different drivers (ffec and eqos). This presents a few extra
> challenges.

Could you elaborate a bit more? Are your hacks published somewhere or
could you share?

> I was hoping that FreeBSD may have considered supporting a shared
> mdio. We can come up with something, but if there is an existing
> architecture/approach in the works…we would like to use a consistent
> approach. At first glance, miiproxy did not seem like a fit.

I don't know anything specific. I think I saw some DTBs with shared
MDIO, but did not analysed the details. And miiproxy was just possible
solution for the case, where MDIO controller is being initialised after
MII controller (which was my case), but I did use some hacks for proof
of concept.

> I do not have the hardware. I am trying to help somebody else with
> this. I have seen the dtb. It’s a Variscite DAR-MX8M-PLUS.

OK, this makes the development a bit slower :)

Regards,
Milan