]> Gentwo Git Trees - linux/.git/commit
net: pcs: xpcs: Fix PMA identifier handling in XPCS
authorAlexander Duyck <alexanderduyck@fb.com>
Fri, 21 Nov 2025 16:40:09 +0000 (08:40 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 27 Nov 2025 09:41:31 +0000 (10:41 +0100)
commit39e138173ae7641e952b456d2de7ad2ac03e8d88
tree0fd8670ed5068d943c03cfd2d0a1fcc916e049fd
parent7622d55276932bfeb947b7b6cbf7ea0aa41feeb8
net: pcs: xpcs: Fix PMA identifier handling in XPCS

The XPCS driver was mangling the PMA identifier as the original code
appears to have been focused on just capturing the OUI. Rather than store a
mangled ID it is better to work with the actual PMA ID and instead just
mask out the values that don't apply rather than shifting them and
reordering them as you still don't get the original OUI for the NIC without
having to bitswap the values as per the definition of the layout in IEEE
802.3-2022 22.2.4.3.1.

By laying it out as it was in the hardware it is also less likely for us to
have an unintentional collision as the enum values will occupy the revision
number area while the OUI occupies the upper 22 bits.

Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Link: https://patch.msgid.link/176374320920.959489.17267159479370601070.stgit@ahduyck-xeon-server.home.arpa
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/pcs/pcs-xpcs.c
include/linux/pcs/pcs-xpcs.h
include/uapi/linux/mdio.h