diff options
author | David S. Miller <davem@davemloft.net> | 2019-11-16 18:47:31 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-16 21:51:42 -0800 |
commit | 19b7e21c55c81713c4011278143006af9f232504 (patch) | |
tree | e1312ccebbc23ee6b6928d1d02d644a15d695b67 /drivers/net/dsa | |
parent | 1e8795b1b20d2721620165434cdcf427ecd2ba85 (diff) | |
parent | 1d4c79ed324ad780cfc3ad38364ba1fd585dd2a8 (diff) | |
download | linux-19b7e21c55c81713c4011278143006af9f232504.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Lots of overlapping changes and parallel additions, stuff
like that.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/ptp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/ptp.c b/drivers/net/dsa/mv88e6xxx/ptp.c index 073cbd0bb91b..d838c174dc0d 100644 --- a/drivers/net/dsa/mv88e6xxx/ptp.c +++ b/drivers/net/dsa/mv88e6xxx/ptp.c @@ -273,6 +273,19 @@ static int mv88e6352_ptp_enable_extts(struct mv88e6xxx_chip *chip, int pin; int err; + /* 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; + pin = ptp_find_pin(chip->ptp_clock, PTP_PF_EXTTS, rq->extts.index); if (pin < 0) |