On Thu, Mar 4, 2021 at 2:08 PM Edwin Peer <edwin.p...@broadcom.com> wrote:
> On Thu, Mar 4, 2021 at 1:13 AM Danielle Ratson <daniel...@nvidia.com> wrote: > > > --- a/include/linux/ethtool.h > > +++ b/include/linux/ethtool.h > > @@ -130,6 +130,7 @@ struct ethtool_link_ksettings { > > } link_modes; > > u32 lanes; > > enum ethtool_link_mode_bit_indices link_mode; > > + bool link_mode_valid; > > }; > > Why isn't this handled the same way as is done for lanes, with a > cap_link_mode_supported bit in ethtool_ops? This would be more > consistent from a driver API perspective. Then, > linkmodes_prepare_data() can set link_mode to -1 for drivers that > don't claim to supply link_mode. Or rather, since that happens too late, don't set it -1 at all and only set the implied parameters in __ethtool_get_link_ksettings() according to the capability. Regards, Edwin Peer
smime.p7s
Description: S/MIME Cryptographic Signature