On 23/10/2024 5:30, Chris H wrote:
From: Christopher S M Hall <christopher.s.h...@intel.com>

Add a mutex around the PTM transaction to prevent multiple transactors

Multiple processes try to initiate a PTM transaction, one or all may
fail. This can be reproduced by running two instances of the
following:

$ sudo phc2sys -O 0 -i tsn0 -m

PHC2SYS exits with:

"ioctl PTP_OFFSET_PRECISE: Connection timed out" when the PTM transaction
  fails

Note: Normally two instance of PHC2SYS will not run, but one process
  should not break another.

Fixes: a90ec8483732 ("igc: Add support for PTP getcrosststamp()")
Signed-off-by: Christopher S M Hall <christopher.s.h...@intel.com>
---
  drivers/net/ethernet/intel/igc/igc.h     |  1 +
  drivers/net/ethernet/intel/igc/igc_ptp.c | 12 ++++++++++--
  2 files changed, 11 insertions(+), 2 deletions(-)

Tested-by: Mor Bar-Gabay <morx.bar.ga...@intel.com>

Reply via email to