diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-11-25 17:43:15 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-11-25 17:43:15 +0300 |
commit | 83bae01182ea755280adc1c3a24032d63a614ede (patch) | |
tree | f05249057a392e750c0622bbdd3620e19aafd031 /drivers/net/phy/dp83640.c | |
parent | cf25e24db61cc9df42c47485a2ec2bff4e9a3692 (diff) | |
parent | 7b8474466ed97be458c825f34a85f2c2b84c3f95 (diff) | |
download | linux-83bae01182ea755280adc1c3a24032d63a614ede.tar.xz |
Merge branch 'timers/urgent' into timers/core, to pick up fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/net/phy/dp83640.c')
-rw-r--r-- | drivers/net/phy/dp83640.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index 6580094161a9..8f241b57fcf6 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -469,6 +469,19 @@ static int ptp_dp83640_enable(struct ptp_clock_info *ptp, switch (rq->type) { case PTP_CLK_REQ_EXTTS: + /* Reject requests with unsupported flags */ + if (rq->extts.flags & ~(PTP_ENABLE_FEATURE | + PTP_RISING_EDGE | + PTP_FALLING_EDGE | + PTP_STRICT_FLAGS)) + return -EOPNOTSUPP; + + /* Reject requests to enable time stamping on both edges. */ + if ((rq->extts.flags & PTP_STRICT_FLAGS) && + (rq->extts.flags & PTP_ENABLE_FEATURE) && + (rq->extts.flags & PTP_EXTTS_EDGES) == PTP_EXTTS_EDGES) + return -EOPNOTSUPP; + index = rq->extts.index; if (index >= N_EXT_TS) return -EINVAL; @@ -491,6 +504,9 @@ static int ptp_dp83640_enable(struct ptp_clock_info *ptp, return 0; case PTP_CLK_REQ_PEROUT: + /* Reject requests with unsupported flags */ + if (rq->perout.flags) + return -EOPNOTSUPP; if (rq->perout.index >= N_PER_OUT) return -EINVAL; return periodic_output(clock, rq, on, rq->perout.index); |