]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: extract PTP clock device from ptp_init
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 16 May 2014 05:12:27 +0000 (05:12 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 27 May 2014 06:53:10 +0000 (23:53 -0700)
commita7d3bf644954ad9d613a0074c1fa6677d8c4cda9
tree1edc6d6ebc8bc8ed57e150d441b9a76e3ed228c2
parent3e28ea9891f3e54a99b0bc65a4a5f59ab6e6a4f2
ixgbe: extract PTP clock device from ptp_init

In order to properly handle a suspend/resume cycle, we cannot destroy
the PTP clock device. As part of this, we should only re-create the
device on first initialization. After a resume, when ixgbe_ptp_init is
called, we won't create a new clock, and we will use the old clock
device. To that end, this patch extracts the clock creation out of
ptp_init, and only calls it if we don't already have a ptp_clock
pointer.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c