Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1447368

Re: [Intel-wired-lan] [PATCH net] e1000e: fix PTP on e1000_pch_lpt variants

From Jarod Wilson <jarod@redhat.com>
Newsgroups linux.kernel
Subject Re: [Intel-wired-lan] [PATCH net] e1000e: fix PTP on e1000_pch_lpt variants
Date 2016-07-20 19:10 +0200
Message-ID <rX3aq-4fX-31@gated-at.bofh.it> (permalink)
References <rWJOq-ca-25@gated-at.bofh.it> <rWK7L-kN-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jul 19, 2016 at 08:49:03PM +0000, Rustad, Mark D wrote:
> Jarod Wilson <jarod@redhat.com> wrote:
> 
> >I've got reports that the Intel I-218V NIC in Intel NUC5i5RYH systems used
> >as a PTP slave experiences random ~10 hour clock jumps, which are resolved
> >if the same workaround for the 82574 and 82583 is employed. Switching from
> >an if to a select, because the list of NIC types could well grow further
> >and we'd already have to wrap the conditionals.
> >
> >CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> >CC: intel-wired-lan@lists.osuosl.org
> >CC: netdev@vger.kernel.org
> >Signed-off-by: Jarod Wilson <jarod@redhat.com>
> >---
> > drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c
> >b/drivers/net/ethernet/intel/e1000e/netdev.c
> >index 2b2e2f8..866fea0 100644
> >--- a/drivers/net/ethernet/intel/e1000e/netdev.c
> >+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> >@@ -4335,7 +4335,10 @@ static cycle_t
> >e1000e_cyclecounter_read(const struct cyclecounter *cc)
> > 	systim = (cycle_t)systimel;
> > 	systim |= (cycle_t)systimeh << 32;
> >
> >-	if ((hw->mac.type == e1000_82574) || (hw->mac.type == e1000_82583)) {
> >+	switch (hw->mac.type) {
> >+	case e1000_82574:
> >+	case e1000_82583:
> >+	case e1000_pch_lpt:
> > 		u64 time_delta, rem, temp;
> > 		u32 incvalue;
> > 		int i;
> 
> I don't think that it is acceptable to declare local variables
> inside a switch statement quite like this. At a minimum, a new block
> needs to be opened to allow the declarations.

Gah, sorry, I think testing was done with an if, made a late change to a
switch without doing sufficient re-testing. I'll fix that up and re-test.

-- 
Jarod Wilson
jarod@redhat.com

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net] e1000e: fix PTP on e1000_pch_lpt variants Jarod Wilson <jarod@redhat.com> - 2016-07-19 22:30 +0200
  Re: [Intel-wired-lan] [PATCH net] e1000e: fix PTP on e1000_pch_lpt  variants "Rustad, Mark D" <mark.d.rustad@intel.com> - 2016-07-19 22:50 +0200
    Re: [Intel-wired-lan] [PATCH net] e1000e: fix PTP on e1000_pch_lpt  variants Jarod Wilson <jarod@redhat.com> - 2016-07-20 19:10 +0200
  Re: [PATCH net] e1000e: fix PTP on e1000_pch_lpt variants Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-07-20 13:10 +0200
  [PATCH net-next 1/2] e1000e: factor out systim sanitization Jarod Wilson <jarod@redhat.com> - 2016-07-23 18:50 +0200
  [PATCH v2 net-next 0/2] e1000e: fix PTP on e1000_pch_variants Jarod Wilson <jarod@redhat.com> - 2016-07-23 18:50 +0200
    [PATCH net-next 2/2] e1000e: fix PTP on e1000_pch_lpt variants Jarod Wilson <jarod@redhat.com> - 2016-07-23 18:50 +0200
    Re: [Intel-wired-lan] [PATCH v2 net-next 0/2] e1000e: fix PTP on  e1000_pch_variants Jesse Brandeburg <jesse.brandeburg@intel.com> - 2016-07-25 20:00 +0200

csiph-web