diff options
author | Igor Russkikh <irusskikh@marvell.com> | 2020-06-26 21:40:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-27 02:32:51 +0300 |
commit | 4378b882bf03f2e0471b7d92fa97a7227ff3a126 (patch) | |
tree | 57d16b10cc704cb6ad3632962205f810aa1c683d /drivers/net/ethernet/aquantia/atlantic/aq_ptp.c | |
parent | 8664240e303827de2d40f38fc397d1912309359c (diff) | |
download | linux-4378b882bf03f2e0471b7d92fa97a7227ff3a126.tar.xz |
net: atlantic: put ptp code under IS_REACHABLE check
A1 requires additional processing for both egress and ingress to support
PTP.
And it makes sense to get rid of this processing altogether (via ifdef),
if PTP clock is disabled globally.
This patch puts the PTP code under the corresponding IS_REACHABLE check.
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/aq_ptp.c')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_ptp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c index 599ced261b2a..cb9bf41470fd 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only -/* Aquantia Corporation Network Driver - * Copyright (C) 2014-2019 Aquantia Corporation. All rights reserved +/* Atlantic Network Driver + * + * Copyright (C) 2014-2019 aQuantia Corporation + * Copyright (C) 2019-2020 Marvell International Ltd. */ /* File aq_ptp.c: @@ -18,6 +20,8 @@ #include "aq_phy.h" #include "aq_filters.h" +#if IS_REACHABLE(CONFIG_PTP_1588_CLOCK) + #define AQ_PTP_TX_TIMEOUT (HZ * 10) #define POLL_SYNC_TIMER_MS 15 @@ -1389,3 +1393,4 @@ static void aq_ptp_poll_sync_work_cb(struct work_struct *w) schedule_delayed_work(&aq_ptp->poll_sync, timeout); } } +#endif |