lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <b422fb386d81ed94464530d3775cd3e1336ae867.1348299094.git.richardcochran@gmail.com> Date: Sat, 22 Sep 2012 09:42:53 +0200 From: Richard Cochran <richardcochran@...il.com> To: <netdev@...r.kernel.org> Cc: Ben Hutchings <bhutchings@...arflare.com>, David Miller <davem@...emloft.net>, Jacob Keller <jacob.e.keller@...el.com>, Jeff Kirsher <jeffrey.t.kirsher@...el.com>, John Stultz <john.stultz@...aro.org>, Matthew Vick <matthew.vick@...el.com> Subject: [PATCH V2 net-next 1/4] ptp: remember the adjusted frequency This patch adds a field to the representation of a PTP hardware clock in order to remember the frequency adjustment value dialed by the user. Adding this field will let us answer queries in the manner of adjtimex in a follow on patch. Signed-off-by: Richard Cochran <richardcochran@...il.com> --- drivers/ptp/ptp_clock.c | 1 + drivers/ptp/ptp_private.h | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c index 966875d..67e628e 100644 --- a/drivers/ptp/ptp_clock.c +++ b/drivers/ptp/ptp_clock.c @@ -147,6 +147,7 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct timex *tx) } else if (tx->modes & ADJ_FREQUENCY) { err = ops->adjfreq(ops, scaled_ppm_to_ppb(tx->freq)); + ptp->dialed_frequency = tx->freq; } return err; diff --git a/drivers/ptp/ptp_private.h b/drivers/ptp/ptp_private.h index 4d5b508..69d3207 100644 --- a/drivers/ptp/ptp_private.h +++ b/drivers/ptp/ptp_private.h @@ -45,6 +45,7 @@ struct ptp_clock { dev_t devid; int index; /* index into clocks.map */ struct pps_device *pps_source; + long dialed_frequency; /* remembers the frequency adjustment */ struct timestamp_event_queue tsevq; /* simple fifo for time stamps */ struct mutex tsevq_mux; /* one process at a time reading the fifo */ wait_queue_head_t tsev_wq; -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists