Re: [PATCH v2 net-next] octeontx2-pf: report port connector type in ethtool link ksettings
From: Jakub Kicinski
Date: Mon Sep 07 2026 - 17:43:30 EST
On Mon, 7 Sep 2026 09:58:27 +0530 Ratheesh Kannoth wrote:
> otx2_get_link_ksettings() already fills speed, duplex, autoneg, link
> modes and FEC from CGX firmware data, but leaves cmd->base.port unset.
> As a result, ethtool does not show the physical connector type even
> though the firmware provides it in fwdata.port.
>
> Populate cmd->base.port from rsp->fwdata.port so users can see values
> such as PORT_TP or PORT_AUI via ethtool.
I said:
drivers should not blindly pass values between uAPI and the FW.
That means you have to add some explicit validation/translation
for each value even if they are numerically identical.