Date: Thu, 16 Jul 2020 20:08:14 +0200 From: =?UTF-8?Q?Stefan_E=c3=9fer?= <se@freebsd.org> To: Alex Dupre <ale@FreeBSD.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Anybody working on RTL8125 (2.5 Gbit/s Ethernet) support? Message-ID: <9eac4973-f026-874c-84da-e6892e3935d1@freebsd.org> In-Reply-To: <a79c2b7c-c5e5-4fa8-7894-9952ca60da27@FreeBSD.org> References: <61362d77-b283-b00e-c7cd-9f93ea937728@freebsd.org> <bf74e4d1-15bf-97bb-6f23-24c977a55e44@freebsd.org> <9a3c9521-c229-2542-70ec-fc2a2bf6f8f3@bluerosetech.com> <6c8fdae0-4fd5-142c-87f8-1f4026bbd8a1@freebsd.org> <6382c967-b7fa-0581-f16e-504a909809f2@FreeBSD.org> <10310e5c-538d-12f9-e504-bca8f75f1aa3@freebsd.org> <cc24e3c4-2432-cf55-03e5-96f7d194f833@FreeBSD.org> <956a1f83-7210-df80-8ba1-a239bf06471b@freebsd.org> <4fe0da81-941a-2a89-241b-290ee4ba8457@FreeBSD.org> <262b5b96-5193-abde-91de-f4a6cafec210@freebsd.org> <a79c2b7c-c5e5-4fa8-7894-9952ca60da27@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Am 15.07.20 um 21:00 schrieb Alex Dupre: > Stefan Eßer wrote: >> But I really want to have this code merged into the kernel module. > > I'm absolutely not against it, but I'm not going to do it. The primary > reason that many of us are using the realtek driver is that the FreeBSD > one is buggy, and nobody knows why and where. The code diverged probably > more than 10 years ago, with new features (and bugs) added and now they > are almost two completely different drivers, hard to compare, so porting > the code to support new chipset is welcome and doable, but it won't fix > the issue most of us are experiencing, so the port is still really needed. The driver provided by Realtek contains a list of some 50 supported chip versions, to deal with specific hardware issues of several of them. And it contains microcode to replace or patch the (probably also somewhat buggy) code embedded in the hardware. But the driver lacks a number of features present in the FreeBSD version, e.g. NETMAP, interrupt moderation/polling and it seems to contain bugs that are ignored when building with the less strict warning level used for ports. (E.g., see the return value and the actual exit from re_intr() in the Realtek version ...) It does not take advantage of features Ethernet drivers in FreeBSD typically use, e.g. the MII PHY code, and it does even define the PCI config space register offsets instead of using the FreeBSD header to get them. I have not compared it to versions for other operating systems, but I guess that some of the redundancy is a result of only using the LCD of what these operating systems provide (and rather relying on embedded definitions than system header files which might have been moved or might exist only in particular OS releases). Anyway, it will be quite an effort, but I have started to merge the actual driver code (after a merged if_rlreg.h has been finished and allows to build the FreeBSD re driver while containing the defines for the RTL8125). Since I'm away from my test system for most of the next week, I'll not be able to test any of my code before end of July, but I intend to continue this project with the goal of a stable driver for all Realtek chips that uses the microcode and other information from the Realtek driver and adds RTL8125 support. Regards, STefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9eac4973-f026-874c-84da-e6892e3935d1>