From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Jacob Keller <jacob.e.keller@intel.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Kory Maincent <kory.maincent@bootlin.com>
Cc: Richard Cochran <richardcochran@gmail.com>,
Yaroslav Kolomiiets <yrk@meta.com>, James Clark <jjc@jclark.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/3] broadcom: fix support for PTP_PEROUT_DUTY_CYCLE
Date: Fri, 19 Sep 2025 12:02:02 +0100 [thread overview]
Message-ID: <dbfe6e10-f7f1-4a79-abc1-37151235bc5c@linux.dev> (raw)
In-Reply-To: <20250918-jk-fix-bcm-phy-supported-flags-v1-1-747b60407c9c@intel.com>
On 19/09/2025 01:33, Jacob Keller wrote:
> 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 <jjc@jclark.com>
> Fixes: d9f3e9ecc456 ("net: ptp: introduce .supported_perout_flags to ptp_clock_info")
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> 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_private *priv,
>
> period = BCM_MAX_PERIOD_8NS; /* write nonzero value */
>
> - /* Reject unsupported flags */
> - if (req->flags & ~PTP_PEROUT_DUTY_CYCLE)
> - return -EOPNOTSUPP;
> -
> if (req->flags & PTP_PEROUT_DUTY_CYCLE)
> pulse = 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 = {
> .n_pins = 1,
> .n_per_out = 1,
> .n_ext_ts = 1,
> + .supported_perout_flags = PTP_PEROUT_DUTY_CYCLE,
> };
>
> static void bcm_ptp_txtstamp(struct mii_timestamper *mii_ts,
>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
next prev parent reply other threads:[~2025-09-19 11:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 0:33 [PATCH net 0/3] broadcom: report the supported flags for ancillary features Jacob Keller
2025-09-19 0:33 ` [PATCH net 1/3] broadcom: fix support for PTP_PEROUT_DUTY_CYCLE Jacob Keller
2025-09-19 11:02 ` Vadim Fedorenko [this message]
2025-09-19 0:33 ` [PATCH net 2/3] broadcom: fix support for PTP_EXTTS_REQUEST2 ioctl Jacob Keller
2025-09-19 11:03 ` Vadim Fedorenko
2025-09-19 0:33 ` [PATCH net 3/3] ptp: document behavior of PTP_STRICT_FLAGS Jacob Keller
2025-09-19 11:04 ` Vadim Fedorenko
2025-09-19 2:56 ` [PATCH net 0/3] broadcom: report the supported flags for ancillary features Richard Cochran
2025-09-19 8:39 ` Kory Maincent
2025-09-20 0:04 ` Jakub Kicinski
2025-09-21 1:26 ` James Clark
2025-09-22 19:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dbfe6e10-f7f1-4a79-abc1-37151235bc5c@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=jacob.e.keller@intel.com \
--cc=jjc@jclark.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=yrk@meta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).