lkml.org 
[lkml]   [2014]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH net-next 08/11] net: ixgbe: convert to timecounter adjtime.
    Date
    This patch changes the driver to use the new and improved method
    for adjusting the offset of a timecounter.

    Compile tested only.

    Signed-off-by: Richard Cochran <richardcochran@gmail.com>
    ---
    drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 11 +----------
    1 file changed, 1 insertion(+), 10 deletions(-)

    diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
    index 5fd4b52..47c29ea 100644
    --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
    +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
    @@ -261,18 +261,9 @@ static int ixgbe_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
    struct ixgbe_adapter *adapter =
    container_of(ptp, struct ixgbe_adapter, ptp_caps);
    unsigned long flags;
    - u64 now;

    spin_lock_irqsave(&adapter->tmreg_lock, flags);
    -
    - now = timecounter_read(&adapter->tc);
    - now += delta;
    -
    - /* reset the timecounter */
    - timecounter_init(&adapter->tc,
    - &adapter->cc,
    - now);
    -
    + timecounter_adjtime(&adapter->tc, delta);
    spin_unlock_irqrestore(&adapter->tmreg_lock, flags);

    ixgbe_ptp_setup_sdp(adapter);
    --
    1.7.10.4


    \
     
     \ /
      Last update: 2014-12-21 20:21    [W:10.667 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site