From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6D063CE49E; Thu, 2 Jul 2026 16:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783009626; cv=none; b=cTAu2TG2g6m7l6g4r9+geu5fEJhwcgdj3fktxDYjUVPZnTKXD2cTmxPB9unub8pEoQEcNBy/ih18fyJz8+pz8u24FFIt0yFKR11D/EPwRQV1+yoy/sL6kR5GlYIHQUBynYl/EoVa6hSUnC5uFVvmLo/0PSjKT1iFDYEZqrJl1os= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783009626; c=relaxed/simple; bh=/FhUa3NMJMXwkq2KGlLu7L2ptXaIvktFaugP5enCGKQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=seCmOtiiU/fSRKDCy6zu8k5Z9+vdYv9K4GtkCG2w3ReIw4XfDedhv0BdEgyc/305gx6gdSlVJp4fUF57DyBZBHjfdSdEp7SRQ2v86JylBXo9zGQ6DvAgLXOleA83DmqYNVF0z4BWT9biPveeyTq5/7LlKDKk3AehsVfR9Kl4Jc8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KM8gu7K/; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KM8gu7K/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB5DF1F00A3A; Thu, 2 Jul 2026 16:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783009623; bh=DKRCLApvSaOqfVqI56xRI1ELwbVv6ErsHJpHlGE4Cag=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KM8gu7K/H/gGWnuGB5qQn6z7VrIwMJLVBZO0W5SDF3zNEr8Yo9e6ptaH7/pyilhxU eF7DvVPhwXNRIWe0Y7N3DwvRy00z8T1p14URWZGr3gykQC712OFrojwqYyYriPwXf9 xjNmewujIPQwiMj7B5U9ROEIPGA/jg08wLbc4p2o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yong Wang , Petr Machata , Sasha Levin Subject: [PATCH 5.15 25/95] Revert "ptp: add testptp mask test" Date: Thu, 2 Jul 2026 18:19:28 +0200 Message-ID: <20260702155109.736724788@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260702155109.196223802@linuxfoundation.org> References: <20260702155109.196223802@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Petr Machata This reverts commit 8510559c0fa1e228b18fcf77cfbcf5b970793a8a, 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 bef3a83a9a67 ("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 Signed-off-by: Petr Machata Signed-off-by: Sasha Levin --- tools/testing/selftests/ptp/testptp.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/tools/testing/selftests/ptp/testptp.c b/tools/testing/selftests/ptp/testptp.c index d78d52f028ab52..84e86898f4b409 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; @@ -616,18 +611,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; } -- 2.53.0