mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
Merge branch 'broadcom-report-the-supported-flags-for-ancillary-features'
Jacob Keller says: ==================== broadcom: report the supported flags for ancillary features James Clark reported off list that the broadcom PHY PTP driver was incorrectly handling PTP_EXTTS_REQUEST and PTP_PEROUT_REQUEST ioctls since the conversion to the .supported_*_flags fields. This series fixes the driver to correctly report its flags through the .supported_perout_flags and .supported_extts_flags fields. It also contains an update to comment the behavior of the PTP_STRICT_FLAGS being always enabled for PTP_EXTTS_REQUEST2. I plan to follow up this series with some improvements to the PTP documentation better explaining each flag and the expectation of the driver APIs. ==================== Link: https://patch.msgid.link/20250918-jk-fix-bcm-phy-supported-flags-v1-0-747b60407c9c@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
207b45e853
|
|
@ -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,8 @@ 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,
|
||||
.supported_extts_flags = PTP_STRICT_FLAGS | PTP_RISING_EDGE,
|
||||
};
|
||||
|
||||
static void bcm_ptp_txtstamp(struct mii_timestamper *mii_ts,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@
|
|||
|
||||
/*
|
||||
* 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 | \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user