Re: [PATCH v2 net-next] octeontx2-pf: report port connector type in ethtool link ksettings
From: Jakub Kicinski
Date: Tue Sep 08 2026 - 17:12:00 EST
On Tue, 8 Sep 2026 08:01:55 +0530 Ratheesh Kannoth wrote:
> > 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.
>
> A field_get() would be OK to satisfy this translation ?
>
> cmd->base.port = FIELD_GET(GENMASK(7, 0), rsp->fwdata.port);
switch (fw_value) {
case X:
case Y:
return fw_value;
default:
return -EINVAL;
}