> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of Karol 
> Kolacinski
> Sent: Tuesday, January 23, 2024 4:21 PM
> To: [email protected]
> Cc: Keller, Jacob E <[email protected]>; [email protected]; 
> Kolacinski, Karol <[email protected]>; Nguyen, Anthony L 
> <[email protected]>; Brandeburg, Jesse <[email protected]>
> Subject: [Intel-wired-lan] [PATCH v7 iwl-next 2/7] ice: pass reset type to 
> PTP reset functions
>
> From: Jacob Keller <[email protected]>
>
> The ice_ptp_prepare_for_reset() and ice_ptp_reset() functions currently
> check the pf->flags ICE_FLAG_PFR_REQ bit to determine if the current
> reset is a PF reset or not.
>
> This is problematic, because it is possible that a PF reset and a higher
> level reset (CORE reset, GLOBAL reset, EMP reset) are requested
> simultaneously. In that case, the driver performs the highest level
> reset requested. However, the ICE_FLAG_PFR_REQ flag will still be set.
>
> The main driver reset functions take an enum ice_reset_req indicating
> which reset is actually being performed. Pass this data into the PTP
> functions and rely on this instead of relying on the driver flags.
>
> This ensures that the PTP code performs the proper level of reset that
> the driver is actually undergoing.
>
> Signed-off-by: Jacob Keller <[email protected]>
> Signed-off-by: Karol Kolacinski <[email protected]>
> Reviewed-by: Jacob Keller <[email protected]>
> ---
> V4 -> V5: added missing ice_ptp_reset() definition
>
>  drivers/net/ethernet/intel/ice/ice_main.c |  4 ++--
>  drivers/net/ethernet/intel/ice/ice_ptp.c  | 13 +++++++------
>  drivers/net/ethernet/intel/ice/ice_ptp.h  | 16 ++++++++++++----
>  3 files changed, 21 insertions(+), 12 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <[email protected]> (A 
Contingent worker at Intel)

Reply via email to