summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_ptp.h
diff options
context:
space:
mode:
authorSergey Temerkhanov <sergey.temerkhanov@intel.com>2024-08-21 15:09:56 +0200
committerTony Nguyen <anthony.l.nguyen@intel.com>2024-10-01 11:11:38 -0700
commite800654e85b5b27966fc6493201f5f8cf658beb6 (patch)
tree775cfd551dfd6f21203905cdd0cf3819e7686e5e /drivers/net/ethernet/intel/ice/ice_ptp.h
parentfdb7f54700b1c88e734323a62fea986d9ce5a9c6 (diff)
ice: Use ice_adapter for PTP shared data instead of auxdev
Use struct ice_adapter to hold shared PTP data and control PTP related actions instead of auxbus. This allows significant code simplification and faster access to the container fields used in the PTP support code. Move the PTP port list to the ice_adapter container to simplify the code and avoid race conditions which could occur due to the synchronous nature of the initialization/access and certain memory saving can be achieved by moving PTP data into the ice_adapter itself. Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_ptp.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_ptp.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.h b/drivers/net/ethernet/intel/ice/ice_ptp.h
index b8ab162a5538..cc36d6ffdc8f 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.h
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.h
@@ -138,7 +138,7 @@ struct ice_ptp_tx {
* ready for PTP functionality. It is used to track the port initialization
* and determine when the port's PHY offset is valid.
*
- * @list_member: list member structure of auxiliary device
+ * @list_node: list member structure
* @tx: Tx timestamp tracking for this port
* @aux_dev: auxiliary device associated with this port
* @ov_work: delayed work task for tracking when PHY offset is valid
@@ -148,7 +148,7 @@ struct ice_ptp_tx {
* @port_num: the port number this structure represents
*/
struct ice_ptp_port {
- struct list_head list_member;
+ struct list_head list_node;
struct ice_ptp_tx tx;
struct auxiliary_device aux_dev;
struct kthread_delayed_work ov_work;
@@ -174,6 +174,7 @@ enum ice_ptp_tx_interrupt {
* @ports: list of porst handled by this port owner
* @lock: protect access to ports list
*/
+
struct ice_ptp_port_owner {
struct auxiliary_driver aux_driver;
struct list_head ports;