summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Machata <petrm@nvidia.com>2026-06-25 14:30:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-04 13:42:23 +0200
commit7536ebe0473d9c1781710730d6e2f951ec640e07 (patch)
tree6661d7f8f968a3a8c03b9db9dbb5982a7013ae1f
parent48b91ed7e22bb82571c34f8b80b6ecdc90a6fab8 (diff)
downloadlinux-stable-7536ebe0473d9c1781710730d6e2f951ec640e07.tar.gz
linux-stable-7536ebe0473d9c1781710730d6e2f951ec640e07.zip
Revert "ptp: add testptp mask test"
This reverts commit 59ac47a0275fcd5a7637c3d5da20b0905563c7f5, which is commit 26285e689c6cd2cf3849568c83b2ebe53f467143 upstream. The reverted commit extends the selftest to test timestamp event queue mask manipulation in testptp. It exercises masks PTP_MASK_CLEAR_ALL and PTP_MASK_EN_SINGLE, introduced in commit c5a445b1e934 ("ptp: support event queue reader channel masks"), which is not on this stable branch. The test case thus cannot be built against this tree's own UAPI headers. The reverted commit was introduced to resolve a missing dependency of commit 8d9f22c570ba ("testptp: Add option to open PHC in readonly mode"), which is 76868642e427 upstream. The only conflict between the two is the getopt string, and there is otherwise no direct dependency between the two. This patch therefore reverts the cited commit, with hand-resolving the getopt string to include 'r' (as introduced by c6dc458227a3), but not 'F' (introduced by c1c50689799d). Reported-by: Yong Wang <yongwang@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--tools/testing/selftests/ptp/testptp.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/tools/testing/selftests/ptp/testptp.c b/tools/testing/selftests/ptp/testptp.c
index e0aed424fe42..8f05212f8232 100644
--- a/tools/testing/selftests/ptp/testptp.c
+++ b/tools/testing/selftests/ptp/testptp.c
@@ -121,7 +121,6 @@ static void usage(char *progname)
" -d name device to open\n"
" -e val read 'val' external time stamp events\n"
" -f val adjust the ptp clock frequency by 'val' ppb\n"
- " -F chan Enable single channel mask and keep device open for debugfs verification.\n"
" -g get the ptp clock time\n"
" -h prints this message\n"
" -i val index for event/trigger\n"
@@ -190,7 +189,6 @@ int main(int argc, char *argv[])
int seconds = 0;
int readonly = 0;
int settime = 0;
- int channel = -1;
int64_t t1, t2, tp;
int64_t interval, offset;
@@ -200,7 +198,7 @@ int main(int argc, char *argv[])
progname = strrchr(argv[0], '/');
progname = progname ? 1+progname : argv[0];
- while (EOF != (c = getopt(argc, argv, "cd:e:f:F:ghH:i:k:lL:n:o:p:P:rsSt:T:w:x:Xz"))) {
+ while (EOF != (c = getopt(argc, argv, "cd:e:f:ghH:i:k:lL:n:o:p:P:rsSt:T:w:x:Xz"))) {
switch (c) {
case 'c':
capabilities = 1;
@@ -214,9 +212,6 @@ int main(int argc, char *argv[])
case 'f':
adjfreq = atoi(optarg);
break;
- case 'F':
- channel = atoi(optarg);
- break;
case 'g':
gettime = 1;
break;
@@ -618,18 +613,6 @@ int main(int argc, char *argv[])
free(xts);
}
- if (channel >= 0) {
- if (ioctl(fd, PTP_MASK_CLEAR_ALL)) {
- perror("PTP_MASK_CLEAR_ALL");
- } else if (ioctl(fd, PTP_MASK_EN_SINGLE, (unsigned int *)&channel)) {
- perror("PTP_MASK_EN_SINGLE");
- } else {
- printf("Channel %d exclusively enabled. Check on debugfs.\n", channel);
- printf("Press any key to continue\n.");
- getchar();
- }
- }
-
close(fd);
return 0;
}