e1000e: factor out systim sanitization
authorJarod Wilson <jarod@redhat.com>
Tue, 26 Jul 2016 18:25:34 +0000 (14:25 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 16 Aug 2016 17:46:19 +0000 (10:46 -0700)
commit0be5b96cd8400aeb4bf3f8c5e7f5efaa38ae5055
tree8cde5e0f3ca02b259e4edb81b3cb708afc6df538
parent0066c8b6f4050d7c57f6379d6fd4535e2f267f17
e1000e: factor out systim sanitization

This is prepatory work for an expanding list of adapter families that have
occasional ~10 hour clock jumps when being used for PTP. Factor out the
sanitization function and convert to using a feature (bug) flag, per
suggestion from Jesse Brandeburg.

Littering functional code with device-specific checks is much messier than
simply checking a flag, and having device-specific init set flags as needed.
There are probably a number of other cases in the e1000e code that
could/should be converted similarly.

Suggested-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/82571.c
drivers/net/ethernet/intel/e1000e/e1000.h
drivers/net/ethernet/intel/e1000e/netdev.c