aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_adapter.h
diff options
context:
space:
mode:
authorSergey Temerkhanov <[email protected]>2024-08-21 13:09:54 +0000
committerTony Nguyen <[email protected]>2024-10-01 18:11:38 +0000
commit97ed20a01f5b96e8738b53f56ae84b06953a2853 (patch)
treeeb6dbab566c95afde67c605eca87184157f6927c /drivers/net/ethernet/intel/ice/ice_adapter.h
parentice: Introduce ice_get_phy_model() wrapper (diff)
downloadkernel-97ed20a01f5b96e8738b53f56ae84b06953a2853.tar.gz
kernel-97ed20a01f5b96e8738b53f56ae84b06953a2853.zip
ice: Add ice_get_ctrl_ptp() wrapper to simplify the code
Add ice_get_ctrl_ptp() wrapper to simplify the PTP support code in the functions that do not use ctrl_pf directly. Add the control PF pointer to struct ice_adapter Rearrange fields in struct ice_adapter Signed-off-by: Sergey Temerkhanov <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_adapter.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_adapter.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_adapter.h b/drivers/net/ethernet/intel/ice/ice_adapter.h
index 9d11014ec02f..eb7cac01c242 100644
--- a/drivers/net/ethernet/intel/ice/ice_adapter.h
+++ b/drivers/net/ethernet/intel/ice/ice_adapter.h
@@ -8,18 +8,21 @@
#include <linux/refcount_types.h>
struct pci_dev;
+struct ice_pf;
/**
* struct ice_adapter - PCI adapter resources shared across PFs
* @ptp_gltsyn_time_lock: Spinlock protecting access to the GLTSYN_TIME
* register of the PTP clock.
* @refcount: Reference count. struct ice_pf objects hold the references.
+ * @ctrl_pf: Control PF of the adapter
*/
struct ice_adapter {
+ refcount_t refcount;
/* For access to the GLTSYN_TIME register */
spinlock_t ptp_gltsyn_time_lock;
- refcount_t refcount;
+ struct ice_pf *ctrl_pf;
};
struct ice_adapter *ice_adapter_get(const struct pci_dev *pdev);