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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 17 Nov 2014 23:24:27 +0000 From: "Keller, Jacob E" <jacob.e.keller@...el.com> To: "richardcochran@...il.com" <richardcochran@...il.com> CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "davem@...emloft.net" <davem@...emloft.net>, "Allan, Bruce W" <bruce.w.allan@...el.com>, "Ronciak, John" <john.ronciak@...el.com>, "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>, "Vick, Matthew" <matthew.vick@...el.com> Subject: Re: [PATCH net-next 3/4] igb: enable internal PPS for the i210. On Tue, 2014-11-18 at 00:06 +0100, Richard Cochran wrote: > The i210 device can produce an interrupt on the full second. This > patch allows using this interrupt to generate an internal PPS event > for adjusting the kernel system time. > > Signed-off-by: Richard Cochran <richardcochran@...il.com> > --- > drivers/net/ethernet/intel/igb/igb_main.c | 6 ++++++ > drivers/net/ethernet/intel/igb/igb_ptp.c | 32 +++++++++++++++++++++++++++-- > 2 files changed, 36 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > index 7183a56..9412661 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > @@ -5386,8 +5386,14 @@ void igb_update_stats(struct igb_adapter *adapter, > static void igb_tsync_interrupt(struct igb_adapter *adapter) > { > struct e1000_hw *hw = &adapter->hw; > + struct ptp_clock_event event; > u32 tsicr = rd32(E1000_TSICR); > > + if (tsicr & TSINTR_SYS_WRAP) { > + event.type = PTP_CLOCK_PPS; > + ptp_clock_event(adapter->ptp_clock, &event); > + } > + Nice! I hadn't thought of using the SYS_WRAP around interrupt for pps. Much simpler than having to setup a SDP pin trigger. Regards, Jake
Powered by blists - more mailing lists