Skip to content
Commit 1a931c4f authored by Christopher S M Hall's avatar Christopher S M Hall Committed by Tony Nguyen
Browse files

igc: add lock preventing multiple simultaneous PTM transactions



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: a90ec848 ("igc: Add support for PTP getcrosststamp()")
Signed-off-by: default avatarChristopher S M Hall <christopher.s.hall@intel.com>
Reviewed-by: default avatarCorinna Vinschen <vinschen@redhat.com>
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarMor Bar-Gabay <morx.bar.gabay@intel.com>
Acked-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 1f025759
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment