Support for RealTek RTL8125B chipset?

Stephen Hocking stephen.hocking at gmail.com
Sun Aug 2 02:47:24 UTC 2020


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:
>
> 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"


More information about the freebsd-hackers mailing list