16f37f232SEric Joyner /****************************************************************************** 26f37f232SEric Joyner 3*8455e365SKevin Bowling Copyright (c) 2001-2020, Intel Corporation 46f37f232SEric Joyner All rights reserved. 56f37f232SEric Joyner 66f37f232SEric Joyner Redistribution and use in source and binary forms, with or without 76f37f232SEric Joyner modification, are permitted provided that the following conditions are met: 86f37f232SEric Joyner 96f37f232SEric Joyner 1. Redistributions of source code must retain the above copyright notice, 106f37f232SEric Joyner this list of conditions and the following disclaimer. 116f37f232SEric Joyner 126f37f232SEric Joyner 2. Redistributions in binary form must reproduce the above copyright 136f37f232SEric Joyner notice, this list of conditions and the following disclaimer in the 146f37f232SEric Joyner documentation and/or other materials provided with the distribution. 156f37f232SEric Joyner 166f37f232SEric Joyner 3. Neither the name of the Intel Corporation nor the names of its 176f37f232SEric Joyner contributors may be used to endorse or promote products derived from 186f37f232SEric Joyner this software without specific prior written permission. 196f37f232SEric Joyner 206f37f232SEric Joyner THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 216f37f232SEric Joyner AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 226f37f232SEric Joyner IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 236f37f232SEric Joyner ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 246f37f232SEric Joyner LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 256f37f232SEric Joyner CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 266f37f232SEric Joyner SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 276f37f232SEric Joyner INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 286f37f232SEric Joyner CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 296f37f232SEric Joyner ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 306f37f232SEric Joyner POSSIBILITY OF SUCH DAMAGE. 316f37f232SEric Joyner 326f37f232SEric Joyner ******************************************************************************/ 336f37f232SEric Joyner 346f37f232SEric Joyner #ifndef _IXGBE_X550_H_ 356f37f232SEric Joyner #define _IXGBE_X550_H_ 366f37f232SEric Joyner 376f37f232SEric Joyner #include "ixgbe_type.h" 386f37f232SEric Joyner 396f37f232SEric Joyner s32 ixgbe_dmac_config_X550(struct ixgbe_hw *hw); 406f37f232SEric Joyner s32 ixgbe_dmac_config_tcs_X550(struct ixgbe_hw *hw); 416f37f232SEric Joyner s32 ixgbe_dmac_update_tcs_X550(struct ixgbe_hw *hw); 426f37f232SEric Joyner 436f37f232SEric Joyner s32 ixgbe_get_bus_info_X550em(struct ixgbe_hw *hw); 446f37f232SEric Joyner s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw); 456f37f232SEric Joyner s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw); 466f37f232SEric Joyner s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw); 476f37f232SEric Joyner s32 ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer, u32 buffer_size); 486f37f232SEric Joyner s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw, u16 *checksum_val); 496f37f232SEric Joyner s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw); 506f37f232SEric Joyner s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw, 516f37f232SEric Joyner u16 offset, u16 words, u16 *data); 526f37f232SEric Joyner s32 ixgbe_write_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, 536f37f232SEric Joyner u16 data); 546f37f232SEric Joyner s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, 556f37f232SEric Joyner u16 offset, u16 words, u16 *data); 566f37f232SEric Joyner s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, 576f37f232SEric Joyner u16 *data); 586f37f232SEric Joyner s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, 596f37f232SEric Joyner u16 data); 606f37f232SEric Joyner void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw, bool enable, 616f37f232SEric Joyner unsigned int pool); 626f37f232SEric Joyner void ixgbe_set_ethertype_anti_spoofing_X550(struct ixgbe_hw *hw, 636f37f232SEric Joyner bool enable, int vf); 646f37f232SEric Joyner s32 ixgbe_write_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, 656f37f232SEric Joyner u32 device_type, u32 data); 666f37f232SEric Joyner s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr, 676f37f232SEric Joyner u32 device_type, u32 *data); 688eb6488eSEric Joyner s32 ixgbe_set_fw_drv_ver_x550(struct ixgbe_hw *hw, u8 maj, u8 min, 698eb6488eSEric Joyner u8 build, u8 ver, u16 len, const char *str); 708eb6488eSEric Joyner s32 ixgbe_get_phy_token(struct ixgbe_hw *); 718eb6488eSEric Joyner s32 ixgbe_put_phy_token(struct ixgbe_hw *); 726f37f232SEric Joyner void ixgbe_disable_mdd_X550(struct ixgbe_hw *hw); 736f37f232SEric Joyner void ixgbe_enable_mdd_X550(struct ixgbe_hw *hw); 746f37f232SEric Joyner void ixgbe_mdd_event_X550(struct ixgbe_hw *hw, u32 *vf_bitmap); 756f37f232SEric Joyner void ixgbe_restore_mdd_vf_X550(struct ixgbe_hw *hw, u32 vf); 766f37f232SEric Joyner enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw); 776f37f232SEric Joyner s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw); 786f37f232SEric Joyner s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, 796f37f232SEric Joyner ixgbe_link_speed *speed, bool *autoneg); 806f37f232SEric Joyner void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw); 816f37f232SEric Joyner s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw); 826f37f232SEric Joyner s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw); 836f37f232SEric Joyner s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw); 846f37f232SEric Joyner s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw); 856f37f232SEric Joyner s32 ixgbe_setup_internal_phy_t_x550em(struct ixgbe_hw *hw); 866f37f232SEric Joyner s32 ixgbe_setup_phy_loopback_x550em(struct ixgbe_hw *hw); 878eb6488eSEric Joyner u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw); 886f37f232SEric Joyner void ixgbe_disable_rx_x550(struct ixgbe_hw *hw); 896f37f232SEric Joyner s32 ixgbe_get_lcd_t_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *lcd_speed); 906f37f232SEric Joyner s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw); 916f37f232SEric Joyner s32 ixgbe_acquire_swfw_sync_X550em(struct ixgbe_hw *hw, u32 mask); 926f37f232SEric Joyner void ixgbe_release_swfw_sync_X550em(struct ixgbe_hw *hw, u32 mask); 936f37f232SEric Joyner s32 ixgbe_setup_fc_X550em(struct ixgbe_hw *hw); 946f37f232SEric Joyner s32 ixgbe_setup_mac_link_sfp_x550em(struct ixgbe_hw *hw, 956f37f232SEric Joyner ixgbe_link_speed speed, 966f37f232SEric Joyner bool autoneg_wait_to_complete); 978eb6488eSEric Joyner s32 ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, 988eb6488eSEric Joyner ixgbe_link_speed speed, 998eb6488eSEric Joyner bool autoneg_wait_to_complete); 1008eb6488eSEric Joyner s32 ixgbe_read_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, 1018eb6488eSEric Joyner u32 device_type, u16 *phy_data); 1028eb6488eSEric Joyner s32 ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, 1038eb6488eSEric Joyner u32 device_type, u16 phy_data); 1048eb6488eSEric Joyner s32 ixgbe_setup_fc_fiber_x550em_a(struct ixgbe_hw *hw); 1058eb6488eSEric Joyner s32 ixgbe_setup_fc_backplane_x550em_a(struct ixgbe_hw *hw); 1068eb6488eSEric Joyner void ixgbe_fc_autoneg_fiber_x550em_a(struct ixgbe_hw *hw); 1078eb6488eSEric Joyner void ixgbe_fc_autoneg_backplane_x550em_a(struct ixgbe_hw *hw); 1088eb6488eSEric Joyner void ixgbe_fc_autoneg_sgmii_x550em_a(struct ixgbe_hw *hw); 1096f37f232SEric Joyner s32 ixgbe_handle_lasi_ext_t_x550em(struct ixgbe_hw *hw); 1106f37f232SEric Joyner s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw, 1116f37f232SEric Joyner ixgbe_link_speed speed, 1126f37f232SEric Joyner bool autoneg_wait_to_complete); 1136f37f232SEric Joyner s32 ixgbe_check_link_t_X550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 1146f37f232SEric Joyner bool *link_up, bool link_up_wait_to_complete); 1156f37f232SEric Joyner s32 ixgbe_reset_phy_t_X550em(struct ixgbe_hw *hw); 1166f37f232SEric Joyner s32 ixgbe_identify_sfp_module_X550em(struct ixgbe_hw *hw); 1176f37f232SEric Joyner s32 ixgbe_led_on_t_X550em(struct ixgbe_hw *hw, u32 led_idx); 1186f37f232SEric Joyner s32 ixgbe_led_off_t_X550em(struct ixgbe_hw *hw, u32 led_idx); 119b622bdb4SXiaoyun Li bool ixgbe_fw_recovery_mode_X550(struct ixgbe_hw *hw); 1206f37f232SEric Joyner #endif /* _IXGBE_X550_H_ */ 121