1139749Simp/* SPDX-License-Identifier: BSD-3-Clause */
2230132Suqs/*  Copyright (c) 2024, Intel Corporation
321769Sjkh *  All rights reserved.
421769Sjkh *
521769Sjkh *  Redistribution and use in source and binary forms, with or without
621769Sjkh *  modification, are permitted provided that the following conditions are met:
721769Sjkh *
821769Sjkh *   1. Redistributions of source code must retain the above copyright notice,
921769Sjkh *      this list of conditions and the following disclaimer.
1021769Sjkh *
1121769Sjkh *   2. Redistributions in binary form must reproduce the above copyright
1221769Sjkh *      notice, this list of conditions and the following disclaimer in the
1321769Sjkh *      documentation and/or other materials provided with the distribution.
1421769Sjkh *
1521769Sjkh *   3. Neither the name of the Intel Corporation nor the names of its
1621769Sjkh *      contributors may be used to endorse or promote products derived from
1721769Sjkh *      this software without specific prior written permission.
1821769Sjkh *
1921769Sjkh *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2021769Sjkh *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2121769Sjkh *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2221769Sjkh *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2321769Sjkh *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2421769Sjkh *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2521769Sjkh *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2629877Smsmith *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2752286Smdodd *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2852286Smdodd *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2952286Smdodd *  POSSIBILITY OF SUCH DAMAGE.
3021769Sjkh */
3121769Sjkh
32119418Sobrien#ifndef _ICE_COMMON_H_
33119418Sobrien#define _ICE_COMMON_H_
34119418Sobrien
3521769Sjkh#include "ice_type.h"
3629877Smsmith#include "ice_nvm.h"
3721769Sjkh#include "ice_flex_pipe.h"
3821769Sjkh#include "virtchnl.h"
3921769Sjkh#include "ice_switch.h"
40112731Smdodd
4121769Sjkh#define ICE_SQ_SEND_DELAY_TIME_MS	10
4221769Sjkh#define ICE_SQ_SEND_MAX_EXECUTE		3
4321769Sjkh
4421769Sjkhenum ice_fw_modes {
4521769Sjkh	ICE_FW_MODE_NORMAL,
4652286Smdodd	ICE_FW_MODE_DBG,
4724204Sbde	ICE_FW_MODE_REC,
4821769Sjkh	ICE_FW_MODE_ROLLBACK
4921769Sjkh};
5021769Sjkh
5152286Smdoddvoid ice_idle_aq(struct ice_hw *hw, struct ice_ctl_q_info *cq);
5252286Smdoddbool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq);
5352286Smdodd
5452286Smdoddvoid ice_set_umac_shared(struct ice_hw *hw);
5552286Smdoddenum ice_status ice_init_hw(struct ice_hw *hw);
5652286Smdoddvoid ice_deinit_hw(struct ice_hw *hw);
5752286Smdoddenum ice_status ice_check_reset(struct ice_hw *hw);
5857987Smdoddenum ice_status ice_reset(struct ice_hw *hw, enum ice_reset_req req);
59257176Sglebiusenum ice_status ice_create_all_ctrlq(struct ice_hw *hw);
6057987Smdoddenum ice_status ice_init_all_ctrlq(struct ice_hw *hw);
61112731Smdoddvoid ice_shutdown_all_ctrlq(struct ice_hw *hw, bool unloading);
6257987Smdoddvoid ice_destroy_all_ctrlq(struct ice_hw *hw);
63147256Sbrooksenum ice_status
6450026Smdoddice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,
6557987Smdodd		  struct ice_rq_event_info *e, u16 *pending);
6621769Sjkhenum ice_status
6750026Smdoddice_get_link_status(struct ice_port_info *pi, bool *link_up);
6850026Smdoddenum ice_status ice_update_link_info(struct ice_port_info *pi);
6950026Smdoddenum ice_status
7021769Sjkhice_acquire_res(struct ice_hw *hw, enum ice_aq_res_ids res,
7152286Smdodd		enum ice_aq_res_access_type access, u32 timeout);
7252286Smdoddvoid ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res);
7352286Smdoddenum ice_status
7455953Speterice_alloc_hw_res(struct ice_hw *hw, u16 type, u16 num, bool btm, u16 *res);
7559816Smdoddenum ice_status
7621769Sjkhice_free_hw_res(struct ice_hw *hw, u16 type, u16 num, u16 *res);
7721769Sjkhenum ice_status
7852286Smdoddice_aq_alloc_free_res(struct ice_hw *hw, u16 num_entries,
7952286Smdodd		      struct ice_aqc_alloc_free_res_elem *buf, u16 buf_size,
8052286Smdodd		      enum ice_adminq_opc opc, struct ice_sq_cd *cd);
8152286Smdoddenum ice_status
8221769Sjkhice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
8352286Smdodd		struct ice_aq_desc *desc, void *buf, u16 buf_size,
8421769Sjkh		struct ice_sq_cd *cd);
8552286Smdoddvoid ice_clear_pxe_mode(struct ice_hw *hw);
8621769Sjkhenum ice_status ice_get_caps(struct ice_hw *hw);
8721769Sjkh
88112801Smdoddvoid ice_set_safe_mode_caps(struct ice_hw *hw);
89112801Smdodd
9059816Smdoddenum ice_status
9152286Smdoddice_aq_get_internal_data(struct ice_hw *hw, u16 cluster_id, u16 table_id,
9259816Smdodd			 u32 start, void *buf, u16 buf_size, u16 *ret_buf_size,
9352286Smdodd			 u16 *ret_next_cluster, u16 *ret_next_table,
9459816Smdodd			 u32 *ret_next_index, struct ice_sq_cd *cd);
9559816Smdodd
9652286Smdoddenum ice_status ice_set_mac_type(struct ice_hw *hw);
9759816Smdodd
9852286Smdodd/* Define a macro that will align a pointer to point to the next memory address
9921769Sjkh * that falls on the given power of 2 (i.e., 2, 4, 8, 16, 32, 64...). For
10052286Smdodd * example, given the variable pointer = 0x1006, then after the following call:
101131192Simp *
102179775Sjhb *      pointer = ICE_ALIGN(pointer, 4)
103131192Simp *
104179775Sjhb * ... the value of pointer would equal 0x1008, since 0x1008 is the next
105131192Simp * address after 0x1006 which is divisible by 4.
106179775Sjhb */
10721769Sjkh#define ICE_ALIGN(ptr, align)	(((ptr) + ((align) - 1)) & ~((align) - 1))
10857987Smdodd
109131192Simp#define ice_arr_elem_idx(idx, val)	[(idx)] = (val)
110131192Simp
11157987Smdoddenum ice_status
112131192Simpice_write_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx,
11359816Smdodd		  u32 rxq_index);
114131192Simpenum ice_status
115131192Simpice_read_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx,
11652286Smdodd		 u32 rxq_index);
117131192Simpenum ice_status ice_clear_rxq_ctx(struct ice_hw *hw, u32 rxq_index);
118131192Simpenum ice_status
11952286Smdoddice_clear_tx_cmpltnq_ctx(struct ice_hw *hw, u32 tx_cmpltnq_index);
12059816Smdoddenum ice_status
121131192Simpice_write_tx_cmpltnq_ctx(struct ice_hw *hw,
12221769Sjkh			 struct ice_tx_cmpltnq_ctx *tx_cmpltnq_ctx,
123131192Simp			 u32 tx_cmpltnq_index);
12421769Sjkhenum ice_status
125131192Simpice_clear_tx_drbell_q_ctx(struct ice_hw *hw, u32 tx_drbell_q_index);
12652286Smdoddenum ice_status
12752286Smdoddice_write_tx_drbell_q_ctx(struct ice_hw *hw,
128131192Simp			  struct ice_tx_drbell_q_ctx *tx_drbell_q_ctx,
12952286Smdodd			  u32 tx_drbell_q_index);
13052286Smdodd
131131192Simpint ice_lut_size_to_type(int lut_size);
13252286Smdoddenum ice_status
13352286Smdoddice_aq_get_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *get_params);
13452286Smdoddenum ice_status
13552286Smdoddice_aq_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *set_params);
13652286Smdoddenum ice_status
13721769Sjkhice_aq_get_rss_key(struct ice_hw *hw, u16 vsi_handle,
13859816Smdodd		   struct ice_aqc_get_set_rss_keys *keys);
139131192Simpenum ice_status
14052286Smdoddice_aq_set_rss_key(struct ice_hw *hw, u16 vsi_handle,
14152286Smdodd		   struct ice_aqc_get_set_rss_keys *keys);
14252286Smdoddenum ice_status
14352286Smdoddice_aq_add_lan_txq(struct ice_hw *hw, u8 count,
14452286Smdodd		   struct ice_aqc_add_tx_qgrp *qg_list, u16 buf_size,
14552286Smdodd		   struct ice_sq_cd *cd);
14652286Smdoddenum ice_status
14755882Smdoddice_aq_move_recfg_lan_txq(struct ice_hw *hw, u8 num_qs, bool is_move,
14859816Smdodd			  bool is_tc_change, bool subseq_call, bool flush_pipe,
14959816Smdodd			  u8 timeout, u32 *blocked_cgds,
15055882Smdodd			  struct ice_aqc_move_txqs_data *buf, u16 buf_size,
15159816Smdodd			  u8 *txqs_moved, struct ice_sq_cd *cd);
152131192Simp
15355882Smdoddenum ice_status
15459816Smdoddice_aq_add_rdma_qsets(struct ice_hw *hw, u8 num_qset_grps,
15559816Smdodd		      struct ice_aqc_add_rdma_qset_data *qset_list,
15655882Smdodd		      u16 buf_size, struct ice_sq_cd *cd);
157127135Snjl
158127135Snjlbool ice_check_sq_alive(struct ice_hw *hw, struct ice_ctl_q_info *cq);
15959816Smdoddenum ice_status ice_aq_q_shutdown(struct ice_hw *hw, bool unloading);
16059816Smdoddvoid ice_fill_dflt_direct_cmd_desc(struct ice_aq_desc *desc, u16 opcode);
16159816Smdoddextern const struct ice_ctx_ele ice_tlan_ctx_info[];
16259816Smdoddenum ice_status
16359816Smdoddice_set_ctx(struct ice_hw *hw, u8 *src_ctx, u8 *dest_ctx,
16457989Smdodd	    const struct ice_ctx_ele *ce_info);
165127135Snjlenum ice_status
166127135Snjlice_get_ctx(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info);
16755882Smdodd
16859816Smdoddenum ice_status
16959816Smdoddice_aq_send_cmd(struct ice_hw *hw, struct ice_aq_desc *desc,
17059816Smdodd		void *buf, u16 buf_size, struct ice_sq_cd *cd);
17159816Smdoddenum ice_status ice_aq_get_fw_ver(struct ice_hw *hw, struct ice_sq_cd *cd);
17255882Smdodd
17355882Smdoddenum ice_status
17459816Smdoddice_aq_send_driver_ver(struct ice_hw *hw, struct ice_driver_ver *dv,
17559816Smdodd		       struct ice_sq_cd *cd);
17655882Smdoddenum ice_status
17755882Smdoddice_aq_set_port_params(struct ice_port_info *pi, u16 bad_frame_vsi,
17859816Smdodd		       bool save_bad_pac, bool pad_short_pac, bool double_vlan,
179131192Simp		       struct ice_sq_cd *cd);
18052286Smdoddenum ice_status
18159816Smdoddice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode,
18252286Smdodd		    struct ice_aqc_get_phy_caps_data *caps,
18359816Smdodd		    struct ice_sq_cd *cd);
18459816Smdoddenum ice_status
18559816Smdoddice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd,
18652286Smdodd			u8 *node_part_number, u16 *node_handle);
18752286Smdoddenum ice_status
18859816Smdoddice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number,
18959816Smdodd		      u16 *node_handle);
19059816Smdoddvoid
19159816Smdoddice_update_phy_type(u64 *phy_type_low, u64 *phy_type_high,
19252286Smdodd		    u16 link_speeds_bitmap);
19352286Smdoddenum ice_status
19459816Smdoddice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size,
19559816Smdodd		       struct ice_sq_cd *cd);
19659816Smdoddenum ice_status
19759816Smdoddice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags,
19857989Smdodd			struct ice_sq_cd *cd);
19957989Smdodd
200150215Sruenum ice_status ice_clear_pf_cfg(struct ice_hw *hw);
201150215Sruenum ice_status
202150215Sruice_aq_set_phy_cfg(struct ice_hw *hw, struct ice_port_info *pi,
20359816Smdodd		   struct ice_aqc_set_phy_cfg_data *cfg, struct ice_sq_cd *cd);
20452286Smdoddbool ice_fw_supports_link_override(struct ice_hw *hw);
20552286Smdoddbool ice_fw_supports_fec_dis_auto(struct ice_hw *hw);
20659816Smdoddenum ice_status
20759816Smdoddice_get_link_default_override(struct ice_link_default_override_tlv *ldo,
20852286Smdodd			      struct ice_port_info *pi);
20952286Smdoddbool ice_is_phy_caps_an_enabled(struct ice_aqc_get_phy_caps_data *caps);
210147256Sbrooksenum ice_fc_mode ice_caps_to_fc_mode(u8 caps);
21157987Smdoddenum ice_fec_mode ice_caps_to_fec_mode(u8 caps, u8 fec_options);
212179775Sjhbenum ice_status
213131192Simpice_set_fc(struct ice_port_info *pi, u8 *aq_failures,
21452286Smdodd	   bool ena_auto_link_update);
215147256Sbrooksbool
216147256Sbrooksice_phy_caps_equals_cfg(struct ice_aqc_get_phy_caps_data *caps,
217147256Sbrooks			struct ice_aqc_set_phy_cfg_data *cfg);
218147256Sbrooksvoid
219147256Sbrooksice_copy_phy_caps_to_cfg(struct ice_port_info *pi,
22029877Smsmith			 struct ice_aqc_get_phy_caps_data *caps,
221147256Sbrooks			 struct ice_aqc_set_phy_cfg_data *cfg);
22229877Smsmithenum ice_status
22329877Smsmithice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
22452286Smdodd		enum ice_fec_mode fec);
22529877Smsmithenum ice_status
22629877Smsmithice_aq_set_link_restart_an(struct ice_port_info *pi, bool ena_link,
22729877Smsmith			   struct ice_sq_cd *cd);
22829877Smsmithenum ice_status
22921769Sjkhice_aq_set_mac_cfg(struct ice_hw *hw, u16 max_frame_size, bool auto_drop,
23021769Sjkh		   struct ice_sq_cd *cd);
23121769Sjkhenum ice_status
23221769Sjkhice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,
23321769Sjkh		     struct ice_link_status *link, struct ice_sq_cd *cd);
23421769Sjkhenum ice_status
235121816Sbrooksice_aq_set_event_mask(struct ice_hw *hw, u8 port_num, u16 mask,
236179775Sjhb		      struct ice_sq_cd *cd);
23721769Sjkhenum ice_status
23821769Sjkhice_aq_set_mac_loopback(struct ice_hw *hw, bool ena_lpbk, struct ice_sq_cd *cd);
23955883Smdodd
240207554Ssobomaxenum ice_status
24121769Sjkhice_aq_set_port_id_led(struct ice_port_info *pi, bool is_orig_mode,
24257987Smdodd		       struct ice_sq_cd *cd);
243179775Sjhbenum ice_status
244179775Sjhbice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr,
245179775Sjhb		  u16 mem_addr, u8 page, u8 set_page, u8 *data, u8 length,
24657987Smdodd		  bool write, struct ice_sq_cd *cd);
247131192Simpu32 ice_get_link_speed(u16 index);
24857987Smdodd
24957987Smdoddenum ice_status
25057987Smdoddice_aq_prog_topo_dev_nvm(struct ice_hw *hw,
25157987Smdodd			 struct ice_aqc_link_topo_params *topo_params,
25257987Smdodd			 struct ice_sq_cd *cd);
25357987Smdoddenum ice_status
25457987Smdoddice_aq_read_topo_dev_nvm(struct ice_hw *hw,
255112764Smdodd			 struct ice_aqc_link_topo_params *topo_params,
256112764Smdodd			 u32 start_address, u8 *buf, u8 buf_size,
257131192Simp			 struct ice_sq_cd *cd);
25857987Smdodd
25957987Smdoddenum ice_status
260179775Sjhbice_aq_get_port_options(struct ice_hw *hw,
26157987Smdodd			struct ice_aqc_get_port_options_elem *options,
26257987Smdodd			u8 *option_count, u8 lport, bool lport_valid,
26321769Sjkh			u8 *active_option_idx, bool *active_option_valid,
26421769Sjkh			u8 *pending_option_idx, bool *pending_option_valid);
26521769Sjkhenum ice_status
266147256Sbrooksice_aq_set_port_option(struct ice_hw *hw, u8 lport, u8 lport_valid,
26721769Sjkh		       u8 new_option);
268179775Sjhbenum ice_status
269179775Sjhb__ice_write_sr_word(struct ice_hw *hw, u32 offset, const u16 *data);
270179775Sjhbenum ice_status
271179775Sjhb__ice_write_sr_buf(struct ice_hw *hw, u32 offset, u16 words, const u16 *data);
272179775Sjhbenum ice_status
273179775Sjhbice_cfg_vsi_rdma(struct ice_port_info *pi, u16 vsi_handle, u16 tc_bitmap,
274179775Sjhb		 u16 *max_rdmaqs);
275179775Sjhbenum ice_status
276179775Sjhbice_ena_vsi_rdma_qset(struct ice_port_info *pi, u16 vsi_handle, u8 tc,
27752286Smdodd		      u16 *rdma_qset, u16 num_qsets, u32 *qset_teid);
27821769Sjkhenum ice_status
27921769Sjkhice_dis_vsi_rdma_qset(struct ice_port_info *pi, u16 count, u32 *qset_teid,
280112800Smdodd		      u16 *q_id);
281131192Simpenum ice_status
282112800Smdoddice_dis_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_queues,
283112800Smdodd		u16 *q_handle, u16 *q_ids, u32 *q_teids,
284112800Smdodd		enum ice_disq_rst_src rst_src, u16 vmvf_num,
285112800Smdodd		struct ice_sq_cd *cd);
286112800Smdoddenum ice_status
287147256Sbrooksice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u16 tc_bitmap,
288112800Smdodd		u16 *max_lanqs);
289179775Sjhbenum ice_status
290112800Smdoddice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle,
291179775Sjhb		u8 num_qgrps, struct ice_aqc_add_tx_qgrp *buf, u16 buf_size,
292112800Smdodd		struct ice_sq_cd *cd);
293112800Smdoddenum ice_status
294179775Sjhbice_replay_pre_init(struct ice_hw *hw, struct ice_switch_info *sw);
295112800Smdoddenum ice_status ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle);
296112800Smdoddvoid ice_replay_post(struct ice_hw *hw);
297179775Sjhbstruct ice_q_ctx *
298112800Smdoddice_get_lan_q_ctx(struct ice_hw *hw, u16 vsi_handle, u8 tc, u16 q_handle);
299112800Smdoddenum ice_status
300112800Smdoddice_aq_get_sensor_reading(struct ice_hw *hw, u8 sensor, u8 format,
301112800Smdodd			  struct ice_aqc_get_sensor_reading_resp *data,
30255883Smdodd			  struct ice_sq_cd *cd);
30355883Smdoddvoid
30421769Sjkhice_stat_update40(struct ice_hw *hw, u32 reg, bool prev_stat_loaded,
30552286Smdodd		  u64 *prev_stat, u64 *cur_stat);
306179775Sjhbvoid
307179775Sjhbice_stat_update32(struct ice_hw *hw, u32 reg, bool prev_stat_loaded,
308179775Sjhb		  u64 *prev_stat, u64 *cur_stat);
309179775Sjhbvoid
310179775Sjhbice_stat_update_repc(struct ice_hw *hw, u16 vsi_handle, bool prev_stat_loaded,
311179775Sjhb		     struct ice_eth_stats *cur_stats);
312179775Sjhbenum ice_fw_modes ice_get_fw_mode(struct ice_hw *hw);
313179775Sjhbvoid ice_print_rollback_msg(struct ice_hw *hw);
314179775Sjhbbool ice_is_e810(struct ice_hw *hw);
315147256Sbrooksbool ice_is_e810t(struct ice_hw *hw);
31652286Smdoddbool ice_is_e823(struct ice_hw *hw);
31752286Smdoddenum ice_status
31821769Sjkhice_aq_alternate_write(struct ice_hw *hw, u32 reg_addr0, u32 reg_val0,
319121816Sbrooks		       u32 reg_addr1, u32 reg_val1);
32021769Sjkhenum ice_status
321179775Sjhbice_aq_alternate_read(struct ice_hw *hw, u32 reg_addr0, u32 *reg_val0,
32221769Sjkh		      u32 reg_addr1, u32 *reg_val1);
32321769Sjkhenum ice_status
32421769Sjkhice_aq_alternate_write_done(struct ice_hw *hw, u8 bios_mode,
32521769Sjkh			    bool *reset_needed);
326131192Simpenum ice_status ice_aq_alternate_clear(struct ice_hw *hw);
327131192Simpenum ice_status
328182088Simpice_sched_query_elem(struct ice_hw *hw, u32 node_teid,
329131192Simp		     struct ice_aqc_txsched_elem_data *buf);
330182088Simpenum ice_status
331152315Sruice_get_cur_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status);
332182088Simpenum ice_status
33321769Sjkhice_get_dflt_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status);
33421769Sjkhenum ice_status
33521769Sjkhice_aq_set_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx, bool value,
33621769Sjkh		struct ice_sq_cd *cd);
33721769Sjkhenum ice_status
33821769Sjkhice_aq_get_gpio(struct ice_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
339131192Simp		bool *value, struct ice_sq_cd *cd);
340131192Simpbool ice_is_100m_speed_supported(struct ice_hw *hw);
341131192Simpenum ice_status ice_get_netlist_ver_info(struct ice_hw *hw, struct ice_netlist_info *netlist);
342182088Simpenum ice_status
343182088Simpice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size,
344182088Simp		    struct ice_sq_cd *cd);
345182088Simpbool ice_fw_supports_lldp_fltr_ctrl(struct ice_hw *hw);
346182088Simpenum ice_status
347131192Simpice_lldp_fltr_add_remove(struct ice_hw *hw, u16 vsi_num, bool add);
348182088Simpenum ice_status ice_lldp_execute_pending_mib(struct ice_hw *hw);
349182088Simpenum ice_status
350182088Simpice_aq_read_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr,
351182088Simp		u16 bus_addr, __le16 addr, u8 params, u8 *data,
35221769Sjkh		struct ice_sq_cd *cd);
35321769Sjkhenum ice_status
35421769Sjkhice_aq_write_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr,
35521769Sjkh		 u16 bus_addr, __le16 addr, u8 params, const u8 *data,
35621769Sjkh		 struct ice_sq_cd *cd);
35721769Sjkhenum ice_status
35821769Sjkhice_aq_set_health_status_config(struct ice_hw *hw, u8 event_source,
35921769Sjkh				struct ice_sq_cd *cd);
36021769Sjkhbool ice_is_fw_health_report_supported(struct ice_hw *hw);
36121769Sjkhbool ice_fw_supports_report_dflt_cfg(struct ice_hw *hw);
36221769Sjkh/* AQ API version for FW auto drop reports */
36321769Sjkhbool ice_is_fw_auto_drop_supported(struct ice_hw *hw);
364131192Simp#endif /* _ICE_COMMON_H_ */
365131192Simp