Re: [PATCH net-next] net: phy: populate host_interfaces when attaching PHY

From: Andrew Lunn
Date: Thu Oct 10 2024 - 13:00:23 EST


> I initially tried to upstream the patch Alexander Couzens had written
> for that in 2023, and back then we assumed that interface mode switching
> would always be performed in case 2500Base-X was the main mode.
> However, I gave up at some point because I was asked for detailed
> definition of the PHY registers and bits, which, frankly speaking, just
> doesn't exist, not even in RealTek's under-NDA datasheet which merely
> lists some magic sequences of register writes.
>
> https://patchwork.kernel.org/comment/25331309/

It is fine to document that these are magic values written into magic
registers and nobody knows what they are doing, if there is no
documentation. I just like to push people to actually check if there
is documentation, otherwise there will be more and more examples of
this magic.

I've been keeping an eye out for 'magic' registers which are actually
part of 802.3, and pushing back that these are least should be fully
documented. And it does happen, particularly in vendor submitted code
:-(

But you said the patch got merged eventually, so it seems like it
worked out in the end.

Andrew