]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
testptp: Add option to open PHC in readonly mode
authorWojtek Wasko <wwasko@nvidia.com>
Mon, 3 Mar 2025 16:13:45 +0000 (18:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Feb 2026 15:44:03 +0000 (16:44 +0100)
commitc6dc458227a3e210fb5b21602c92419b484c6497
treebe168ba9dba62566db0bd68b298472751a567a21
parent06954f715deb0ed053f8bf85547370db6870225d
testptp: Add option to open PHC in readonly mode

[ Upstream commit 76868642e42795353106197abf9c607ad80f4c9e ]

PTP Hardware Clocks no longer require WRITE permission to perform
readonly operations, such as listing device capabilities or listening to
EXTTS events once they have been enabled by a process with WRITE
permissions.

Add '-r' option to testptp to open the PHC in readonly mode instead of
the default read-write mode. Skip enabling EXTTS if readonly mode is
requested.

Acked-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: Wojtek Wasko <wwasko@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/ptp/testptp.c