Commit 4fa7011d authored by David S. Miller's avatar David S. Miller
Browse files


Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2023-09-18 (ice)

This series contains updates to ice driver only.

Sergey prepends ICE_ to PTP timer commands to clearly convey namespace
of commands.

Karol adds retrying to acquire hardware semaphore for cross-timestamping
and avoids writing to timestamp registers on E822 devices. He also
renames some defines to be more clear and align with the data sheet.
Additionally, a range check is moved in order to reduce duplicated code.

Jake adds cross-timestamping support for E823 devices as well as adds
checks against netlist to aid in determining support for GNSS. He also
corrects improper pin assignment for certain E810-T devices and
refactors/cleanups PTP related code such as adding PHY model to ease checks
for different needed implementations, removing unneeded EXTTS flag, and
adding macro to check for source timer owner.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a76c22e2 89776a6a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -196,9 +196,10 @@

#define ice_pf_to_dev(pf) (&((pf)->pdev->dev))

#define ice_pf_src_tmr_owned(pf) ((pf)->hw.func_caps.ts_func_info.src_tmr_owned)

enum ice_feature {
	ICE_F_DSCP,
	ICE_F_PTP_EXTTS,
	ICE_F_PHY_RCLK,
	ICE_F_SMA_CTRL,
	ICE_F_CGU,
+2 −0
Original line number Diff line number Diff line
@@ -1393,6 +1393,7 @@ struct ice_aqc_link_topo_params {
#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM	8
#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_CTRL	9
#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX	10
#define ICE_AQC_LINK_TOPO_NODE_TYPE_GPS		11
#define ICE_AQC_LINK_TOPO_NODE_CTX_S		4
#define ICE_AQC_LINK_TOPO_NODE_CTX_M		\
				(0xF << ICE_AQC_LINK_TOPO_NODE_CTX_S)
@@ -1435,6 +1436,7 @@ struct ice_aqc_get_link_topo {
#define ICE_AQC_GET_LINK_TOPO_NODE_NR_E822_PHY		0x30
#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827		0x31
#define ICE_AQC_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX	0x47
#define ICE_AQC_GET_LINK_TOPO_NODE_NR_GEN_GPS		0x48
	u8 rsvd[9];
};

+15 −0
Original line number Diff line number Diff line
@@ -2764,6 +2764,21 @@ bool ice_is_pf_c827(struct ice_hw *hw)
	return false;
}

/**
 * ice_is_gps_in_netlist
 * @hw: pointer to the hw struct
 *
 * Check if the GPS generic device is present in the netlist
 */
bool ice_is_gps_in_netlist(struct ice_hw *hw)
{
	if (ice_find_netlist_node(hw, ICE_AQC_LINK_TOPO_NODE_TYPE_GPS,
				  ICE_AQC_GET_LINK_TOPO_NODE_NR_GEN_GPS, NULL))
		return false;

	return true;
}

/**
 * ice_aq_list_caps - query function/device capabilities
 * @hw: pointer to the HW struct
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode,
		    struct ice_aqc_get_phy_caps_data *caps,
		    struct ice_sq_cd *cd);
bool ice_is_pf_c827(struct ice_hw *hw);
bool ice_is_gps_in_netlist(struct ice_hw *hw);
int
ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number,
		      u16 *node_handle);
+3 −0
Original line number Diff line number Diff line
@@ -389,6 +389,9 @@ bool ice_gnss_is_gps_present(struct ice_hw *hw)
	if (!hw->func_caps.ts_func_info.src_tmr_owned)
		return false;

	if (!ice_is_gps_in_netlist(hw))
		return false;

#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
	if (ice_is_e810t(hw)) {
		int err;
Loading