[Intel-wired-lan] [PATCH iwl-next v3 1/4] ice: Auxbus devices & driver for E822 TS

Pucha, HimasekharX Reddy himasekharx.reddy.pucha at intel.com
Mon Aug 28 10:02:47 UTC 2023


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Michal Michalik
> Sent: Thursday, July 27, 2023 7:21 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Kolacinski, Karol <karol.kolacinski at intel.com>; Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Brandeburg, Jesse <jesse.brandeburg at intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v3 1/4] ice: Auxbus devices & driver for E822 TS
>
> There is a problem in HW in E822-based devices leading to race
> condition.
> It might happen that, in order:
> - PF0 (which owns the PHC) requests few timestamps,
> - PF1 requests a timestamp,
> - interrupt is being triggered and both PF0 and PF1 threads are woken
> up,
> - PF0 got one timestamp, still waiting for others so not going to sleep,
> - PF1 gets it's timestamp, process it and go to sleep,
> - PF1 requests a timestamp again,
> - just before PF0 goes to sleep timestamp of PF1 appear,
> - PF0 finishes all it's timestamps and go to sleep (PF1 also sleeping).
> That leaves PF1 timestamp memory not read, which lead to blocking the
> next interrupt from arriving.
>
> Fix it by adding auxiliary devices and only one driver to handle all the
> timestamps for all PF's by PHC owner. In the past each PF requested it's
> own timestamps and process it from the start till the end which causes
> problem described above. Currently each PF requests the timestamps as
> before, but the actual reading of the completed timestamps is being done
> by the PTP auxiliary driver, which is registered by the PF which owns PHC.
>
> Additionally, the newly introduced auxiliary driver/devices for PTP clock
> owner will be used for other features in all products (including E810).
>
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Signed-off-by: Karol Kolacinski <karol.kolacinski at intel.com>
> Signed-off-by: Michal Michalik <michal.michalik at intel.com>
> ---
> v2 -> v3:
> * fix the spelling error in commit message ('auxilary' -> 'auxiliary')
> * remove the unnecessary castings
> * remove the wrong indentation
> * use local dev instead of calculating it again
>
> v1 -> v2:
> * fixed duplicated docstring for 'ice_ptp_aux_dev_to_aux_pf'
> * forwarded correct error in 'ice_ptp_create_auxbus_device' instead of -1
> * simplified the 'ice_ptp_auxbus_probe', 'ice_ptp_auxbus_remove' and
>   'ice_ptp_remove_auxbus_device' functions
>
>  drivers/net/ethernet/intel/ice/ice.h            |  14 +
>  drivers/net/ethernet/intel/ice/ice_hw_autogen.h |   1 +
>  drivers/net/ethernet/intel/ice/ice_main.c       |  11 +-
>  drivers/net/ethernet/intel/ice/ice_ptp.c        | 395 +++++++++++++++++++++++-
>  drivers/net/ethernet/intel/ice/ice_ptp.h        |  30 ++
>  5 files changed, 433 insertions(+), 18 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha at intel.com> (A Contingent worker at Intel)



More information about the Intel-wired-lan mailing list