Skip to content
Commit fbd5e2df authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher
Browse files

i40e: only create PTP device node once



Currently every time we run through the i40e_ptp_init routine, we create
a new device node. This function is called by i40e_reset_and_rebuild
which is used to handle reset of the device. Even though the 1588
registers only get cleared on a GLOBAL reset, this function is still
called to handle a CORE reset.

This causes a leak of PTP device nodes at every reset. To fix this,
break PTP device clock node creation out of i40e_ptp_init, and only call
this if we don't already have a device created. Further invocation of
i40e_ptp_init will not generate new PTP devices. Instead, only the
necessary work required to reconfigure 1588 will be done.

This change also fixes an issue where a reset can cause the
device to forget it's timestamp configuration, and revert to the default
mode.

Change-ID: I741d01c61d9fe1d24887859d1316e1a8a892909e
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent d19af2af
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment