Skip to content

Commit 6e6c88d

Browse files
jacob-kellerkuba-moo
authored andcommitted
broadcom: fix support for PTP_PEROUT_DUTY_CYCLE
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 d9f3e9e ("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 <[email protected]> Fixes: d9f3e9e ("net: ptp: introduce .supported_perout_flags to ptp_clock_info") Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Vadim Fedorenko <[email protected]> Acked-by: Richard Cochran <[email protected]> Reviewed-by: Kory Maincent <[email protected]> Tested-by: James Clark <[email protected]> Link: https://patch.msgid.link/20250918-jk-fix-bcm-phy-supported-flags-v1-1-747b60407c9c@intel.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b65678c commit 6e6c88d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/net/phy/bcm-phy-ptp.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,6 @@ static int bcm_ptp_perout_locked(struct bcm_ptp_private *priv,
597597

598598
period = BCM_MAX_PERIOD_8NS; /* write nonzero value */
599599

600-
/* Reject unsupported flags */
601-
if (req->flags & ~PTP_PEROUT_DUTY_CYCLE)
602-
return -EOPNOTSUPP;
603-
604600
if (req->flags & PTP_PEROUT_DUTY_CYCLE)
605601
pulse = ktime_to_ns(ktime_set(req->on.sec, req->on.nsec));
606602
else
@@ -741,6 +737,7 @@ static const struct ptp_clock_info bcm_ptp_clock_info = {
741737
.n_pins = 1,
742738
.n_per_out = 1,
743739
.n_ext_ts = 1,
740+
.supported_perout_flags = PTP_PEROUT_DUTY_CYCLE,
744741
};
745742

746743
static void bcm_ptp_txtstamp(struct mii_timestamper *mii_ts,

0 commit comments

Comments
 (0)