X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=drivers%2Fnet%2Fethernet%2Fintel%2Figb%2Figb_ptp.c;h=8baf3fd459e43870f5dbdde9d8f7958246c7c519;hb=9aacfb2023c67c8e797bf1f9ba5e095c5a09d296;hp=794c139f0cc04f86bf8319ea7e42840677db2c6c;hpb=5ee22beeb25a5fa7fc6daf3597a8d9265f8c9ce1;p=cascardo%2Flinux.git diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c index 794c139f0cc0..8baf3fd459e4 100644 --- a/drivers/net/ethernet/intel/igb/igb_ptp.c +++ b/drivers/net/ethernet/intel/igb/igb_ptp.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "igb.h" @@ -256,14 +257,9 @@ static int igb_ptp_adjtime_82576(struct ptp_clock_info *ptp, s64 delta) struct igb_adapter *igb = container_of(ptp, struct igb_adapter, ptp_caps); unsigned long flags; - s64 now; spin_lock_irqsave(&igb->tmreg_lock, flags); - - now = timecounter_read(&igb->tc); - now += delta; - timecounter_init(&igb->tc, &igb->cc, now); - + timecounter_adjtime(&igb->tc, delta); spin_unlock_irqrestore(&igb->tmreg_lock, flags); return 0;