ice: refactor PTP feature flags
Subsystems (2)
cover ice: refactor PTP feature flags
This series refactors and extends the feature flag detection for a couple of PTP feature flags. This includes ICE_F_GNSS and ICE_F_SMA_CTRL. Instead of blindly assuming the feature is enabled on all E810-T devices, check the netlist to confirm that the feature is supported on that device and platform.
For SMA control, this allows the driver to fallback to the fixed pin configuration that is supported by default E810 configurations when the SMA control is not accessible.
For GNSS, this ensures that we do not attempt to read the GNSS portion of the device if its not present, avoiding some unnecessary warning messages.
For ICE_F_SMA_CTRL this could be seen as a fix, but given the scope of the code I decided that its next material. I think of it more as extending the feature capability to support pins on more platforms.
Jacob Keller (4):
ice: remove ICE_F_PTP_EXTTS feature flag
ice: don't enable PTP related capabilities on non-owner PFs
ice: check the netlist before enabling ICE_F_SMA_CTRL
ice: check netlist before enabling ICE_F_GNSS
drivers/net/ethernet/intel/ice/ice.h | 1 - .../net/ethernet/intel/ice/ice_adminq_cmd.h | 8 +++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 12 +++-- drivers/net/ethernet/intel/ice/ice_ptp.c | 4 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 31 +++++++++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 2 + 8 files changed, 96 insertions(+), 11 deletions(-)
base-commit: 361b86237e1afbf2c3be7cb604b6aac6f8b8c38c
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 1/4 ice: remove ICE_F_PTP_EXTTS feature flag
The ICE_F_PTP_EXTTS feature flag is ostensibly intended to support checking whether the device supports external timestamp pins. It is only checked in E810-specific code flows, and is enabled for all E810-based devices. E822 and E823 flows unconditionally enable external timestamp support.
This makes the feature flag meaningless, as it is always enabled. Just unconditionally enable support for external timestamp pins and remove this unnecessary flag.
--- drivers/net/ethernet/intel/ice/ice.h | 1 - drivers/net/ethernet/intel/ice/ice_lib.c | 1 - drivers/net/ethernet/intel/ice/ice_ptp.c | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +0 -1
@@ -199,7 +199,6 @@enum ice_feature {ICE_F_DSCP , -ICE_F_PTP_EXTTS ,ICE_F_SMA_CTRL ,ICE_F_GNSS ,ICE_F_ROCE_LAG ,
drivers/net/ethernet/intel/ice/ice_lib.c +0 -1
@@ -3986,7 +3986,6 @@ void ice_init_feature_support(struct ice_pf *pf)case ICE_DEV_ID_E810C_QSFP :case ICE_DEV_ID_E810C_SFP :ice_set_feature_support (pf,ICE_F_DSCP ); -ice_set_feature_support (pf,ICE_F_PTP_EXTTS );if (ice_is_e810t (&pf->hw)) {ice_set_feature_support (pf,ICE_F_SMA_CTRL );if (ice_gnss_is_gps_present (&pf->hw))
drivers/net/ethernet/intel/ice/ice_ptp.c +1 -3
@@ -2205,9 +2205,7 @@ static void ice_ptp_setup_pins_e810(struct ice_pf *pf, struct ptp_clock_info *info) { info->n_per_out = N_PER_OUT_E810; - -if (ice_is_feature_supported (pf,ICE_F_PTP_EXTTS )) - info->n_ext_ts =N_EXT_TS_E810 ; + info->n_ext_ts =N_EXT_TS_E810 ;if (ice_is_feature_supported (pf,ICE_F_SMA_CTRL )) { info->n_ext_ts =N_EXT_TS_E810 ;
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 1/4 ice: remove ICE_F_PTP_EXTTS feature flag
In reply to Jacob KellerThe ICE_F_PTP_EXTTS feature flag is ostensibly intended to support checking whether the device supports external timestamp pins. It is only checked in E810-specific code flows, and is enabled for all E810-based devices. E822 and E823 flows unconditionally enable external timestamp support.
This makes the feature flag meaningless, as it is always enabled. Just unconditionally enable support for external timestamp pins and remove this unnecessary flag.
--- drivers/net/ethernet/intel/ice/ice.h | 1 - drivers/net/ethernet/intel/ice/ice_lib.c | 1 - drivers/net/ethernet/intel/ice/ice_ptp.c | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +0 -1
@@ -199,7 +199,6 @@enum ice_feature {ICE_F_DSCP , -ICE_F_PTP_EXTTS ,ICE_F_SMA_CTRL ,ICE_F_GNSS ,ICE_F_ROCE_LAG ,
drivers/net/ethernet/intel/ice/ice_lib.c +0 -1
@@ -3986,7 +3986,6 @@ void ice_init_feature_support(struct ice_pf *pf)case ICE_DEV_ID_E810C_QSFP :case ICE_DEV_ID_E810C_SFP :ice_set_feature_support (pf,ICE_F_DSCP ); -ice_set_feature_support (pf,ICE_F_PTP_EXTTS );if (ice_is_e810t (&pf->hw)) {ice_set_feature_support (pf,ICE_F_SMA_CTRL );if (ice_gnss_is_gps_present (&pf->hw))
drivers/net/ethernet/intel/ice/ice_ptp.c +1 -3
@@ -2205,9 +2205,7 @@ static void ice_ptp_setup_pins_e810(struct ice_pf *pf, struct ptp_clock_info *info) { info->n_per_out = N_PER_OUT_E810; - -if (ice_is_feature_supported (pf,ICE_F_PTP_EXTTS )) - info->n_ext_ts =N_EXT_TS_E810 ; + info->n_ext_ts =N_EXT_TS_E810 ;if (ice_is_feature_supported (pf,ICE_F_SMA_CTRL )) { info->n_ext_ts =N_EXT_TS_E810 ;
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 2/4 ice: don't enable PTP related capabilities on non-owner PFs
In reply to Jacob KellerThe ice driver currently sets feature flags for certain PTP related capabilities based on whether the device has support for the feature. Avoid enabling these capabilities except on the ports which own the timer. This ensures that the driver never attempts to access the features except on the ports designated as controlling the main timer functionality.
--- drivers/net/ethernet/intel/ice/ice_lib.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/ice/ice_lib.c +3 -0
@@ -3986,6 +3986,9 @@ void ice_init_feature_support(struct ice_pf *pf)case ICE_DEV_ID_E810C_QSFP :case ICE_DEV_ID_E810C_SFP :ice_set_feature_support (pf,ICE_F_DSCP ); +/* If we don't own the timer - don't enable other caps */ +if (!ice_pf_src_tmr_owned (pf)) +break ;if (ice_is_e810t (&pf->hw)) {ice_set_feature_support (pf,ICE_F_SMA_CTRL );if (ice_gnss_is_gps_present (&pf->hw))
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 2/4 ice: don't enable PTP related capabilities on non-owner PFs
In reply to Jacob KellerThe ice driver currently sets feature flags for certain PTP related capabilities based on whether the device has support for the feature. Avoid enabling these capabilities except on the ports which own the timer. This ensures that the driver never attempts to access the features except on the ports designated as controlling the main timer functionality.
--- drivers/net/ethernet/intel/ice/ice_lib.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/ice/ice_lib.c +3 -0
@@ -3986,6 +3986,9 @@ void ice_init_feature_support(struct ice_pf *pf)case ICE_DEV_ID_E810C_QSFP :case ICE_DEV_ID_E810C_SFP :ice_set_feature_support (pf,ICE_F_DSCP ); +/* If we don't own the timer - don't enable other caps */ +if (!ice_pf_src_tmr_owned (pf)) +break ;if (ice_is_e810t (&pf->hw)) {ice_set_feature_support (pf,ICE_F_SMA_CTRL );if (ice_gnss_is_gps_present (&pf->hw))
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
cover ice: refactor PTP feature flags
In reply to Jacob KellerThis series refactors and extends the feature flag detection for a couple of PTP feature flags. This includes ICE_F_GNSS and ICE_F_SMA_CTRL. Instead of blindly assuming the feature is enabled on all E810-T devices, check the netlist to confirm that the feature is supported on that device and platform.
For SMA control, this allows the driver to fallback to the fixed pin configuration that is supported by default E810 configurations when the SMA control is not accessible.
For GNSS, this ensures that we do not attempt to read the GNSS portion of the device if its not present, avoiding some unnecessary warning messages.
For ICE_F_SMA_CTRL this could be seen as a fix, but given the scope of the code I decided that its next material. I think of it more as extending the feature capability to support pins on more platforms.
Jacob Keller (4):
ice: remove ICE_F_PTP_EXTTS feature flag
ice: don't enable PTP related capabilities on non-owner PFs
ice: check the netlist before enabling ICE_F_SMA_CTRL
ice: check netlist before enabling ICE_F_GNSS
drivers/net/ethernet/intel/ice/ice.h | 1 - .../net/ethernet/intel/ice/ice_adminq_cmd.h | 8 +++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 12 +++-- drivers/net/ethernet/intel/ice/ice_ptp.c | 4 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 31 +++++++++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 2 + 8 files changed, 96 insertions(+), 11 deletions(-)
base-commit: 361b86237e1afbf2c3be7cb604b6aac6f8b8c38c
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 3/4 ice: check the netlist before enabling ICE_F_SMA_CTRL
In reply to Jacob KellerCurrently, the ice driver unconditionally enables ICE_F_SMA_CTRL for all E810-T based devices. In some cases, the SMA control access is not available in the netlist firmware component. In such a case, the driver will fail to setup the SMA pins. When this happens, the driver prints "Failed to configure E810-T SMA pin control" and forcibly disables all PTP pin configuration support.
This results in failure to use even the fixed pin capabilities of standard E810 devices, resulting in reduced functionality.
To avoid this, check the netlist for the SMA control module before enabling the ICE_F_SMA_CTRL feature. If the netlist lacks this module, then the feature will not be enabled. In this case, the driver flow for enabling periodic outputs and external timestamps will fall back to the standard fixed pin configuration.
This allows supporting the software defined pins on a wider array of platforms.
--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 6 ++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 3 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 16 +++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 6 files changed, 72 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +4 -2
@@ -1367,6 +1367,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE 6#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8 +#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX 10#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)
@@ -1403,8 +1404,9 @@ struct ice_aqc_link_topo_addr {struct ice_aqc_get_link_topo {struct ice_aqc_link_topo_addr addr;u8 node_part_num; -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47u8 rsvd[9 ]; };
drivers/net/ethernet/intel/ice/ice_common.c +46 -0
52 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_common.h +3 -0
@@ -94,6 +94,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, struct ice_sq_cd *cd);bool ice_is_pf_c827 (struct ice_hw *hw);int +ice_find_netlist_node (struct ice_hw *hw,u8 node_type_ctx,u8 node_part_number, +u16 *node_handle); +int ice_aq_list_caps (struct ice_hw *hw,void *buf,u16 buf_size,u32 *cap_count,enum ice_adminq_opc opc,struct ice_sq_cd *cd);int
drivers/net/ethernet/intel/ice/ice_lib.c +2 -1
@@ -3989,8 +3989,9 @@ void ice_init_feature_support(struct ice_pf *pf)/* If we don't own the timer - don't enable other caps */ if (!ice_pf_src_tmr_owned (pf))break ; -if (ice_is_e810t (&pf->hw)) { +if (ice_is_clock_mux_present_e810t (&pf->hw))ice_set_feature_support (pf,ICE_F_SMA_CTRL ); +if (ice_is_e810t (&pf->hw)) {if (ice_gnss_is_gps_present (&pf->hw))ice_set_feature_support (pf,ICE_F_GNSS ); }
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +16 -0
@@ -3018,6 +3018,22 @@ ice_get_pca9575_handle(struct ice_hw *hw, u16 *pca9575_handle)return 0 ; } +/** +* ice_is_clock_mux_present_e810t +* @hw: pointer to the hw struct +* +* Check if the Clock Multiplexer device is present in the netlist +*/ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw) +{ +if (ice_find_netlist_node (hw,ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX , +ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX , +NULL )) +return false; + +return true; +} +/** * ice_read_sma_ctrl_e810t * @hw: pointer to the hw struct
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1 -0
@@ -195,6 +195,7 @@ int ice_phy_cfg_tx_offset_e822(struct ice_hw *hw, u8 port);int ice_phy_cfg_rx_offset_e822 (struct ice_hw *hw,u8 port);/* E810 family functions */ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw);int ice_ptp_init_phy_e810 (struct ice_hw *hw);int ice_read_sma_ctrl_e810t (struct ice_hw *hw,u8 *data);int ice_write_sma_ctrl_e810t (struct ice_hw *hw,u8 data);
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Re: [Intel-wired-lan] [PATCH iwl-next 3/4] ice: check the netlist before enabling ICE_F_SMA_CTRL
Quoted 129 lines · Jacob Keller
Currently, the ice driver unconditionally enables
ICE_F_SMA_CTRLfor all E810-T based devices. In some cases, the SMA control access is not available in the netlist firmware component. In such a case, the driver will fail to setup the SMA pins. When this happens, the driver prints "Failed to configure E810-T SMA pin control" and forcibly disables all PTP pin configuration support.This results in failure to use even the fixed pin capabilities of standard E810 devices, resulting in reduced functionality.
To avoid this, check the netlist for the SMA control module before enabling the
ICE_F_SMA_CTRLfeature. If the netlist lacks this module, then the feature will not be enabled. In this case, the driver flow for enabling periodic outputs and external timestamps will fall back to the standard fixed pin configuration.This allows supporting the software defined pins on a wider array of platforms.
Signed-off-by Jacob Keller <[email protected]>--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 6 ++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 3 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 16 +++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 6 files changed, 72 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +4
-2@@ -1367,6 +1367,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE 6#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8 +#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX 10#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)@@ -1403,8 +1404,9 @@ struct ice_aqc_link_topo_addr {struct ice_aqc_get_link_topo {struct ice_aqc_link_topo_addr addr;u8 node_part_num; -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47u8 rsvd[9 ]; };drivers/net/ethernet/intel/ice/ice_common.c +46
-0@@ -2503,6 +2503,52 @@ bool ice_is_pf_c827(struct ice_hw *hw)return false; } +#define MAX_NETLIST_SIZE 10 +/** +* ice_find_netlist_node +* @hw: pointer to the hw struct +* @node_type_ctx: type of netlist node to look for +* @node_part_number: node part number to look for +* @node_handle: output parameter if node found - optional +* +* Find and return the node handle for a given node type and part number in the +* netlist. When found 0 is returned, -ENOENT otherwise. If +* node_handle provided, it would be set to found node handle. +*/ +int +ice_find_netlist_node (struct ice_hw *hw,u8 node_type_ctx,u8 node_part_number, +u16 *node_handle) +{ +struct ice_aqc_get_link_topo cmd; +u8 rec_node_part_number; +u16 rec_node_handle; +u8 idx; + +for (idx =0 ; idx <MAX_NETLIST_SIZE ; idx++) { +int status; + +memset (&cmd,0 ,sizeof (cmd)); + + cmd.addr.topo_params.node_type_ctx = + (node_type_ctx <<ICE_AQC_LINK_TOPO_NODE_TYPE_S ); + cmd.addr.topo_params.index = idx; + + status =ice_aq_get_netlist_node (hw, &cmd, + &rec_node_part_number, + &rec_node_handle); +if (status) +return status; + +if (rec_node_part_number == node_part_number) { +if (node_handle) + *node_handle = rec_node_handle; +return 0 ; + } + } + +return -ENOENT ; +} +/** * ice_aq_list_caps - query function/device capabilities * @hw: pointer to the HW struct drivers/net/ethernet/intel/ice/ice_common.h +3
-0@@ -94,6 +94,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, struct ice_sq_cd *cd);bool ice_is_pf_c827 (struct ice_hw *hw);int +ice_find_netlist_node (struct ice_hw *hw,u8 node_type_ctx,u8 node_part_number, +u16 *node_handle); +int ice_aq_list_caps (struct ice_hw *hw,void *buf,u16 buf_size,u32 *cap_count,enum ice_adminq_opc opc,struct ice_sq_cd *cd);int drivers/net/ethernet/intel/ice/ice_lib.c +0
-0
drivers/net/ethernet/intel/ice/ice_lib.c void ice_init_feature_support(struct ice_pf *pf) · line 3997
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_lib.c +2
-1@@ -3989,8 +3989,9 @@ void ice_init_feature_support(struct ice_pf *pf)/* If we don't own the timer - don't enable other caps */ if (!ice_pf_src_tmr_owned (pf))break ; -if (ice_is_e810t (&pf->hw)) { +if (ice_is_clock_mux_present_e810t (&pf->hw))ice_set_feature_support (pf,ICE_F_SMA_CTRL ); +if (ice_is_e810t (&pf->hw)) {if (ice_gnss_is_gps_present (&pf->hw))ice_set_feature_support (pf,ICE_F_GNSS ); }
This change also revealed a subtle issue with pin setup in ice_ptp.c, where the E810-T device needs to use a different fallback value for the pin count. I'll send a v2 of this series tomorrow with an additional patch to fix that up.
Thanks,
Jake
Quoted 32 lines
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +16
-0@@ -3018,6 +3018,22 @@ ice_get_pca9575_handle(struct ice_hw *hw, u16 *pca9575_handle)return 0 ; } +/** +* ice_is_clock_mux_present_e810t +* @hw: pointer to the hw struct +* +* Check if the Clock Multiplexer device is present in the netlist +*/ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw) +{ +if (ice_find_netlist_node (hw,ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX , +ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX , +NULL )) +return false; + +return true; +} +/** * ice_read_sma_ctrl_e810t * @hw: pointer to the hw struct drivers/net/ethernet/intel/ice/ice_ptp_hw.h +0
-0
drivers/net/ethernet/intel/ice/ice_ptp_hw.h int ice_phy_cfg_tx_offset_e822(struct ice_hw *hw, u8 port); · line 201
Quoted 7 lines
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1
-0@@ -195,6 +195,7 @@ int ice_phy_cfg_tx_offset_e822(struct ice_hw *hw, u8 port);int ice_phy_cfg_rx_offset_e822 (struct ice_hw *hw,u8 port);/* E810 family functions */ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw);int ice_ptp_init_phy_e810 (struct ice_hw *hw);int ice_read_sma_ctrl_e810t (struct ice_hw *hw,u8 *data);int ice_write_sma_ctrl_e810t (struct ice_hw *hw,u8 data);
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
kernel test robot
build botRe: [Intel-wired-lan] [PATCH iwl-next 3/4] ice: check the netlist before enabling ICE_F_SMA_CTRL
In reply to Jacob Kellerkernel test robot noticed the following build errors:
Hi Jacob,
kernel test robot noticed the following build errors:
[auto build test ERROR on 361b86237e1afbf2c3be7cb604b6aac6f8b8c38c]
url: https://github.com/intel-lab-lkp/linux/commits/Jacob-Keller/ice-remove-ICE_F_PTP_EXTTS-feature-flag/20230816-063804 base: 361b86237e1afbf2c3be7cb604b6aac6f8b8c38c patch link: https://lore.kernel.org/r/20230815223551.1238091-4-jacob.e.keller%40intel.com patch subject: [Intel-wired-lan] [PATCH iwl-next 3/4] ice: check the netlist before enabling ICE_F_SMA_CTRL config: x86_64-buildonly-randconfig-r001-20230816 (https://download.01.org/0day-ci/archive/20230816/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20230816/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>, old ones prefixed by <<):
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/com20020_cs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/broadcom/bcm4908_enet.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/freescale/enetc/fsl-enetc-core.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/litex/litex_liteeth.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/dummy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/eql.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/appletalk/ipddp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/plip/plip.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/sungem_phy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ieee802154/fakelb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_aec.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_pruss.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/yenta_socket.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/libcomposite.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ss_lb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/u_ether.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ncm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_rndis.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_fs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_uvc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_midi.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_hid.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/legacy/g_zero.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/i2c/busses/i2c-qup.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/common/uvc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/v4l2-core/v4l2-async.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/v4l2-core/v4l2-fwnode.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/radio/si470x/radio-si470x-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/asus_atk0110.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/thermal/intel/intel_soc_dts_iosf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/watchdog/menz69_wdt.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cpuidle/cpuidle-haltpoll.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/blink/leds-bcm63138.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/flash/leds-rt4505.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_userspace.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/fsl_imx8_ddr_perf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwtracing/intel_th/intel_th_msu_sink.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvmem/nvmem_brcm_nvram.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mm-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mq-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mn-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/greybus/greybus.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-core.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-scom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/core/snd-pcm-dmaengine.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-ab8500-codec.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-sigmadsp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-wm-adsp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-i2s.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-pdm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-pci.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-mach.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/snd-acp-config.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/fsl/imx-pcm-dma.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/qcom/snd-soc-qcom-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/ac97_bus.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/bytestream-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/dma-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/inttype-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/record-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kmemleak/kmemleak-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/802/stp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/802/mrp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_hfsc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_ingress.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_teql.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_prio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_netem.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_drr.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_ets.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_choke.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_etf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_taprio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ipip.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ah4.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/xfrm4_tunnel.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/tunnel4.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/inet_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/tcp_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/udp_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/raw_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv6/sit.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/8021q/8021q.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/vmw_vsock/vsock_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/bridge/bridge.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/atm/atm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sctp/sctp_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/caif.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/chnl_net.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/caif_socket.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ieee802154/6lowpan/ieee802154_6lowpan.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ieee802154/ieee802154_socket.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/nfc/nci/nci.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/nfc/nci/nci_spi.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/nfc/nfc_digital.o
>> ERROR: modpost: "ice_is_clock_mux_present_e810t" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Przemek Kitszel
maintainerRe: [Intel-wired-lan] [PATCH iwl-next 3/4] ice: check the netlist before enabling ICE_F_SMA_CTRL
In reply to Jacob KellerQuoted 16 lines · Jacob Keller
Currently, the ice driver unconditionally enables
ICE_F_SMA_CTRLfor all E810-T based devices. In some cases, the SMA control access is not available in the netlist firmware component. In such a case, the driver will fail to setup the SMA pins. When this happens, the driver prints "Failed to configure E810-T SMA pin control" and forcibly disables all PTP pin configuration support.This results in failure to use even the fixed pin capabilities of standard E810 devices, resulting in reduced functionality.
To avoid this, check the netlist for the SMA control module before enabling the
ICE_F_SMA_CTRLfeature. If the netlist lacks this module, then the feature will not be enabled. In this case, the driver flow for enabling periodic outputs and external timestamps will fall back to the standard fixed pin configuration.
Quoted 4 lines
This allows supporting the software defined pins on a wider array of platforms.
Signed-off-by Jacob Keller <[email protected]>
Overall it's a nice series!
Quoted 50 lines
--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 6 ++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 3 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 16 +++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 6 files changed, 72 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +4
-2@@ -1367,6 +1367,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE 6#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8 +#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX 10#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)@@ -1403,8 +1404,9 @@ struct ice_aqc_link_topo_addr {struct ice_aqc_get_link_topo {struct ice_aqc_link_topo_addr addr;u8 node_part_num; -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47u8 rsvd[9 ]; };drivers/net/ethernet/intel/ice/ice_common.c +9
-0@@ -2503,6 +2503,52 @@ bool ice_is_pf_c827(struct ice_hw *hw)return false; } +#define MAX_NETLIST_SIZE 10 +/** +* ice_find_netlist_node +* @hw: pointer to the hw struct +* @node_type_ctx: type of netlist node to look for +* @node_part_number: node part number to look for +* @node_handle: output parameter if node found - optional +* +* Find and return the node handle for a given node type and part number in the
drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw) · line 2524
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_common.c +10
-0+* netlist. When found 0 is returned, -ENOENT otherwise. If +* node_handle provided, it would be set to found node handle. +*/ +int +ice_find_netlist_node (struct ice_hw *hw,u8 node_type_ctx,u8 node_part_number, +u16 *node_handle) +{ +struct ice_aqc_get_link_topo cmd; +u8 rec_node_part_number; +u16 rec_node_handle;
I see that you are using separate variable to 'do not touch' @node_handle param if it does not need to be updated. But perhaps you could consider to just pass @node_handle in place of @rec_node_handle below, and have less code? I do not see any non-null usage of the field anyway.
(rationale: our code is so self-similar that I needed to check wheater you are basing-of recent changes by Jan&Karol or re-doing them ;)
answer: we are fine here :)).
drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw) · line 2533
Quoted 9 lines
drivers/net/ethernet/intel/ice/ice_common.c +9
-0+u8 idx; + +for (idx =0 ; idx <MAX_NETLIST_SIZE ; idx++) { +int status; + +memset (&cmd,0 ,sizeof (cmd)); + + cmd.addr.topo_params.node_type_ctx = + (node_type_ctx <<ICE_AQC_LINK_TOPO_NODE_TYPE_S );
I would FIELD_PREP() here
and perhaps convert @cmd scope to inside the loop, that would enable = { .addr.topo_params = { ... } } declaration
Quoted 82 lines
drivers/net/ethernet/intel/ice/ice_common.c +18
-0+ cmd.addr.topo_params.index = idx; + + status =ice_aq_get_netlist_node (hw, &cmd, + &rec_node_part_number, + &rec_node_handle); +if (status) +return status; + +if (rec_node_part_number == node_part_number) { +if (node_handle) + *node_handle = rec_node_handle; +return 0 ; + } + } + +return -ENOENT ; +} +/** * ice_aq_list_caps - query function/device capabilities * @hw: pointer to the HW struct drivers/net/ethernet/intel/ice/ice_common.h +3
-0@@ -94,6 +94,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, struct ice_sq_cd *cd);bool ice_is_pf_c827 (struct ice_hw *hw);int +ice_find_netlist_node (struct ice_hw *hw,u8 node_type_ctx,u8 node_part_number, +u16 *node_handle); +int ice_aq_list_caps (struct ice_hw *hw,void *buf,u16 buf_size,u32 *cap_count,enum ice_adminq_opc opc,struct ice_sq_cd *cd);int drivers/net/ethernet/intel/ice/ice_lib.c +2
-1@@ -3989,8 +3989,9 @@ void ice_init_feature_support(struct ice_pf *pf)/* If we don't own the timer - don't enable other caps */ if (!ice_pf_src_tmr_owned (pf))break ; -if (ice_is_e810t (&pf->hw)) { +if (ice_is_clock_mux_present_e810t (&pf->hw))ice_set_feature_support (pf,ICE_F_SMA_CTRL ); +if (ice_is_e810t (&pf->hw)) {if (ice_gnss_is_gps_present (&pf->hw))ice_set_feature_support (pf,ICE_F_GNSS ); }drivers/net/ethernet/intel/ice/ice_ptp_hw.c +16
-0@@ -3018,6 +3018,22 @@ ice_get_pca9575_handle(struct ice_hw *hw, u16 *pca9575_handle)return 0 ; } +/** +* ice_is_clock_mux_present_e810t +* @hw: pointer to the hw struct +* +* Check if the Clock Multiplexer device is present in the netlist +*/ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw) +{ +if (ice_find_netlist_node (hw,ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX , +ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX , +NULL )) +return false; + +return true; +} +/** * ice_read_sma_ctrl_e810t * @hw: pointer to the hw struct drivers/net/ethernet/intel/ice/ice_ptp_hw.h +0
-0
drivers/net/ethernet/intel/ice/ice_ptp_hw.h int ice_phy_cfg_tx_offset_e822(struct ice_hw *hw, u8 port); · line 201
Quoted 7 lines
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1
-0@@ -195,6 +195,7 @@ int ice_phy_cfg_tx_offset_e822(struct ice_hw *hw, u8 port);int ice_phy_cfg_rx_offset_e822 (struct ice_hw *hw,u8 port);/* E810 family functions */ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw);int ice_ptp_init_phy_e810 (struct ice_hw *hw);int ice_read_sma_ctrl_e810t (struct ice_hw *hw,u8 *data);int ice_write_sma_ctrl_e810t (struct ice_hw *hw,u8 data);
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Re: [Intel-wired-lan] [PATCH iwl-next 3/4] ice: check the netlist before enabling ICE_F_SMA_CTRL
Quoted 110 lines
-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Wednesday, August 16, 2023 3:54 AM
To: Keller, Jacob E <[email protected]>; Intel Wired LAN <intel-wired- [email protected]>
Cc: Kolacinski, Karol <[email protected]>; Nguyen, Anthony L <[email protected]>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next 3/4] ice: check the netlist before enablingICE_F_SMA_CTRLQuoted 16 lines · Jacob Keller
Currently, the ice driver unconditionally enables
ICE_F_SMA_CTRLfor all E810-T based devices. In some cases, the SMA control access is not available in the netlist firmware component. In such a case, the driver will fail to setup the SMA pins. When this happens, the driver prints "Failed to configure E810-T SMA pin control" and forcibly disables all PTP pin configuration support.This results in failure to use even the fixed pin capabilities of standard E810 devices, resulting in reduced functionality.
To avoid this, check the netlist for the SMA control module before enabling the
ICE_F_SMA_CTRLfeature. If the netlist lacks this module, then the feature will not be enabled. In this case, the driver flow for enabling periodic outputs and external timestamps will fall back to the standard fixed pin configuration.Quoted 4 lines
This allows supporting the software defined pins on a wider array of platforms.
Signed-off-by Jacob Keller <[email protected]>Overall it's a nice series!
Review
Quoted 10 lines
--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 6 ++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 3 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 16 +++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 6 files changed, 72 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.hQuoted 12 lines
index
90616750e779..82c4daf0a825100644drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +1
-0@@ -1367,6 +1367,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE 6#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8 +#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX 10#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)drivers/net/ethernet/intel/ice/ice_adminq_cmd.h struct ice_aqc_link_topo_addr { · line 1407
Quoted 6 lines
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +1
-2@@ -1403,8 +1404,9 @@ struct ice_aqc_link_topo_addr {struct ice_aqc_get_link_topo {struct ice_aqc_link_topo_addr addr;u8 node_part_num; -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21drivers/net/ethernet/intel/ice/ice_adminq_cmd.h struct ice_aqc_link_topo_addr { · line 1408
Quoted 1 line
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +1
-0+#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31drivers/net/ethernet/intel/ice/ice_adminq_cmd.h struct ice_aqc_link_topo_addr { · line 1409
Quoted 1 line
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +1
-0+#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47Review
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +0
-0u8 rsvd[9 ]; };(quoted diff) +0
-0
b/drivers/net/ethernet/intel/ice/ice_common.cQuoted 6 lines
index
2652e4f5c4a2..9eeda3f5aa75100644drivers/net/ethernet/intel/ice/ice_common.c +0
-0@@ -2503,6 +2503,52 @@ bool ice_is_pf_c827(struct ice_hw *hw)return false; }drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw) · line 2514
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_common.c +9
-0+#define MAX_NETLIST_SIZE 10 +/** +* ice_find_netlist_node +* @hw: pointer to the hw struct +* @node_type_ctx: type of netlist node to look for +* @node_part_number: node part number to look for +* @node_handle: output parameter if node found - optional +* +* Find and return the node handle for a given node type and part number in the
drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw)
Quoted 5 lines
drivers/net/ethernet/intel/ice/ice_common.c +5
-0+* netlist. When found 0 is returned, -ENOENT otherwise. If +* node_handle provided, it would be set to found node handle. +*/ +int +ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8
node_part_number,drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw) · line 2524
Quoted 5 lines
drivers/net/ethernet/intel/ice/ice_common.c +5
-0+ u16 *node_handle) +{ +struct ice_aqc_get_link_topo cmd; +u8 rec_node_part_number; +u16 rec_node_handle;I see that you are using separate variable to 'do not touch' @node_handle param if it does not need to be updated.
But perhaps you could consider to just pass @node_handle in place of @rec_node_handle below, and have less code?
I do not see any non-null usage of the field anyway.
Quoted 3 lines
(rationale: our code is so self-similar that I needed to check wheater you are basing-of recent changes by Jan&Karol or re-doing them ;)
answer: we are fine here :)).
I can look at that. (I mostly took this from the implementation as-is in the sourceforge driver...)
Quoted 12 lines
drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw)
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_common.c +9
-0+u8 idx; + +for (idx =0 ; idx <MAX_NETLIST_SIZE ; idx++) { +int status; + +memset (&cmd,0 ,sizeof (cmd)); + + cmd.addr.topo_params.node_type_ctx = + (node_type_ctx <<
ICE_AQC_LINK_TOPO_NODE_TYPE_S);
Quoted 4 lines
I would
FIELD_PREP()hereand perhaps convert @cmd scope to inside the loop, that would enable = { .addr.topo_params = { ... } } declaration
I can look into that.
Quoted 88 lines
Review
Quoted 23 lines
drivers/net/ethernet/intel/ice/ice_common.c +18
-0+ cmd.addr.topo_params.index = idx; + + status =ice_aq_get_netlist_node (hw, &cmd, + &rec_node_part_number, + &rec_node_handle); +if (status) +return status; + +if (rec_node_part_number == node_part_number) { +if (node_handle) + *node_handle = rec_node_handle; +return 0 ; + } + } + +return -ENOENT ; +} +/** * ice_aq_list_caps - query function/device capabilities * @hw: pointer to the HW struct (quoted diff) +0
-0
b/drivers/net/ethernet/intel/ice/ice_common.hdrivers/net/ethernet/intel/ice/ice_common.h ice_aq_get_phy_caps(struct ice_port_info *pi, bool
Quoted 4 lines
index
2250a9c5f61e..f7178a5686a5100644drivers/net/ethernet/intel/ice/ice_common.h +0
-0@@ -94,6 +94,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool
qual_mods, u8report_mode,drivers/net/ethernet/intel/ice/ice_common.h ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode,
Quoted 4 lines
drivers/net/ethernet/intel/ice/ice_common.h +1
-0struct ice_sq_cd *cd);bool ice_is_pf_c827 (struct ice_hw *hw);int +ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8
node_part_number,Review
Quoted 6 lines
drivers/net/ethernet/intel/ice/ice_common.h +2
-0+ u16 *node_handle); +int ice_aq_list_caps (struct ice_hw *hw,void *buf,u16 buf_size,u32 *cap_count,enum ice_adminq_opc opc,struct ice_sq_cd *cd);int (quoted diff) +0
-0
b/drivers/net/ethernet/intel/ice/ice_lib.cReview
Quoted 15 lines
index
f29ff54383b5..4ac8998cb964100644drivers/net/ethernet/intel/ice/ice_lib.c +2
-1@@ -3989,8 +3989,9 @@ void ice_init_feature_support(struct ice_pf *pf)/* If we don't own the timer - don't enable other caps */ if (!ice_pf_src_tmr_owned (pf))break ; -if (ice_is_e810t (&pf->hw)) { +if (ice_is_clock_mux_present_e810t (&pf->hw))ice_set_feature_support (pf,ICE_F_SMA_CTRL ); +if (ice_is_e810t (&pf->hw)) {if (ice_gnss_is_gps_present (&pf->hw))ice_set_feature_support (pf,ICE_F_GNSS ); }(quoted diff) +0
-0
b/drivers/net/ethernet/intel/ice/ice_ptp_hw.cdrivers/net/ethernet/intel/ice/ice_ptp_hw.c ice_get_pca9575_handle(struct ice_hw *hw, u16
Quoted 4 lines
index
fd19afaf9c85..bd3f32bfbc78100644drivers/net/ethernet/intel/ice/ice_ptp_hw.c +0
-0@@ -3018,6 +3018,22 @@ ice_get_pca9575_handle(struct ice_hw *hw, u16
*pca9575_handle)drivers/net/ethernet/intel/ice/ice_ptp_hw.c ice_get_pca9575_handle(struct ice_hw *hw, u16 *pca9575_handle)
Quoted 12 lines
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +9
-0return 0 ; } +/** +* ice_is_clock_mux_present_e810t +* @hw: pointer to the hw struct +* +* Check if the Clock Multiplexer device is present in the netlist +*/ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw) +{ + if (ice_find_netlist_node(hw,
ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX,drivers/net/ethernet/intel/ice/ice_ptp_hw.c ice_get_pca9575_handle(struct ice_hw *hw, u16 · line 3030
Quoted 1 line
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +1
-0+
ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX,Review
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +6
-0+ NULL)) +return false; + +return true; +} +/** * ice_read_sma_ctrl_e810t * @hw: pointer to the hw struct (quoted diff) +0
-0
b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
Quoted 12 lines
drivers/net/ethernet/intel/ice/ice_ptp_hw.h int ice_phy_cfg_tx_offset_e822(struct ice_hw *hw, u8
Quoted 4 lines
index
4e3c1382c477..3768e7a01920100644drivers/net/ethernet/intel/ice/ice_ptp_hw.h +0
-0@@ -195,6 +195,7 @@ int ice_phy_cfg_tx_offset_e822(struct ice_hw *hw, u8port);
Quoted 7 lines
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1
-0int ice_phy_cfg_rx_offset_e822 (struct ice_hw *hw,u8 port);/* E810 family functions */ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw);int ice_ptp_init_phy_e810 (struct ice_hw *hw);int ice_read_sma_ctrl_e810t (struct ice_hw *hw,u8 *data);int ice_write_sma_ctrl_e810t (struct ice_hw *hw,u8 data);
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Re: [Intel-wired-lan] [PATCH iwl-next 3/4] ice: check the netlist before enabling ICE_F_SMA_CTRL
In reply to Przemek KitszelQuoted 107 lines · Przemek Kitszel
Quoted 16 lines · Jacob Keller
Currently, the ice driver unconditionally enables
ICE_F_SMA_CTRLfor all E810-T based devices. In some cases, the SMA control access is not available in the netlist firmware component. In such a case, the driver will fail to setup the SMA pins. When this happens, the driver prints "Failed to configure E810-T SMA pin control" and forcibly disables all PTP pin configuration support.This results in failure to use even the fixed pin capabilities of standard E810 devices, resulting in reduced functionality.
To avoid this, check the netlist for the SMA control module before enabling the
ICE_F_SMA_CTRLfeature. If the netlist lacks this module, then the feature will not be enabled. In this case, the driver flow for enabling periodic outputs and external timestamps will fall back to the standard fixed pin configuration.Quoted 4 lines
This allows supporting the software defined pins on a wider array of platforms.
Signed-off-by Jacob Keller <[email protected]>Overall it's a nice series!
Quoted 50 lines
--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 6 ++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 3 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 16 +++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 6 files changed, 72 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +4
-2@@ -1367,6 +1367,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE 6#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8 +#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX 10#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)@@ -1403,8 +1404,9 @@ struct ice_aqc_link_topo_addr {struct ice_aqc_get_link_topo {struct ice_aqc_link_topo_addr addr;u8 node_part_num; -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47u8 rsvd[9 ]; };drivers/net/ethernet/intel/ice/ice_common.c +9
-0@@ -2503,6 +2503,52 @@ bool ice_is_pf_c827(struct ice_hw *hw)return false; } +#define MAX_NETLIST_SIZE 10 +/** +* ice_find_netlist_node +* @hw: pointer to the hw struct +* @node_type_ctx: type of netlist node to look for +* @node_part_number: node part number to look for +* @node_handle: output parameter if node found - optional +* +* Find and return the node handle for a given node type and part number in the drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw) · line 2524
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_common.c +10
-0+* netlist. When found 0 is returned, -ENOENT otherwise. If +* node_handle provided, it would be set to found node handle. +*/ +int +ice_find_netlist_node (struct ice_hw *hw,u8 node_type_ctx,u8 node_part_number, +u16 *node_handle) +{ +struct ice_aqc_get_link_topo cmd; +u8 rec_node_part_number; +u16 rec_node_handle;I see that you are using separate variable to 'do not touch' @node_handle param if it does not need to be updated.
But perhaps you could consider to just pass @node_handle in place of @rec_node_handle below, and have less code?
I do not see any non-null usage of the field anyway.(rationale: our code is so self-similar that I needed to check wheater you are basing-of recent changes by Jan&Karol or re-doing them ;)
answer: we are fine here :)).drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw) · line 2533
Quoted 9 lines
drivers/net/ethernet/intel/ice/ice_common.c +9
-0+u8 idx; + +for (idx =0 ; idx <MAX_NETLIST_SIZE ; idx++) { +int status; + +memset (&cmd,0 ,sizeof (cmd)); + + cmd.addr.topo_params.node_type_ctx = + (node_type_ctx <<ICE_AQC_LINK_TOPO_NODE_TYPE_S );I would
FIELD_PREP()here
Quoted 3 lines
and perhaps convert @cmd scope to inside the loop, that would enable = { .addr.topo_params = { ... } } declaration
I couldn't find a nice way to make the .addr.topo_params = { ... } to look ok, so I opted against it. I did reduce variable scope though.
Thanks,
Jake
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Re: [Intel-wired-lan] [PATCH iwl-next 3/4] ice: check the netlist before enabling ICE_F_SMA_CTRL
In reply to Przemek KitszelQuoted 91 lines · Przemek Kitszel
Quoted 16 lines · Jacob Keller
Currently, the ice driver unconditionally enables
ICE_F_SMA_CTRLfor all E810-T based devices. In some cases, the SMA control access is not available in the netlist firmware component. In such a case, the driver will fail to setup the SMA pins. When this happens, the driver prints "Failed to configure E810-T SMA pin control" and forcibly disables all PTP pin configuration support.This results in failure to use even the fixed pin capabilities of standard E810 devices, resulting in reduced functionality.
To avoid this, check the netlist for the SMA control module before enabling the
ICE_F_SMA_CTRLfeature. If the netlist lacks this module, then the feature will not be enabled. In this case, the driver flow for enabling periodic outputs and external timestamps will fall back to the standard fixed pin configuration.Quoted 4 lines
This allows supporting the software defined pins on a wider array of platforms.
Signed-off-by Jacob Keller <[email protected]>Overall it's a nice series!
Quoted 50 lines
--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 6 ++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 3 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 16 +++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 6 files changed, 72 insertions(+), 3 deletions(-)drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +4
-2@@ -1367,6 +1367,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE 6#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8 +#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX 10#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)@@ -1403,8 +1404,9 @@ struct ice_aqc_link_topo_addr {struct ice_aqc_get_link_topo {struct ice_aqc_link_topo_addr addr;u8 node_part_num; -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47u8 rsvd[9 ]; };drivers/net/ethernet/intel/ice/ice_common.c +9
-0@@ -2503,6 +2503,52 @@ bool ice_is_pf_c827(struct ice_hw *hw)return false; } +#define MAX_NETLIST_SIZE 10 +/** +* ice_find_netlist_node +* @hw: pointer to the hw struct +* @node_type_ctx: type of netlist node to look for +* @node_part_number: node part number to look for +* @node_handle: output parameter if node found - optional +* +* Find and return the node handle for a given node type and part number in the drivers/net/ethernet/intel/ice/ice_common.c bool ice_is_pf_c827(struct ice_hw *hw) · line 2524
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_common.c +10
-0+* netlist. When found 0 is returned, -ENOENT otherwise. If +* node_handle provided, it would be set to found node handle. +*/ +int +ice_find_netlist_node (struct ice_hw *hw,u8 node_type_ctx,u8 node_part_number, +u16 *node_handle) +{ +struct ice_aqc_get_link_topo cmd; +u8 rec_node_part_number; +u16 rec_node_handle;I see that you are using separate variable to 'do not touch' @node_handle param if it does not need to be updated.
But perhaps you could consider to just pass @node_handle in place of @rec_node_handle below, and have less code?
I do not see any non-null usage of the field anyway.
Quoted 4 lines
(rationale: our code is so self-similar that I needed to check wheater you are basing-of recent changes by Jan&Karol or re-doing them ;)
answer: we are fine here :)).
There will be users of this function soon which want to get the node handle out, so I kept that functionality, but I did get rid of the extra variable. No user should ever care about the node_handle being modified on error. I'll note it in the function comment though.
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 3/4 ice: check the netlist before enabling ICE_F_SMA_CTRL
In reply to Jacob KellerCurrently, the ice driver unconditionally enables ICE_F_SMA_CTRL for all E810-T based devices. In some cases, the SMA control access is not available in the netlist firmware component. In such a case, the driver will fail to setup the SMA pins. When this happens, the driver prints "Failed to configure E810-T SMA pin control" and forcibly disables all PTP pin configuration support.
This results in failure to use even the fixed pin capabilities of standard E810 devices, resulting in reduced functionality.
To avoid this, check the netlist for the SMA control module before enabling the ICE_F_SMA_CTRL feature. If the netlist lacks this module, then the feature will not be enabled. In this case, the driver flow for enabling periodic outputs and external timestamps will fall back to the standard fixed pin configuration.
This allows supporting the software defined pins on a wider array of platforms.
--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 6 ++- drivers/net/ethernet/intel/ice/ice_common.c | 46 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 3 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 3 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 16 +++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 6 files changed, 72 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +4 -2
@@ -1367,6 +1367,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_CAGE 6#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8 +#define ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX 10#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)
@@ -1403,8 +1404,9 @@ struct ice_aqc_link_topo_addr {struct ice_aqc_get_link_topo {struct ice_aqc_link_topo_addr addr;u8 node_part_num; -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 -#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47u8 rsvd[9 ]; };
drivers/net/ethernet/intel/ice/ice_common.c +46 -0
52 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_common.h +3 -0
@@ -94,6 +94,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, struct ice_sq_cd *cd);bool ice_is_pf_c827 (struct ice_hw *hw);int +ice_find_netlist_node (struct ice_hw *hw,u8 node_type_ctx,u8 node_part_number, +u16 *node_handle); +int ice_aq_list_caps (struct ice_hw *hw,void *buf,u16 buf_size,u32 *cap_count,enum ice_adminq_opc opc,struct ice_sq_cd *cd);int
drivers/net/ethernet/intel/ice/ice_lib.c +2 -1
@@ -3989,8 +3989,9 @@ void ice_init_feature_support(struct ice_pf *pf)/* If we don't own the timer - don't enable other caps */ if (!ice_pf_src_tmr_owned (pf))break ; -if (ice_is_e810t (&pf->hw)) { +if (ice_is_clock_mux_present_e810t (&pf->hw))ice_set_feature_support (pf,ICE_F_SMA_CTRL ); +if (ice_is_e810t (&pf->hw)) {if (ice_gnss_is_gps_present (&pf->hw))ice_set_feature_support (pf,ICE_F_GNSS ); }
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +16 -0
@@ -3018,6 +3018,22 @@ ice_get_pca9575_handle(struct ice_hw *hw, u16 *pca9575_handle)return 0 ; } +/** +* ice_is_clock_mux_present_e810t +* @hw: pointer to the hw struct +* +* Check if the Clock Multiplexer device is present in the netlist +*/ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw) +{ +if (ice_find_netlist_node (hw,ICE_AQC_LINK_TOPO_NODE_TYPE_CLK_MUX , +ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX , +NULL )) +return false; + +return true; +} +/** * ice_read_sma_ctrl_e810t * @hw: pointer to the hw struct
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1 -0
@@ -195,6 +195,7 @@ int ice_phy_cfg_tx_offset_e822(struct ice_hw *hw, u8 port);int ice_phy_cfg_rx_offset_e822 (struct ice_hw *hw,u8 port);/* E810 family functions */ +bool ice_is_clock_mux_present_e810t (struct ice_hw *hw);int ice_ptp_init_phy_e810 (struct ice_hw *hw);int ice_read_sma_ctrl_e810t (struct ice_hw *hw,u8 *data);int ice_write_sma_ctrl_e810t (struct ice_hw *hw,u8 data);
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 4/4 ice: check netlist before enabling ICE_F_GNSS
In reply to Jacob KellerSimilar to the change made for ICE_F_SMA_CTRL, check the netlist before enabling support for ICE_F_GNSS. This ensures that the driver only enables the GNSS feature on devices which actually have the feature enabled in the firmware device configuration.
--- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 7 +++---- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 15 +++++++++++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 4 files changed, 21 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +2 -0
@@ -1368,6 +1368,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8#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)
@@ -1407,6 +1408,7 @@ struct ice_aqc_get_link_topo {#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_GPS 0x48u8 rsvd[9 ]; };
drivers/net/ethernet/intel/ice/ice_lib.c +3 -4
@@ -3991,10 +3991,9 @@ void ice_init_feature_support(struct ice_pf *pf)break ;if (ice_is_clock_mux_present_e810t (&pf->hw))ice_set_feature_support (pf,ICE_F_SMA_CTRL ); -if (ice_is_e810t (&pf->hw)) { -if (ice_gnss_is_gps_present (&pf->hw)) -ice_set_feature_support (pf,ICE_F_GNSS ); - } +if (ice_is_gps_present_e810t (&pf->hw) && +ice_gnss_is_gps_present (&pf->hw)) +ice_set_feature_support (pf,ICE_F_GNSS );break ;default :break ;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +15 -0
@@ -3034,6 +3034,21 @@ bool ice_is_clock_mux_present_e810t(struct ice_hw *hw)return true; } +/** +* ice_is_gps_present_e810t +* @hw: pointer to the hw struct +* +* Check if the GPS generic device is present in the netlist +*/ +bool ice_is_gps_present_e810t (struct ice_hw *hw) +{ +if (ice_find_netlist_node (hw,ICE_AQC_LINK_TOPO_NODE_TYPE_GPS , +ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_GPS ,NULL )) +return false; + +return true; +} +/** * ice_read_sma_ctrl_e810t * @hw: pointer to the hw struct
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1 -0
@@ -196,6 +196,7 @@ int ice_phy_cfg_rx_offset_e822(struct ice_hw *hw, u8 port);/* E810 family functions */ bool ice_is_clock_mux_present_e810t (struct ice_hw *hw); +bool ice_is_gps_present_e810t (struct ice_hw *hw);int ice_ptp_init_phy_e810 (struct ice_hw *hw);int ice_read_sma_ctrl_e810t (struct ice_hw *hw,u8 *data);int ice_write_sma_ctrl_e810t (struct ice_hw *hw,u8 data);
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Re: [Intel-wired-lan] [PATCH iwl-next 4/4] ice: check netlist before enabling ICE_F_GNSS
Quoted 38 lines · Jacob Keller
Similar to the change made for
ICE_F_SMA_CTRL, check the netlist before enabling support forICE_F_GNSS. This ensures that the driver only enables the GNSS feature on devices which actually have the feature enabled in the firmware device configuration.Signed-off-by Jacob Keller <[email protected]>--- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 7 +++---- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 15 +++++++++++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 4 files changed, 21 insertions(+), 4 deletions(-)drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +2
-0@@ -1368,6 +1368,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8#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)@@ -1407,6 +1408,7 @@ struct ice_aqc_get_link_topo {#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_GPS 0x48u8 rsvd[9 ]; };drivers/net/ethernet/intel/ice/ice_lib.c +0
-0
drivers/net/ethernet/intel/ice/ice_lib.c void ice_init_feature_support(struct ice_pf *pf) · line 3996
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_lib.c +3
-4@@ -3991,10 +3991,9 @@ void ice_init_feature_support(struct ice_pf *pf)break ;if (ice_is_clock_mux_present_e810t (&pf->hw))ice_set_feature_support (pf,ICE_F_SMA_CTRL ); -if (ice_is_e810t (&pf->hw)) { -if (ice_gnss_is_gps_present (&pf->hw)) -ice_set_feature_support (pf,ICE_F_GNSS ); - } +if (ice_is_gps_present_e810t (&pf->hw) && +ice_gnss_is_gps_present (&pf->hw)) +ice_set_feature_support (pf,ICE_F_GNSS );
The names for these two functions are incredibly similar, and I'm not sure if I have a better name. @Karol, this is what we have in our sourceforge driver now, but I'm not sure I like it.
I think I'll drop this patch from the series and we can investigate this and sort things out a bit?
Thanks,
Jake
Quoted 34 lines
drivers/net/ethernet/intel/ice/ice_lib.c +0
-0break ;default :break ;drivers/net/ethernet/intel/ice/ice_ptp_hw.c +15
-0@@ -3034,6 +3034,21 @@ bool ice_is_clock_mux_present_e810t(struct ice_hw *hw)return true; } +/** +* ice_is_gps_present_e810t +* @hw: pointer to the hw struct +* +* Check if the GPS generic device is present in the netlist +*/ +bool ice_is_gps_present_e810t (struct ice_hw *hw) +{ +if (ice_find_netlist_node (hw,ICE_AQC_LINK_TOPO_NODE_TYPE_GPS , +ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_GPS ,NULL )) +return false; + +return true; +} +/** * ice_read_sma_ctrl_e810t * @hw: pointer to the hw struct drivers/net/ethernet/intel/ice/ice_ptp_hw.h +0
-0
drivers/net/ethernet/intel/ice/ice_ptp_hw.h int ice_phy_cfg_rx_offset_e822(struct ice_hw *hw, u8 port); · line 202
Quoted 7 lines
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1
-0@@ -196,6 +196,7 @@ int ice_phy_cfg_rx_offset_e822(struct ice_hw *hw, u8 port);/* E810 family functions */ bool ice_is_clock_mux_present_e810t (struct ice_hw *hw); +bool ice_is_gps_present_e810t (struct ice_hw *hw);int ice_ptp_init_phy_e810 (struct ice_hw *hw);int ice_read_sma_ctrl_e810t (struct ice_hw *hw,u8 *data);int ice_write_sma_ctrl_e810t (struct ice_hw *hw,u8 data);
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
kernel test robot
build botRe: [Intel-wired-lan] [PATCH iwl-next 4/4] ice: check netlist before enabling ICE_F_GNSS
In reply to Jacob Kellerkernel test robot noticed the following build errors:
Hi Jacob,
kernel test robot noticed the following build errors:
[auto build test ERROR on 361b86237e1afbf2c3be7cb604b6aac6f8b8c38c]
url: https://github.com/intel-lab-lkp/linux/commits/Jacob-Keller/ice-remove-ICE_F_PTP_EXTTS-feature-flag/20230816-063804 base: 361b86237e1afbf2c3be7cb604b6aac6f8b8c38c patch link: https://lore.kernel.org/r/20230815223551.1238091-5-jacob.e.keller%40intel.com patch subject: [Intel-wired-lan] [PATCH iwl-next 4/4] ice: check netlist before enabling ICE_F_GNSS config: x86_64-buildonly-randconfig-r001-20230816 (https://download.01.org/0day-ci/archive/20230816/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20230816/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>, old ones prefixed by <<):
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/broadcom/bcm4908_enet.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/freescale/enetc/fsl-enetc-core.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ethernet/litex/litex_liteeth.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/dummy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/eql.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/appletalk/ipddp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/plip/plip.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/sungem_phy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/ieee802154/fakelb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_aec.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_pruss.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/yenta_socket.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/libcomposite.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ss_lb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/u_ether.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_ncm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_rndis.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_fs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_uvc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_midi.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/function/usb_f_hid.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/usb/gadget/legacy/g_zero.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/i2c/busses/i2c-qup.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/common/uvc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/v4l2-core/v4l2-async.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/v4l2-core/v4l2-fwnode.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/media/radio/si470x/radio-si470x-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/asus_atk0110.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/thermal/intel/intel_soc_dts_iosf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/watchdog/menz69_wdt.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cpuidle/cpuidle-haltpoll.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/blink/leds-bcm63138.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/leds/flash/leds-rt4505.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/devfreq/governor_userspace.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/perf/fsl_imx8_ddr_perf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwtracing/intel_th/intel_th_msu_sink.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvmem/nvmem_brcm_nvram.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mm-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mq-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mn-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/greybus/greybus.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-core.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-scom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/core/snd-pcm-dmaengine.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-ab8500-codec.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-sigmadsp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-wm-adsp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-i2s.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-pdm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-pci.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-mach.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/snd-acp-config.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/fsl/imx-pcm-dma.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/qcom/snd-soc-qcom-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/ac97_bus.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/bytestream-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/dma-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/inttype-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/record-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kmemleak/kmemleak-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/802/stp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/802/mrp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_hfsc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_ingress.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_teql.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_prio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_netem.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_drr.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_ets.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_choke.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_etf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/sch_taprio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ipip.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ah4.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/xfrm4_tunnel.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/tunnel4.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/inet_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/tcp_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/udp_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/raw_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv6/sit.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/8021q/8021q.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/vmw_vsock/vsock_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/bridge/bridge.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/atm/atm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/sctp/sctp_diag.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/caif.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/chnl_net.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/caif/caif_socket.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ieee802154/6lowpan/ieee802154_6lowpan.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ieee802154/ieee802154_socket.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/nfc/nci/nci.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/nfc/nci/nci_spi.o
WARNING: modpost: missing MODULE_DESCRIPTION() in net/nfc/nfc_digital.o
ERROR: modpost: "ice_is_clock_mux_present_e810t" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
>> ERROR: modpost: "ice_is_gps_present_e810t" [drivers/net/ethernet/intel/ice/ice.ko] undefined!
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH 4/4 ice: check netlist before enabling ICE_F_GNSS
In reply to Jacob KellerSimilar to the change made for ICE_F_SMA_CTRL, check the netlist before enabling support for ICE_F_GNSS. This ensures that the driver only enables the GNSS feature on devices which actually have the feature enabled in the firmware device configuration.
--- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 ++ drivers/net/ethernet/intel/ice/ice_lib.c | 7 +++---- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 15 +++++++++++++++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 1 + 4 files changed, 21 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +2 -0
@@ -1368,6 +1368,7 @@ struct ice_aqc_link_topo_params {#define ICE_AQC_LINK_TOPO_NODE_TYPE_MEZZ 7#define ICE_AQC_LINK_TOPO_NODE_TYPE_ID_EEPROM 8#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)
@@ -1407,6 +1408,7 @@ struct ice_aqc_get_link_topo {#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21#define ICE_AQC_GET_LINK_TOPO_NODE_NR_C827 0x31#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_CLK_MUX 0x47 +#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_GPS 0x48u8 rsvd[9 ]; };
drivers/net/ethernet/intel/ice/ice_lib.c +3 -4
@@ -3991,10 +3991,9 @@ void ice_init_feature_support(struct ice_pf *pf)break ;if (ice_is_clock_mux_present_e810t (&pf->hw))ice_set_feature_support (pf,ICE_F_SMA_CTRL ); -if (ice_is_e810t (&pf->hw)) { -if (ice_gnss_is_gps_present (&pf->hw)) -ice_set_feature_support (pf,ICE_F_GNSS ); - } +if (ice_is_gps_present_e810t (&pf->hw) && +ice_gnss_is_gps_present (&pf->hw)) +ice_set_feature_support (pf,ICE_F_GNSS );break ;default :break ;
drivers/net/ethernet/intel/ice/ice_ptp_hw.c +15 -0
@@ -3034,6 +3034,21 @@ bool ice_is_clock_mux_present_e810t(struct ice_hw *hw)return true; } +/** +* ice_is_gps_present_e810t +* @hw: pointer to the hw struct +* +* Check if the GPS generic device is present in the netlist +*/ +bool ice_is_gps_present_e810t (struct ice_hw *hw) +{ +if (ice_find_netlist_node (hw,ICE_AQC_LINK_TOPO_NODE_TYPE_GPS , +ICE_ACQ_GET_LINK_TOPO_NODE_NR_GEN_GPS ,NULL )) +return false; + +return true; +} +/** * ice_read_sma_ctrl_e810t * @hw: pointer to the hw struct
drivers/net/ethernet/intel/ice/ice_ptp_hw.h +1 -0
@@ -196,6 +196,7 @@ int ice_phy_cfg_rx_offset_e822(struct ice_hw *hw, u8 port);/* E810 family functions */ bool ice_is_clock_mux_present_e810t (struct ice_hw *hw); +bool ice_is_gps_present_e810t (struct ice_hw *hw);int ice_ptp_init_phy_e810 (struct ice_hw *hw);int ice_read_sma_ctrl_e810t (struct ice_hw *hw,u8 *data);int ice_write_sma_ctrl_e810t (struct ice_hw *hw,u8 data);
Signature · 6 lines
2.41.0.1.g9857a21e0017.dirty _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan