Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 May 2025 19:35:17 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        freebsd-net@freebsd.org
Subject:   Re: ixgbe, mdio, and marvell ethernet switches
Message-ID:  <CAJ-VmokBQ0HmX8fRWf_1%2BMRGF4C7DrDPD%2B3Z6LUMw6gC8t-L1g@mail.gmail.com>
In-Reply-To: <CAJ-VmonZS--HHpHS4jZ_HFevgKGca=18byQLXcKn0Z5gDeU2Mg@mail.gmail.com>
References:  <CAJ-VmonZS--HHpHS4jZ_HFevgKGca=18byQLXcKn0Z5gDeU2Mg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi! Update!

On Sun, 27 Apr 2025 at 21:00, Adrian Chadd <adrian@freebsd.org> wrote:

> A few weeks ago I started poking at some netgate hardware to use as
> freebsd wifi test boxes in my little test lab here. The two I'm using are
> ADI (now Silicom) boxes that needed some fun deep dives into BIOS versions,
> interrupt storms and compatible mini-PCIe cards (some just don't actually
> get probed!)
>
> [snip]


>
> Anyway, on the etherswitch side I did a bunch of cleanup to support
> etherswitch/miiproxy/e6000sw as modules, and fix a bunch of e6000sw bugs,
> and they're in -HEAD:
>
> * https://reviews.freebsd.org/D50024 to https://reviews.freebsd.org/D50031
> are all cleanups
> * https://reviews.freebsd.org/D50044 adds the 88E6190X support
>

Those are in -HEAD now!

>
> But then the next fun problem - none of the ports came up. Well, I lie.
> Only one of them came up. I went digging into the PHY registers and found
> that the marvell gige PHY code didn't actually power up the PHY if it was
> powered down, so I fixed that too:
>
> * https://reviews.freebsd.org/D50045
>

This is in -HEAD now!


>
> Then with some hints, I could see and use all of the switch ports on the
> AT&T ATT-150 CPE device:
>
> hint.mdio.0.at="ix0"
> hint.e6000sw.0.addr="0x10"
> hint.e6000sw.0.port0disabled="1"
> hint.e6000sw.0.is6190x=1
> hint.e6000sw.0.port9cpu=1
> hint.e6000sw.0.port10cpu=1
> hint.e6000sw.0.port9speed=2500
> hint.e6000sw.0.port10speed=2500
>
> Then, I also acquired a wireguard M270 box, as it also apprently has a
> marvell switch attached to an X553 backplane, and none of the ethernet
> ports work at all out of the box.
> The above hints worked on that too - with addr set to "0x0" instead of
> "0x10".
>
> So, now i have two Atom C3558 boxes w/ X553 2.5gbit backplane ports hooked
> into an 8 port marvell gige switch working on -HEAD (save the ixgbe mdio
> diff that I attached; I'll sort that out soon). All it took was like $250
> in hardware, staring at intel documentation and linux/dpdk driver code, and
> three evenings thinking to myself "surely this can't be THAT hard.
>

https://reviews.freebsd.org/D50127 adds MDIO/MII support for the x553 bits
if there's an external PHY for some reason, and
https://reviews.freebsd.org/D50128 adds the if_ix MDIO bus. It's all
preliminary, but it works, and if for some reason I forget to land it / get
distracted by real life, all of the moving pieces are now available and
public.

I'm hoping to clean up D50128 enough next week to get it into -HEAD (with
the intel maintainers blessings of course) and then add some wiki
documentation for the two switch platforms I have that use it. I hear
there's some netgate boxes that also use this switch but I don't have the
hardware to play with.

-adrian

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr">Hi! Update!</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, 27 Apr 2025 at 21:00, Adrian Chadd &lt;<a href="mailto:adrian@freebsd.org">adrian@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>A few weeks ago I started poking at some netgate hardware to use as freebsd wifi test boxes in my little test lab here. The two I&#39;m using are ADI (now Silicom) boxes that needed some fun deep dives into BIOS versions, interrupt storms and compatible mini-PCIe cards (some just don&#39;t actually get probed!)</div><div><br></div></div></blockquote><div>[snip]</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>Anyway, on the etherswitch side I did a bunch of cleanup to support etherswitch/miiproxy/e6000sw as modules, and fix a bunch of e6000sw bugs, and they&#39;re in -HEAD:</div><div><br></div><div>* <a href="https://reviews.freebsd.org/D50024" target="_blank">https://reviews.freebsd.org/D50024</a>; to <a href="https://reviews.freebsd.org/D50031" target="_blank">https://reviews.freebsd.org/D50031</a>; are all cleanups</div><div>* <a href="https://reviews.freebsd.org/D50044" target="_blank">https://reviews.freebsd.org/D50044</a>; adds the 88E6190X support</div></div></blockquote><div><br></div><div>Those are in -HEAD now! <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>But then the next fun problem - none of the ports came up. Well, I lie. Only one of them came up. I went digging into the PHY registers and found that the marvell gige PHY code didn&#39;t actually power up the PHY if it was powered down, so I fixed that too:</div><div><br></div><div>* <a href="https://reviews.freebsd.org/D50045" target="_blank">https://reviews.freebsd.org/D50045</a></div></div></blockquote><div><br></div><div>This is in -HEAD now!</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Then with some hints, I could see and use all of the switch ports on the AT&amp;T ATT-150 CPE device:</div><div><br></div><div><a href="http://hint.mdio.0.at" target="_blank">hint.mdio.0.at</a>=&quot;ix0&quot;<br>hint.e6000sw.0.addr=&quot;0x10&quot;</div><div>hint.e6000sw.0.port0disabled=&quot;1&quot;</div><div>hint.e6000sw.0.is6190x=1<br>hint.e6000sw.0.port9cpu=1<br>hint.e6000sw.0.port10cpu=1<br>hint.e6000sw.0.port9speed=2500<br>hint.e6000sw.0.port10speed=2500</div><div><br></div><div>Then, I also acquired a wireguard M270 box, as it also apprently has a marvell switch attached to an X553 backplane, and none of the ethernet ports work at all out of the box.</div><div>The above hints worked on that too - with addr set to &quot;0x0&quot; instead of &quot;0x10&quot;.</div><div><br></div><div>So, now i have two Atom C3558 boxes w/ X553 2.5gbit backplane ports hooked into an 8 port marvell gige switch working on -HEAD (save the ixgbe mdio diff that I attached; I&#39;ll sort that out soon). All it took was like $250 in hardware, staring at intel documentation and linux/dpdk driver code, and three evenings thinking to myself &quot;surely this can&#39;t be THAT hard.</div></div></blockquote><div><br></div><div><a href="https://reviews.freebsd.org/D50127">https://reviews.freebsd.org/D50127</a>; adds MDIO/MII support for the x553 bits if there&#39;s an external PHY for some reason, and <a href="https://reviews.freebsd.org/D50128">https://reviews.freebsd.org/D50128</a>; adds the if_ix MDIO bus. It&#39;s all preliminary, but it works, and if for some reason I forget to land it / get distracted by real life, all of the moving pieces are now available and public.</div><div><br></div><div>I&#39;m hoping to clean up D50128 enough next week to get it into -HEAD (with the intel maintainers blessings of course) and then add some wiki documentation for the two switch platforms I have that use it. I hear there&#39;s some netgate boxes that also use this switch but I don&#39;t have the hardware to play with.</div><div><br></div><div>-adrian</div><div> <br></div></div></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokBQ0HmX8fRWf_1%2BMRGF4C7DrDPD%2B3Z6LUMw6gC8t-L1g>