Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369905
b: refs/heads/master
c: fe86d71
h: refs/heads/master
i:
  369903: c510b4c
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Apr 30, 2013
1 parent 4a51333 commit 454f9bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97cd1ee6ef24eadf42bb199ab20bdc07cf919939
refs/heads/master: fe86d714168f1567989c309f73a3550022686301
8 changes: 4 additions & 4 deletions trunk/drivers/net/ethernet/mellanox/mlx4/en_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ void mlx4_en_fill_hwtstamps(struct mlx4_en_dev *mdev,
void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev)
{
struct mlx4_dev *dev = mdev->dev;
u64 ns;

memset(&mdev->cycles, 0, sizeof(mdev->cycles));
mdev->cycles.read = mlx4_en_read_clock;
Expand All @@ -133,10 +134,9 @@ void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev)
/* Calculate period in seconds to call the overflow watchdog - to make
* sure counter is checked at least once every wrap around.
*/
mdev->overflow_period =
(cyclecounter_cyc2ns(&mdev->cycles,
mdev->cycles.mask) / NSEC_PER_SEC / 2)
* HZ;
ns = cyclecounter_cyc2ns(&mdev->cycles, mdev->cycles.mask);
do_div(ns, NSEC_PER_SEC / 2 / HZ);
mdev->overflow_period = ns;
}

void mlx4_en_ptp_overflow_check(struct mlx4_en_dev *mdev)
Expand Down

0 comments on commit 454f9bb

Please sign in to comment.