On 31.07.2024 11:24, Simon Horman wrote:
> On Tue, Jul 30, 2024 at 12:51:21PM +0200, Wojciech Drewek wrote:
>> Enable ethtool reset support. Each ethtool reset
>> type is mapped to the CVL reset type:
>> ETH_RESET_MAC - ICE_RESET_CORER
>> ETH_RESET_ALL - ICE_RESET_GLOBR
>> ETH_RESET_DEDICATED - ICE_RESET_PFR
>>
>> Multiple reset flags are not supported.
>> Calling any reset type on port representor triggers VF reset.
>>
>> Command example:
>> GLOBR:
>> $ ethtool --reset enp1s0f0np0 all
>> CORER:
>> $ ethtool --reset enp1s0f0np0 mac
>> PFR:
>> $ ethtool --reset enp1s0f0np0 dedicated
>> VF reset:
>> $ ethtool --reset $port_representor mac
>>
>> Reviewed-by: Michal Swiatkowski <michal.swiatkow...@linux.intel.com>
>> Reviewed-by: Marcin Szycik <marcin.szy...@linux.intel.com>
>> Signed-off-by: Wojciech Drewek <wojciech.dre...@intel.com>
>> ---
>> drivers/net/ethernet/intel/ice/ice_ethtool.c | 64 ++++++++++++++++++++
>> 1 file changed, 64 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c
>> b/drivers/net/ethernet/intel/ice/ice_ethtool.c
>> index 39d2652c3ee1..00b8ac3f1dff 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
>> @@ -4794,6 +4794,68 @@ static void ice_get_ts_stats(struct net_device
>> *netdev,
>> ts_stats->lost = ptp->tx_hwtstamp_timeouts;
>> }
>>
>> +/**
>> + * ice_ethtool_reset - triggers a given type of reset
>> + * @dev: network interface device structure
>> + * @flags: set of reset flags
>> + *
>> + * Note that multiple reset flags are not supported
>> + */
>> +static int ice_ethtool_reset(struct net_device *dev, u32 *flags)
>> +{
>
> nit: Please include a "Return:" or "Returns:" section in the Kernel doc
> of new functions that return a value.
> (i.e. also for ice_repr_ethtool_reset)
>
> Flagged by ./scripts/kernel-doc -none -Wall
>
> ...
sure thing