aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-03-31 12:01:21 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-31 12:33:27 -0400
commit32eaf120e66b1763626ed564adf1e42e69da82f4 (patch)
treef22ecbd443cfe9448523e8e637353e771c3b1a5e /drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
parentd482994fca82380912b3a80201b74d5118ff0487 (diff)
parented7c6317bc599502e1fdc7f5f95cb9a5550360a4 (diff)
Merge branch 'ptp-2038'
Fixed two warnings in e1000e and igb, when switching to timespec64 some printf formats started to not match. In theses cases actually the new type is __kernel_time_t which is __kernel_long_t which unfortunately can be either "long" or "long long". So to solve this I cases the arguments to "long long". -DaveM Richard Cochran says: ==================== ptp: get ready for 2038 This series converts the core driver methods of the PTP Hardware Clock (PHC) subsystem to use the 64 bit version of the timespec structure, making the core API ready for the year 2038. In addition, I reviewed how each driver and device represents the time value at the hardware register level. Most of the drivers are ready, but a few will need some work before the year 2038, as shown: Patch Driver ------------------------------------------------ 12 drivers/net/ethernet/intel/igb/igb_ptp.c 15 ? drivers/net/ethernet/sfc/ptp.c 16 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c The commit log messages document how each driver is ready or why it is not ready. For patch 15, I could not easily find out the hardware representation of the time value, and so the SFC maintainers will have to review their low level code in order to resolve any remaining issues. * ChangeLog ** V3 - dp83640: use timespec64 throughout per Arnd's suggestion - tilegx: use timespec64 throughout per Chris' suggestion - add Jeff's acked-bys ** V2 - use the new methods in the posix clock code right away (patch #3) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_ptp.c')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_ptp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c b/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
index d966044e017a..02008e976d18 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c
@@ -285,7 +285,7 @@ static int fm10k_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
return 0;
}
-static int fm10k_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts)
+static int fm10k_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
{
struct fm10k_intfc *interface;
unsigned long flags;
@@ -297,17 +297,17 @@ static int fm10k_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts)
now = fm10k_systime_read(interface) + interface->ptp_adjust;
read_unlock_irqrestore(&interface->systime_lock, flags);
- *ts = ns_to_timespec(now);
+ *ts = ns_to_timespec64(now);
return 0;
}
static int fm10k_ptp_settime(struct ptp_clock_info *ptp,
- const struct timespec *ts)
+ const struct timespec64 *ts)
{
struct fm10k_intfc *interface;
unsigned long flags;
- u64 ns = timespec_to_ns(ts);
+ u64 ns = timespec64_to_ns(ts);
interface = container_of(ptp, struct fm10k_intfc, ptp_caps);
@@ -419,8 +419,8 @@ void fm10k_ptp_register(struct fm10k_intfc *interface)
ptp_caps->max_adj = 976562;
ptp_caps->adjfreq = fm10k_ptp_adjfreq;
ptp_caps->adjtime = fm10k_ptp_adjtime;
- ptp_caps->gettime = fm10k_ptp_gettime;
- ptp_caps->settime = fm10k_ptp_settime;
+ ptp_caps->gettime64 = fm10k_ptp_gettime;
+ ptp_caps->settime64 = fm10k_ptp_settime;
/* provide pins if BAR4 is accessible */
if (interface->sw_addr) {