From nobody Thu Oct 2 07:46:35 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 2B46322D7B6; Fri, 19 Sep 2025 00:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758242061; cv=none; b=dbYaDpaFxVDidyEhFgy3LwW2Qmp5LGLlVn7FXK57X5C5rcBCSED60N/blkkU98C39ZNeEkbjFJuz9YefVzp2fLPj9cZLIRBeuH+KO6LsCxxFpj5TfVbDpYE8p8IkBEWHDvHuYO2f6uG/Ssi9nygXhwJGi4hb6BJugs/3xvEP9iU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758242061; c=relaxed/simple; bh=xXwKD+ifDBVBCrB7b6koLwrJ7phZIeOxsP1/aBvt6lQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rU6j2QwC6WC07c/iyREmPfyE1mppQ2QxIgEmq0z0ROGeWTILzot2+H2Z7a0iX/z7PajAZ7fbcseIuTgGPv8rkp8vyzdKW3Qz+OmeSpZk1KStEgfOJYrVCBG6a+IkQTq4adJ84AVmBQFiXqtn4/+ky09be4wMyQR+BGWw5Vh9kbk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=I1DlWSeR; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="I1DlWSeR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1758242060; x=1789778060; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=xXwKD+ifDBVBCrB7b6koLwrJ7phZIeOxsP1/aBvt6lQ=; b=I1DlWSeR3pML0uAt90ZgLRJm4lBwk9kkH3tmLbTWP101+t4bkzQUiwei xhFiFDH95ejGuI07hn6OFglarU2rBzkolJXDJK5vWXv5LRTwy3LNZgevS 0pIZD2wedu+71k1q0MiBRi+Qa8baLlT0pbvBSryaH16X6qkOEGXf3/CC9 ZfNtNDZRwPSSxr7nrPgS8Zt8u4oo0oaWkU+RnEFeBkBx2LE+r+tbrLsLj znbQ45bT5TSJmRI4hX049mTVspN7AJkbPxoX5Zw0En8WSqMcCiSn46qGc 6Vd7+9dnafz0+XhucDDZFt7Ejt6YTCEIMjppYLOfCg04pjR13xnmABUBa Q==; X-CSE-ConnectionGUID: Sel4FJQ3QQKTBQmaT+VfTQ== X-CSE-MsgGUID: 6G0ZbZ0SSYGqQqf4jUi+VQ== X-IronPort-AV: E=McAfee;i="6800,10657,11557"; a="60517631" X-IronPort-AV: E=Sophos;i="6.18,276,1751266800"; d="scan'208";a="60517631" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2025 17:34:19 -0700 X-CSE-ConnectionGUID: xzZf/9wESjKMTD+65Dk/dA== X-CSE-MsgGUID: iaK5QreVTCim4C5yw28pOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,276,1751266800"; d="scan'208";a="180119989" Received: from orcnseosdtjek.jf.intel.com (HELO [10.166.28.70]) ([10.166.28.70]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2025 17:34:18 -0700 From: Jacob Keller Date: Thu, 18 Sep 2025 17:33:16 -0700 Subject: [PATCH net 1/3] broadcom: fix support for PTP_PEROUT_DUTY_CYCLE Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250918-jk-fix-bcm-phy-supported-flags-v1-1-747b60407c9c@intel.com> References: <20250918-jk-fix-bcm-phy-supported-flags-v1-0-747b60407c9c@intel.com> In-Reply-To: <20250918-jk-fix-bcm-phy-supported-flags-v1-0-747b60407c9c@intel.com> To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vadim Fedorenko , Kory Maincent Cc: Richard Cochran , Yaroslav Kolomiiets , James Clark , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jacob Keller , Vadim Fedorenko X-Mailer: b4 0.15-dev-cbe0e X-Developer-Signature: v=1; a=openpgp-sha256; l=1702; i=jacob.e.keller@intel.com; h=from:subject:message-id; bh=xXwKD+ifDBVBCrB7b6koLwrJ7phZIeOxsP1/aBvt6lQ=; b=owGbwMvMwCWWNS3WLp9f4wXjabUkhowzSzm27kj3bzwpF7zPZgdvP0OIpsSixXOereAqdzoic 0tZoul2RykLgxgXg6yYIouCQ8jK68YTwrTeOMvBzGFlAhnCwMUpABOZzcXIsKD6/K9OBzFvTfPC 3RaSV0ofac8K3LDz4PodKSWqpU+Nwxj+KTYJn58qHr9C5QPj4k6tDyK2ChNzXB/JMC2x4t9ZeLG OGQA= X-Developer-Key: i=jacob.e.keller@intel.com; a=openpgp; fpr=204054A9D73390562AEC431E6A965D3E6F0F28E8 The bcm_ptp_perout_locked() function has support for handling PTP_PEROUT_DUTY_CYCLE, but its not listed in the supported_perout_flags. Attempts to use the duty cycle support will be rejected since commit d9f3e9ecc456 ("net: ptp: introduce .supported_perout_flags to ptp_clock_info"), as this flag accidentally missed while doing the conversion. Drop the unnecessary supported flags check from the bcm_ptp_perout_locked() function and correctly set the supported_perout_flags. This fixes use of the PTP_PEROUT_DUTY_CYCLE support for the broadcom driver. Reported-by: James Clark Fixes: d9f3e9ecc456 ("net: ptp: introduce .supported_perout_flags to ptp_cl= ock_info") Signed-off-by: Jacob Keller Acked-by: Richard Cochran Reviewed-by: Kory Maincent Reviewed-by: Vadim Fedorenko Tested-by: James Clark --- drivers/net/phy/bcm-phy-ptp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/phy/bcm-phy-ptp.c b/drivers/net/phy/bcm-phy-ptp.c index eba8b5fb1365..1cf695ac73cc 100644 --- a/drivers/net/phy/bcm-phy-ptp.c +++ b/drivers/net/phy/bcm-phy-ptp.c @@ -597,10 +597,6 @@ static int bcm_ptp_perout_locked(struct bcm_ptp_privat= e *priv, =20 period =3D BCM_MAX_PERIOD_8NS; /* write nonzero value */ =20 - /* Reject unsupported flags */ - if (req->flags & ~PTP_PEROUT_DUTY_CYCLE) - return -EOPNOTSUPP; - if (req->flags & PTP_PEROUT_DUTY_CYCLE) pulse =3D ktime_to_ns(ktime_set(req->on.sec, req->on.nsec)); else @@ -741,6 +737,7 @@ static const struct ptp_clock_info bcm_ptp_clock_info = =3D { .n_pins =3D 1, .n_per_out =3D 1, .n_ext_ts =3D 1, + .supported_perout_flags =3D PTP_PEROUT_DUTY_CYCLE, }; =20 static void bcm_ptp_txtstamp(struct mii_timestamper *mii_ts, --=20 2.51.0.rc1.197.g6d975e95c9d7 From nobody Thu Oct 2 07:46:35 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 5521424676D; Fri, 19 Sep 2025 00:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758242063; cv=none; b=mchrdHrPTefMqI0icFFL8Dvqq/qkhLzYsz53YB0fDejsI1HJ+9lvyLWDFlGiOoHk2qWfr2tjlU3O/ZOcGBc6TSuKNtXTmxqlPtH6ABDMrL5ADsxu0o20KjYr+gTV9suZ3pbQr95z8uXqP4DSUbmqaqM1Pfrf9C8tYedhrSNMqI4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758242063; c=relaxed/simple; bh=05qhcsF549Kc/bC4QjL3n33An/vk2zGxYzvD5IR6WXI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D4gtqGljWtck97UeGdGNvObYT9oM6gWRf86/hoKwetxAviDnC39LZ9f299jEBtawjffolYFc5DNaOBEvRFptwRPzXWQDylMydxKQJ4ep/11WZwq0cYmIA2wN2JpYjTTVHZ+6pzUftJ/l43VTGqbt7KRV2Mc6PzguO+tj5P3opsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dscAKGfF; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dscAKGfF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1758242061; x=1789778061; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=05qhcsF549Kc/bC4QjL3n33An/vk2zGxYzvD5IR6WXI=; b=dscAKGfFKwaVG5kBbUwkmqGWyyQ/0o7TVp+zsMaTI12ZLTwIR1SZ5WL0 NBXtubxKMnPl+vXI4ofrqPRa90CFS0EZY5yGAZ9IlC2w2IR/VbSaNDFgd ujUc61KZnFI/LCz9dQMUJjzymGdPdfIPbZhIEvZDuBybnJ/AbNl/o7zfC p2CTV91A8cGY9gH7FsmHW3ztV1TKQcM5SmIP5nNsbUtuRDsY1dWc22MPX psA+vuAdfO0ji469DJfauNdHC0lPQ36qDGrMwKfoxV+XCVeIJku53wNwb hCCw4Ypxutp1aPAc9GL3z3rtz/gkZIq6Y3jk7G2X3ucLQ64u/j2pW17aV g==; X-CSE-ConnectionGUID: uvudV7wNTHmvA3QyUBCGYw== X-CSE-MsgGUID: KuVvF2sUSjqrS40a3/iveA== X-IronPort-AV: E=McAfee;i="6800,10657,11557"; a="60517644" X-IronPort-AV: E=Sophos;i="6.18,276,1751266800"; d="scan'208";a="60517644" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2025 17:34:19 -0700 X-CSE-ConnectionGUID: EmUhBRHySjy02h9Y2zF6Pw== X-CSE-MsgGUID: b2gT0LmIRMiQ8uf7wnKx4Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,276,1751266800"; d="scan'208";a="180119992" Received: from orcnseosdtjek.jf.intel.com (HELO [10.166.28.70]) ([10.166.28.70]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2025 17:34:18 -0700 From: Jacob Keller Date: Thu, 18 Sep 2025 17:33:17 -0700 Subject: [PATCH net 2/3] broadcom: fix support for PTP_EXTTS_REQUEST2 ioctl Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250918-jk-fix-bcm-phy-supported-flags-v1-2-747b60407c9c@intel.com> References: <20250918-jk-fix-bcm-phy-supported-flags-v1-0-747b60407c9c@intel.com> In-Reply-To: <20250918-jk-fix-bcm-phy-supported-flags-v1-0-747b60407c9c@intel.com> To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vadim Fedorenko , Kory Maincent Cc: Richard Cochran , Yaroslav Kolomiiets , James Clark , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jacob Keller , Vadim Fedorenko X-Mailer: b4 0.15-dev-cbe0e X-Developer-Signature: v=1; a=openpgp-sha256; l=2178; i=jacob.e.keller@intel.com; h=from:subject:message-id; bh=05qhcsF549Kc/bC4QjL3n33An/vk2zGxYzvD5IR6WXI=; b=owGbwMvMwCWWNS3WLp9f4wXjabUkhowzSznrWSxvWrMbpfxvaf7w7PD+L/5NP1/8s7255VDqC peSH0pnOkpZGMS4GGTFFFkUHEJWXjeeEKb1xlkOZg4rE8gQBi5OAZiI4glGhudvxPylL97i31Du UaQQtkFofpiuUP+jso1lD1+kv5ixeycjw7K6iU+abT71zUpq+Tg59O3Mf1PqFq5w4f8usP9evtu BF0wA X-Developer-Key: i=jacob.e.keller@intel.com; a=openpgp; fpr=204054A9D73390562AEC431E6A965D3E6F0F28E8 Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") modified the PTP core kernel logic to validate the supported flags for the PTP_EXTTS_REQUEST ioctls, rather than relying on each individual driver correctly checking its flags. The bcm_ptp_enable() function implements support for PTP_CLK_REQ_EXTTS, but does not check the flags, and does not forward the request structure into bcm_ptp_extts_locked(). When originally converting the bcm-phy-ptp.c code, it was unclear what edges the hardware actually timestamped. Thus, no flags were initialized in the .supported_extts_flags field. This results in the kernel automatically rejecting all userspace requests for the PTP_EXTTS_REQUEST2 ioctl. This occurs because the PTP_STRICT_FLAGS is always assumed when operating under PTP_EXTTS_REQUEST2. This has been the case since the flags introduction by commit 6138e687c7b6 ("ptp: Introduce strict checking of external time stamp options."). The bcm-phy-ptp.c logic never properly supported strict flag validation, as it previously ignored all flags including both PTP_STRICT_FLAGS and the PTP_FALLING_EDGE and PTP_RISING_EDGE flags. Reports from users in the field prove that the hardware timestamps the rising edge. Encode this in the .supported_extts_flags field. This re-enables support for the PTP_EXTTS_REQUEST2 ioctl. Reported-by: James Clark Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clo= ck_info") Signed-off-by: Jacob Keller Acked-by: Richard Cochran Reviewed-by: Kory Maincent Reviewed-by: Vadim Fedorenko Tested-by: James Clark --- drivers/net/phy/bcm-phy-ptp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/bcm-phy-ptp.c b/drivers/net/phy/bcm-phy-ptp.c index 1cf695ac73cc..d3501f8487d9 100644 --- a/drivers/net/phy/bcm-phy-ptp.c +++ b/drivers/net/phy/bcm-phy-ptp.c @@ -738,6 +738,7 @@ static const struct ptp_clock_info bcm_ptp_clock_info = =3D { .n_per_out =3D 1, .n_ext_ts =3D 1, .supported_perout_flags =3D PTP_PEROUT_DUTY_CYCLE, + .supported_extts_flags =3D PTP_STRICT_FLAGS | PTP_RISING_EDGE, }; =20 static void bcm_ptp_txtstamp(struct mii_timestamper *mii_ts, --=20 2.51.0.rc1.197.g6d975e95c9d7 From nobody Thu Oct 2 07:46:35 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 D5290248F6F; Fri, 19 Sep 2025 00:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758242063; cv=none; b=CgD26nGwou+2Fam+wVse01ZUDBdMETJsIy93E9ORraCYBEJKBPOITxqbMsb3mYwk1GxrZldu07sa8NKL2s9RWpId/GjOjcxNgY6y+gBM6vpJBW+nsX1H0/FX0QdArfrs11DfzP/VlQd823XUB7lRL7lMTnfinLzd9RkQCG2MqjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758242063; c=relaxed/simple; bh=fM1oYtxAmTvcto6ypPmRdybLInTXWVbH9+IH/w812qo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HIIKpGUMvU3xOgnpwUG12tmwpLQiJzZqgHKjoqLgGaeSNUsCQui6Iz8p8HP+Oz46AqQtaBRZC2jS8rql67IKZt4vkju+gCsoKH+1Bi54rLriacpLt4acnx/eo/603NiCx3/SHmsC8cXCCMS6crNxoj4CRRBTrHV/tkoFnz0NW6U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=advuets0; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="advuets0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1758242062; x=1789778062; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=fM1oYtxAmTvcto6ypPmRdybLInTXWVbH9+IH/w812qo=; b=advuets0XEFMQ1vYKBlekwXnN7p4+hWqJVxaZ/t/nW5kYKMC2Qq10JLR aTShBWdqTrbn6xWiCvsMLN3rVPzWgNDamXdTH5Su+JqEdLnc+UFPManB1 greGxzYwR1778cqjQ1WmA1yfBGEW2Jf4y1X8BBUbdtROTHa847R7Ahklg 5EUMyalPnk7d9OvWN14grDIxTHPFKPju1S6p2rctYZbIGgK5Ls8Kw+mCr cOT2twXJweM/VPLmhfMvh4z0o9BrgquxawNGg6N2hX20avZK/QQK56pRO d7zbwmgwXzM+jgHkGGJQ0gcCtN1soTA8XiC5/bviHB4dIwJ9nhuhlvvAJ A==; X-CSE-ConnectionGUID: 7Au1tvgCQQ2QRDSutVqrUw== X-CSE-MsgGUID: hvSN6gBOTtOFcRVWAJ/kYQ== X-IronPort-AV: E=McAfee;i="6800,10657,11557"; a="60517658" X-IronPort-AV: E=Sophos;i="6.18,276,1751266800"; d="scan'208";a="60517658" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2025 17:34:19 -0700 X-CSE-ConnectionGUID: nboOvlkuT9S0SY2qExoYpg== X-CSE-MsgGUID: +sbYk6ONReyxqj0g+/ecvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,276,1751266800"; d="scan'208";a="180119996" Received: from orcnseosdtjek.jf.intel.com (HELO [10.166.28.70]) ([10.166.28.70]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2025 17:34:19 -0700 From: Jacob Keller Date: Thu, 18 Sep 2025 17:33:18 -0700 Subject: [PATCH net 3/3] ptp: document behavior of PTP_STRICT_FLAGS Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250918-jk-fix-bcm-phy-supported-flags-v1-3-747b60407c9c@intel.com> References: <20250918-jk-fix-bcm-phy-supported-flags-v1-0-747b60407c9c@intel.com> In-Reply-To: <20250918-jk-fix-bcm-phy-supported-flags-v1-0-747b60407c9c@intel.com> To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vadim Fedorenko , Kory Maincent Cc: Richard Cochran , Yaroslav Kolomiiets , James Clark , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jacob Keller , Vadim Fedorenko X-Mailer: b4 0.15-dev-cbe0e X-Developer-Signature: v=1; a=openpgp-sha256; l=1512; i=jacob.e.keller@intel.com; h=from:subject:message-id; bh=fM1oYtxAmTvcto6ypPmRdybLInTXWVbH9+IH/w812qo=; b=owGbwMvMwCWWNS3WLp9f4wXjabUkhowzSzlVngdYNx84XJO9Xqj40NmsvS5O/Q3r7GKnvRJNu MwjFHe5o5SFQYyLQVZMkUXBIWTldeMJYVpvnOVg5rAygQxh4OIUgIkElzP8FXs2+9XMwuSL7OGn ttrZXLl0nj3tlt5J17/RJcz7J2Ydm8HIcCDs+X4tdt/q/pR84/MvtPdX7PCvTEkxXnWxnm37n4n zOAA= X-Developer-Key: i=jacob.e.keller@intel.com; a=openpgp; fpr=204054A9D73390562AEC431E6A965D3E6F0F28E8 Commit 6138e687c7b6 ("ptp: Introduce strict checking of external time stamp options.") added the PTP_STRICT_FLAGS to the set of flags supported for the external timestamp request ioctl. It is only supported by PTP_EXTTS_REQUEST2, as it was introduced the introduction of the new ioctls. Further, the kernel has always set this flag for PTP_EXTTS_REQUEST2 regardless of whether or not the user requested the behavior. This effectively means that the flag is not useful for userspace. If the user issues a PTP_EXTTS_REQUEST ioctl, the flag is ignored due to not being supported on the old ioctl. If the user issues a PTP_EXTTS_REQUEST2 ioctl, the flag will be set by the kernel regardless of whether the user set the flag in their structure. Add a comment documenting this behavior in the uAPI header file. Signed-off-by: Jacob Keller Acked-by: Richard Cochran Reviewed-by: Kory Maincent Reviewed-by: Vadim Fedorenko Tested-by: James Clark --- include/uapi/linux/ptp_clock.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h index 18eefa6d93d6..2c3346e91dbe 100644 --- a/include/uapi/linux/ptp_clock.h +++ b/include/uapi/linux/ptp_clock.h @@ -37,6 +37,9 @@ =20 /* * flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl. + * + * Note: PTP_STRICT_FLAGS is always enabled by the kernel for + * PTP_EXTTS_REQUEST2 regardless of whether it is set by userspace. */ #define PTP_EXTTS_VALID_FLAGS (PTP_ENABLE_FEATURE | \ PTP_RISING_EDGE | \ --=20 2.51.0.rc1.197.g6d975e95c9d7