Support for RealTek RTL8125B chipset?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Support for RealTek RTL8125B chipset?

Stephen Hocking
Hi all,

Just scored one of those spiffy Odroid H2+ boxes with 2 ethernet
ports, only to be disappointed that FreeBSD 12.1 doesn't seem to
support the ethernet chipset. Does anyone have any plans to add this
in the foreseeable future?

--
  "I and the public know
  what all schoolchildren learn
  Those to whom evil is done
  Do evil in return" W.H. Auden, "September 1, 1939"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Support for RealTek RTL8125B chipset?

Stefan Eßer
Am 01.08.20 um 05:05 schrieb Stephen Hocking:
> Just scored one of those spiffy Odroid H2+ boxes with 2 ethernet
> ports, only to be disappointed that FreeBSD 12.1 doesn't seem to
> support the ethernet chipset. Does anyone have any plans to add this
> in the foreseeable future?

Short answer: try the port version (net/realtek_re_kmod). I'm using
it on my AMD B550 mainboard with on-board RTL8125, currently. It is
known to work on amd64, but I have not seen any success reports for
another architecture, yet.

Since that port is based on the FreeBSD driver available from the
RealTek web-site, which still has ifdefs for FreeBSD 4 and earlier,
but lacks a number of features added to our version in recent years,
I have started to merge the code required to support the RTL8125 to
our driver, a few weeks ago. (There is no publicly available data
sheet or other information for the RTL8125 and its PHY, AFAIK.)

I have merged most of the header bits (defines for new registers and
new bits in existing registers) to sys/dev/rl/if_rlreg.h and have
added some of the new functionality to sys/dev/re/if_re.c, but a lot
is missing and a lot can still be improved.

And then there is the MII PHY code that is embedded in the RealTek
driver and split of into the miibus framework in FreeBSD. The code
that operates on the PHY has therefore to be separated out from the
RealTek driver and integrated into our mii/rgephy.c ...


The Realtek driver contains more than 10 embedded firmware blobs for
different RealTek chips supported by the driver (supposedly to work
around a number of chip bugs or deficiencies of the firmware burnt
into those chips) and I have found that there are about the same
number of specific firmware files for the Linux RealTek driver, too
(but not 1:1 matching the one in the RealTek driver, looking at the
names of those firmware files).

The driver distributed by RealTek (and used for the kmod port) has
a list of some 60 chip revisions and special cases in nearly every
function to support them (there are 4 procedures to reset the chip,
for example).

I have converted quite some code from the RealTek driver to fit in
with our driver version and the merged driver should contain all the
features of our current re driver and missing in the RealTek version
(e.g. NETMAP support) but also include support for the RTL8125 and
I plan to integrate the firmware loading (but that could lead to
slightly different behavior of the RTL chips and thus to regressions
since our driver code assumes the behavior of the chip with its burnt
in firmware  ...)

My version still works with e.g. the RTL8111 I bought to have another
chip of this series in my development system to be able to test for
regressions. But it does not fully initialize the RTL8125, yet, and
work will progress as spare time permits.

TL:DR

The port version seems to work well enough to get the RTL8125 working
without a number of features our if_re.c grew over time. It will also
work with other RTL chips and might even give better results for them,
since it includes revision specific firmware blobs.

I hope to get a working RTL8125 driver that does include all features
of our current if_re.c within a few weeks. But this is a spare-time
project and progress will depend on the amount of available time ...

Regards, STefan
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Support for RealTek RTL8125B chipset?

Stephen Hocking
Hi Stefan,

Thanks for updating me on this - do you need any hardware for testing etc?

On Sat, 1 Aug 2020 at 19:33, Stefan Esser <[hidden email]> wrote:

>
> Am 01.08.20 um 05:05 schrieb Stephen Hocking:
> > Just scored one of those spiffy Odroid H2+ boxes with 2 ethernet
> > ports, only to be disappointed that FreeBSD 12.1 doesn't seem to
> > support the ethernet chipset. Does anyone have any plans to add this
> > in the foreseeable future?
>
> Short answer: try the port version (net/realtek_re_kmod). I'm using
> it on my AMD B550 mainboard with on-board RTL8125, currently. It is
> known to work on amd64, but I have not seen any success reports for
> another architecture, yet.
>
> Since that port is based on the FreeBSD driver available from the
> RealTek web-site, which still has ifdefs for FreeBSD 4 and earlier,
> but lacks a number of features added to our version in recent years,
> I have started to merge the code required to support the RTL8125 to
> our driver, a few weeks ago. (There is no publicly available data
> sheet or other information for the RTL8125 and its PHY, AFAIK.)
>
> I have merged most of the header bits (defines for new registers and
> new bits in existing registers) to sys/dev/rl/if_rlreg.h and have
> added some of the new functionality to sys/dev/re/if_re.c, but a lot
> is missing and a lot can still be improved.
>
> And then there is the MII PHY code that is embedded in the RealTek
> driver and split of into the miibus framework in FreeBSD. The code
> that operates on the PHY has therefore to be separated out from the
> RealTek driver and integrated into our mii/rgephy.c ...
>
>
> The Realtek driver contains more than 10 embedded firmware blobs for
> different RealTek chips supported by the driver (supposedly to work
> around a number of chip bugs or deficiencies of the firmware burnt
> into those chips) and I have found that there are about the same
> number of specific firmware files for the Linux RealTek driver, too
> (but not 1:1 matching the one in the RealTek driver, looking at the
> names of those firmware files).
>
> The driver distributed by RealTek (and used for the kmod port) has
> a list of some 60 chip revisions and special cases in nearly every
> function to support them (there are 4 procedures to reset the chip,
> for example).
>
> I have converted quite some code from the RealTek driver to fit in
> with our driver version and the merged driver should contain all the
> features of our current re driver and missing in the RealTek version
> (e.g. NETMAP support) but also include support for the RTL8125 and
> I plan to integrate the firmware loading (but that could lead to
> slightly different behavior of the RTL chips and thus to regressions
> since our driver code assumes the behavior of the chip with its burnt
> in firmware  ...)
>
> My version still works with e.g. the RTL8111 I bought to have another
> chip of this series in my development system to be able to test for
> regressions. But it does not fully initialize the RTL8125, yet, and
> work will progress as spare time permits.
>
> TL:DR
>
> The port version seems to work well enough to get the RTL8125 working
> without a number of features our if_re.c grew over time. It will also
> work with other RTL chips and might even give better results for them,
> since it includes revision specific firmware blobs.
>
> I hope to get a working RTL8125 driver that does include all features
> of our current if_re.c within a few weeks. But this is a spare-time
> project and progress will depend on the amount of available time ...
>
> Regards, STefan



--

  "I and the public know
  what all schoolchildren learn
  Those to whom evil is done
  Do evil in return" W.H. Auden, "September 1, 1939"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Support for RealTek RTL8125B chipset?

freebsd-hackers mailing list
In reply to this post by Stephen Hocking
> Hi Stefan,
>
> Thanks for updating me on this - do you need any hardware for testing etc?
>
> On Sat, 1 Aug 2020 at 19:33, Stefan Esser <se at freebsd.org> wrote:
> >
> . . .
> >
> > TL:DR
> >
> > The port version seems to work well enough to get the RTL8125 working
> > without a number of features our if_re.c grew over time. It will also
> > work with other RTL chips and might even give better results for them,
> > since it includes revision specific firmware blobs.
> >
> > I hope to get a working RTL8125 driver that does include all features
> > of our current if_re.c within a few weeks. But this is a spare-time
> > project and progress will depend on the amount of available time ...
> >
> > Regards, STefan
>

An FYI relative to active if_ure development:

I have been using/testing the update to if_ure
that is in https://reviews.freebsd.org/D25809 .
The summary for that reports:

QUOTE
This update adds support for:
HW VLAN tagging
HW checksum offload for IPv4 and IPv6
tx and rx aggreegation (for full gige speeds)
multiple transactions

In my testing, I am able to get 900-950Mbps depending upon
TCP or UDP, which is a significant improvement over the previous
91Mbps (~8kint/sec*1500bytes/packet*1packet/int).
END QUOTE

It has been very handy in my context.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Support for RealTek RTL8125B chipset?

Stefan Eßer
In reply to this post by Stephen Hocking
Am 02.08.20 um 04:47 schrieb Stephen Hocking:
> Hi Stefan,
>
> Thanks for updating me on this - do you need any hardware for testing etc?

Hi Stephen,

thank you for the offer - I've got a main-board with RTL8125B and have
added RTL8111H and i210-T1 cards to compare the RTL8125 with.

I'm limited to 1000baseTX speed due to other available interfaces and
switch ports, but I'd hope that if 1000baseTX works, the higher speeds
will be simple to test (and could be come at a later time, since having
on-board RTL8125 chips support by the base system at least at 1 Gbit/s
is my primary goal for now).

The problem is lack of documentation for the MAC and PHY, and there are
even 4 firmware blobs for different versions of the RTL8125 alone (two
each for RTL8125A and B since both already exist in two revisions).

Since I do not have any documentation (except for the RealTek driver
that has a friendly license, being derived from Bill Paul's FreeBSD
driver) I do not really know which parts of the initialization and
register setup that is different for those different chips needs to
be merged into out driver - for now I assume a mostly verbatim copy
of the blobs and of code fragments is the only way forward, since I
have access to only 1 of those 4 chip versions ...

Regards, STefan
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Support for RealTek RTL8125B chipset?

Stephen Hocking
Hi STefan,

I'm rather ignorant about the different versions of that chipset, do
you know of any place that could supply cards with them? Or should we
be calling for volunteers? A few of my boxes have RealTek ethernet
interfaces on their motherboards.

On Sun, 2 Aug 2020 at 20:42, Stefan Esser <[hidden email]> wrote:

>
> Am 02.08.20 um 04:47 schrieb Stephen Hocking:
> > Hi Stefan,
> >
> > Thanks for updating me on this - do you need any hardware for testing etc?
>
> Hi Stephen,
>
> thank you for the offer - I've got a main-board with RTL8125B and have
> added RTL8111H and i210-T1 cards to compare the RTL8125 with.
>
> I'm limited to 1000baseTX speed due to other available interfaces and
> switch ports, but I'd hope that if 1000baseTX works, the higher speeds
> will be simple to test (and could be come at a later time, since having
> on-board RTL8125 chips support by the base system at least at 1 Gbit/s
> is my primary goal for now).
>
> The problem is lack of documentation for the MAC and PHY, and there are
> even 4 firmware blobs for different versions of the RTL8125 alone (two
> each for RTL8125A and B since both already exist in two revisions).
>
> Since I do not have any documentation (except for the RealTek driver
> that has a friendly license, being derived from Bill Paul's FreeBSD
> driver) I do not really know which parts of the initialization and
> register setup that is different for those different chips needs to
> be merged into out driver - for now I assume a mostly verbatim copy
> of the blobs and of code fragments is the only way forward, since I
> have access to only 1 of those 4 chip versions ...
>
> Regards, STefan



--

  "I and the public know
  what all schoolchildren learn
  Those to whom evil is done
  Do evil in return" W.H. Auden, "September 1, 1939"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"