diff options
| author | Ingo Molnar <[email protected]> | 2019-11-25 15:43:15 +0100 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2019-11-25 15:43:15 +0100 |
| commit | 83bae01182ea755280adc1c3a24032d63a614ede (patch) | |
| tree | f05249057a392e750c0622bbdd3620e19aafd031 /drivers/net/ethernet/renesas/ravb_ptp.c | |
| parent | cf25e24db61cc9df42c47485a2ec2bff4e9a3692 (diff) | |
| parent | 7b8474466ed97be458c825f34a85f2c2b84c3f95 (diff) | |
Merge branch 'timers/urgent' into timers/core, to pick up fix
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/renesas/ravb_ptp.c')
| -rw-r--r-- | drivers/net/ethernet/renesas/ravb_ptp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_ptp.c b/drivers/net/ethernet/renesas/ravb_ptp.c index 9a42580693cb..6984bd5b7da9 100644 --- a/drivers/net/ethernet/renesas/ravb_ptp.c +++ b/drivers/net/ethernet/renesas/ravb_ptp.c @@ -182,6 +182,13 @@ static int ravb_ptp_extts(struct ptp_clock_info *ptp, struct net_device *ndev = priv->ndev; unsigned long flags; + /* Reject requests with unsupported flags */ + if (req->flags & ~(PTP_ENABLE_FEATURE | + PTP_RISING_EDGE | + PTP_FALLING_EDGE | + PTP_STRICT_FLAGS)) + return -EOPNOTSUPP; + if (req->index) return -EINVAL; @@ -211,6 +218,10 @@ static int ravb_ptp_perout(struct ptp_clock_info *ptp, unsigned long flags; int error = 0; + /* Reject requests with unsupported flags */ + if (req->flags) + return -EOPNOTSUPP; + if (req->index) return -EINVAL; |