summaryrefslogtreecommitdiff
path: root/drivers/net/phy/dp83640.c
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2019-11-14 21:45:02 +0300
committerDavid S. Miller <davem@davemloft.net>2019-11-15 23:48:32 +0300
commit6138e687c7b679da08c0feb55a88f448f7890c07 (patch)
tree5fa29b3639962a57b0b0e7e81690311ff2b06710 /drivers/net/phy/dp83640.c
parent592025a03b34927f35852058c933ffcd7c500321 (diff)
downloadlinux-6138e687c7b679da08c0feb55a88f448f7890c07.tar.xz
ptp: Introduce strict checking of external time stamp options.
User space may request time stamps on rising edges, falling edges, or both. However, the particular mode may or may not be supported in the hardware or in the driver. This patch adds a "strict" flag that tells drivers to ensure that the requested mode will be honored. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/dp83640.c')
-rw-r--r--drivers/net/phy/dp83640.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index 2781b0e2d947..3bba2bea3a88 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -472,7 +472,8 @@ static int ptp_dp83640_enable(struct ptp_clock_info *ptp,
/* Reject requests with unsupported flags */
if (rq->extts.flags & ~(PTP_ENABLE_FEATURE |
PTP_RISING_EDGE |
- PTP_FALLING_EDGE))
+ PTP_FALLING_EDGE |
+ PTP_STRICT_FLAGS))
return -EOPNOTSUPP;
index = rq->extts.index;
if (index >= N_EXT_TS)