Re: [PATCH net-next v3 05/13] ax88179_178a: Use phylink in get/set_link_ksettings
From: Birger Koblitz <hidden>
Date: 2026-07-24 17:02:54
Also in:
linux-usb, lkml
On 7/24/26 18:25, Andrew Lunn wrote:
quoted
Well, only the new devices use phylink, so it is not converting the existing chips.O.K. I suggested you split the existing driver into two, a library of code moving frames around, and then the glue to probe and use mii. You can then add a new glue driver using phylink for the new devices.
I replied to that earlier on. My argument was that the frame moving bits are rather different since the older devices use 32 bit header structures, while the newer ones use 64 and the structures also are somewhat different. The library would contain rather a lot of duplicate functions that are specific to the AX179 and AX179A. Are you aware that the asix_devices.c and asix_common.c drivers do already have this structure (including phylink), but target even older devices? And then, there is a 3rd implementation of the ASIX frame moving, again a bit different, in aqc111.c (no phylink). If one changes there aqc111_ to asix_ one gets basically the same code as in asix_common at least for the USB stuff and similarities to the code of ax88179_178a for the frame moving. I did not want to further contribute to the mess, but it now looks like I do just that. To summarize, you suggest to split ax88179_178a plus the new HW code into 3 parts: - ax179_lib (frame moving, USB read/write support) - ax179_devices (HW support for AX179-based chips using mii) - ax179a_devices (HW support for AX179A based chips using phylink) Does that change taking the other ASIX-code into account?
I think it is a bad idea of have both phylink and mii for the same device.
I agree, but the argument would be that the mii stuff could go away eventually. Birger