[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CD6E221E.1657D%matthew.vick@intel.com>
Date: Tue, 19 Mar 2013 21:17:25 +0000
From: "Vick, Matthew" <matthew.vick@...el.com>
To: Jiri Benc <jbenc@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "e1000-devel@...ts.sourceforge.net"
<e1000-devel@...ts.sourceforge.net>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
Stefan Assmann <sassmann@...hat.com>,
Miroslav Lichvar <mlichvar@...hat.com>
Subject: Re: [PATCH] igb: fix PHC stopping on max freq
On 3/19/13 7:42 AM, "Jiri Benc" <jbenc@...hat.com> wrote:
>For 82576 MAC type, max_adj is reported as 1000000000 ppb. However, if
>this value is passed to igb_ptp_adjfreq_82576, incvalue overflows out of
>INCVALUE_82576_MASK, resulting in setting of zero TIMINCA.incvalue,
>stopping
>the PHC (instead of going at twice the nominal speed).
>
>Fix the advertised max_adj value to the largest value hardware can handle.
>As there is no min_adj value available (-max_adj is used instead), this
>will
>also prevent stopping the clock intentionally. It's probably not a big
>deal,
>other igb MAC types don't support stopping the clock, either.
>
>Signed-off-by: Jiri Benc <jbenc@...hat.com>
>---
> drivers/net/ethernet/intel/igb/igb_ptp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c
>b/drivers/net/ethernet/intel/igb/igb_ptp.c
>index 0987822..0a23750 100644
>--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
>+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
>@@ -740,7 +740,7 @@ void igb_ptp_init(struct igb_adapter *adapter)
> case e1000_82576:
> snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr);
> adapter->ptp_caps.owner = THIS_MODULE;
>- adapter->ptp_caps.max_adj = 1000000000;
>+ adapter->ptp_caps.max_adj = 999999881;
> adapter->ptp_caps.n_ext_ts = 0;
> adapter->ptp_caps.pps = 0;
> adapter->ptp_caps.adjfreq = igb_ptp_adjfreq_82576;
>--
>1.7.6.5
Good catch on this, Jiri! I know the math works out the same, but I'd
prefer it if you changed the max_adj value to 999999999, since that is
technically what we can accept before we have any issues. If you re-submit
with this change, I'll add my ACK and we can run it through our internal
testing. Thanks!
Matthew
Matthew Vick
Linux Development
Networking Division
Intel Corporation
--
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