16621Sbt150084 /* 26621Sbt150084 * CDDL HEADER START 36621Sbt150084 * 46621Sbt150084 * The contents of this file are subject to the terms of the 56621Sbt150084 * Common Development and Distribution License (the "License"). 66621Sbt150084 * You may not use this file except in compliance with the License. 76621Sbt150084 * 86621Sbt150084 * You can obtain a copy of the license at: 96621Sbt150084 * http://www.opensolaris.org/os/licensing. 106621Sbt150084 * See the License for the specific language governing permissions 116621Sbt150084 * and limitations under the License. 126621Sbt150084 * 136621Sbt150084 * When using or redistributing this file, you may do so under the 146621Sbt150084 * License only. No other modification of this header is permitted. 156621Sbt150084 * 166621Sbt150084 * If applicable, add the following below this CDDL HEADER, with the 176621Sbt150084 * fields enclosed by brackets "[]" replaced with your own identifying 186621Sbt150084 * information: Portions Copyright [yyyy] [name of copyright owner] 196621Sbt150084 * 206621Sbt150084 * CDDL HEADER END 216621Sbt150084 */ 226621Sbt150084 236621Sbt150084 /* 24*13006SChenlu.Chen@Sun.COM * Copyright(c) 2007-2010 Intel Corporation. All rights reserved. 256621Sbt150084 */ 266621Sbt150084 27*13006SChenlu.Chen@Sun.COM /* 28*13006SChenlu.Chen@Sun.COM * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 29*13006SChenlu.Chen@Sun.COM */ 30*13006SChenlu.Chen@Sun.COM 31*13006SChenlu.Chen@Sun.COM /* IntelVersion: 1.82 scm_061610_003709 */ 326621Sbt150084 336621Sbt150084 #ifndef _IXGBE_API_H 346621Sbt150084 #define _IXGBE_API_H 356621Sbt150084 366621Sbt150084 #include "ixgbe_type.h" 376621Sbt150084 386621Sbt150084 s32 ixgbe_init_shared_code(struct ixgbe_hw *hw); 396621Sbt150084 406621Sbt150084 s32 ixgbe_set_mac_type(struct ixgbe_hw *hw); 416621Sbt150084 s32 ixgbe_init_hw(struct ixgbe_hw *hw); 426621Sbt150084 s32 ixgbe_reset_hw(struct ixgbe_hw *hw); 436621Sbt150084 s32 ixgbe_start_hw(struct ixgbe_hw *hw); 4412003SPaul.Guo@Sun.COM void ixgbe_enable_relaxed_ordering(struct ixgbe_hw *hw); 456621Sbt150084 s32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw); 466621Sbt150084 enum ixgbe_media_type ixgbe_get_media_type(struct ixgbe_hw *hw); 476621Sbt150084 s32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr); 486621Sbt150084 s32 ixgbe_get_bus_info(struct ixgbe_hw *hw); 496621Sbt150084 u32 ixgbe_get_num_of_tx_queues(struct ixgbe_hw *hw); 506621Sbt150084 u32 ixgbe_get_num_of_rx_queues(struct ixgbe_hw *hw); 516621Sbt150084 s32 ixgbe_stop_adapter(struct ixgbe_hw *hw); 526621Sbt150084 s32 ixgbe_read_pba_num(struct ixgbe_hw *hw, u32 *pba_num); 536621Sbt150084 546621Sbt150084 s32 ixgbe_identify_phy(struct ixgbe_hw *hw); 556621Sbt150084 s32 ixgbe_reset_phy(struct ixgbe_hw *hw); 566621Sbt150084 s32 ixgbe_read_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 576621Sbt150084 u16 *phy_data); 586621Sbt150084 s32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, 596621Sbt150084 u16 phy_data); 606621Sbt150084 616621Sbt150084 s32 ixgbe_setup_phy_link(struct ixgbe_hw *hw); 626621Sbt150084 s32 ixgbe_check_phy_link(struct ixgbe_hw *hw, 636621Sbt150084 ixgbe_link_speed *speed, bool *link_up); 646621Sbt150084 s32 ixgbe_setup_phy_link_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed, 656621Sbt150084 bool autoneg, bool autoneg_wait_to_complete); 66*13006SChenlu.Chen@Sun.COM void ixgbe_disable_tx_laser(struct ixgbe_hw *hw); 67*13006SChenlu.Chen@Sun.COM void ixgbe_enable_tx_laser(struct ixgbe_hw *hw); 68*13006SChenlu.Chen@Sun.COM void ixgbe_flap_tx_laser(struct ixgbe_hw *hw); 6910998SChenlu.Chen@Sun.COM s32 ixgbe_setup_link(struct ixgbe_hw *hw, ixgbe_link_speed speed, 706621Sbt150084 bool autoneg, bool autoneg_wait_to_complete); 716621Sbt150084 s32 ixgbe_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 728490SPaul.Guo@Sun.COM bool *link_up, bool link_up_wait_to_complete); 736621Sbt150084 s32 ixgbe_get_link_capabilities(struct ixgbe_hw *hw, ixgbe_link_speed *speed, 746621Sbt150084 bool *autoneg); 756621Sbt150084 s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index); 766621Sbt150084 s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index); 776621Sbt150084 s32 ixgbe_blink_led_start(struct ixgbe_hw *hw, u32 index); 786621Sbt150084 s32 ixgbe_blink_led_stop(struct ixgbe_hw *hw, u32 index); 796621Sbt150084 806621Sbt150084 s32 ixgbe_init_eeprom_params(struct ixgbe_hw *hw); 816621Sbt150084 s32 ixgbe_write_eeprom(struct ixgbe_hw *hw, u16 offset, u16 data); 826621Sbt150084 s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data); 836621Sbt150084 s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val); 846621Sbt150084 s32 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw); 856621Sbt150084 869353SSamuel.Tu@Sun.COM s32 ixgbe_insert_mac_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq); 876621Sbt150084 s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, 886621Sbt150084 u32 enable_addr); 898490SPaul.Guo@Sun.COM s32 ixgbe_clear_rar(struct ixgbe_hw *hw, u32 index); 906621Sbt150084 s32 ixgbe_set_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq); 918490SPaul.Guo@Sun.COM s32 ixgbe_clear_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq); 926621Sbt150084 s32 ixgbe_init_rx_addrs(struct ixgbe_hw *hw); 936621Sbt150084 u32 ixgbe_get_num_rx_addrs(struct ixgbe_hw *hw); 946621Sbt150084 s32 ixgbe_update_uc_addr_list(struct ixgbe_hw *hw, u8 *addr_list, 956621Sbt150084 u32 addr_count, ixgbe_mc_addr_itr func); 966621Sbt150084 s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list, 976621Sbt150084 u32 mc_addr_count, ixgbe_mc_addr_itr func); 9810998SChenlu.Chen@Sun.COM void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr_list, u32 vmdq); 996621Sbt150084 s32 ixgbe_enable_mc(struct ixgbe_hw *hw); 1006621Sbt150084 s32 ixgbe_disable_mc(struct ixgbe_hw *hw); 1016621Sbt150084 s32 ixgbe_clear_vfta(struct ixgbe_hw *hw); 1026621Sbt150084 s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on); 1036621Sbt150084 1049353SSamuel.Tu@Sun.COM s32 ixgbe_fc_enable(struct ixgbe_hw *hw, s32 packetbuf_num); 1056621Sbt150084 1066621Sbt150084 void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr); 1076621Sbt150084 s32 ixgbe_get_phy_firmware_version(struct ixgbe_hw *hw, 1086621Sbt150084 u16 *firmware_version); 1096621Sbt150084 s32 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val); 1106621Sbt150084 s32 ixgbe_write_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 val); 1118490SPaul.Guo@Sun.COM s32 ixgbe_init_uta_tables(struct ixgbe_hw *hw); 1128490SPaul.Guo@Sun.COM s32 ixgbe_read_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data); 1139353SSamuel.Tu@Sun.COM u32 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw); 1149353SSamuel.Tu@Sun.COM s32 ixgbe_enable_rx_dma(struct ixgbe_hw *hw, u32 regval); 1159353SSamuel.Tu@Sun.COM s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw); 1169353SSamuel.Tu@Sun.COM s32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 pballoc); 1179353SSamuel.Tu@Sun.COM s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 pballoc); 1189353SSamuel.Tu@Sun.COM s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, 1199353SSamuel.Tu@Sun.COM struct ixgbe_atr_input *input, u8 queue); 1209353SSamuel.Tu@Sun.COM s32 ixgbe_fdir_add_perfect_filter_82599(struct ixgbe_hw *hw, 121*13006SChenlu.Chen@Sun.COM struct ixgbe_atr_input *input, struct ixgbe_atr_input_masks *masks, 122*13006SChenlu.Chen@Sun.COM u16 soft_id, u8 queue); 1239353SSamuel.Tu@Sun.COM u16 ixgbe_atr_compute_hash_82599(struct ixgbe_atr_input *input, u32 key); 1249353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_vlan_id_82599(struct ixgbe_atr_input *input, u16 vlan_id); 1259353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_src_ipv4_82599(struct ixgbe_atr_input *input, u32 src_addr); 1269353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 dst_addr); 1279353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_src_ipv6_82599(struct ixgbe_atr_input *input, u32 src_addr_1, 1289353SSamuel.Tu@Sun.COM u32 src_addr_2, u32 src_addr_3, u32 src_addr_4); 1299353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_dst_ipv6_82599(struct ixgbe_atr_input *input, u32 dst_addr_1, 1309353SSamuel.Tu@Sun.COM u32 dst_addr_2, u32 dst_addr_3, u32 dst_addr_4); 1319353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_src_port_82599(struct ixgbe_atr_input *input, u16 src_port); 1329353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_dst_port_82599(struct ixgbe_atr_input *input, u16 dst_port); 1339353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_flex_byte_82599(struct ixgbe_atr_input *input, u16 flex_byte); 1349353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_vm_pool_82599(struct ixgbe_atr_input *input, u8 vm_pool); 1359353SSamuel.Tu@Sun.COM s32 ixgbe_atr_set_l4type_82599(struct ixgbe_atr_input *input, u8 l4type); 1369353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_vlan_id_82599(struct ixgbe_atr_input *input, u16 *vlan_id); 1379353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_src_ipv4_82599(struct ixgbe_atr_input *input, u32 *src_addr); 1389353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_dst_ipv4_82599(struct ixgbe_atr_input *input, u32 *dst_addr); 1399353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_src_ipv6_82599(struct ixgbe_atr_input *input, u32 *src_addr_1, 1409353SSamuel.Tu@Sun.COM u32 *src_addr_2, u32 *src_addr_3, u32 *src_addr_4); 1419353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_dst_ipv6_82599(struct ixgbe_atr_input *input, u32 *dst_addr_1, 1429353SSamuel.Tu@Sun.COM u32 *dst_addr_2, u32 *dst_addr_3, u32 *dst_addr_4); 1439353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_src_port_82599(struct ixgbe_atr_input *input, u16 *src_port); 1449353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_dst_port_82599(struct ixgbe_atr_input *input, u16 *dst_port); 1459353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_flex_byte_82599(struct ixgbe_atr_input *input, 1469353SSamuel.Tu@Sun.COM u16 *flex_byte); 1479353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_vm_pool_82599(struct ixgbe_atr_input *input, u8 *vm_pool); 1489353SSamuel.Tu@Sun.COM s32 ixgbe_atr_get_l4type_82599(struct ixgbe_atr_input *input, u8 *l4type); 1499353SSamuel.Tu@Sun.COM s32 ixgbe_read_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, 1509353SSamuel.Tu@Sun.COM u8 *data); 1519353SSamuel.Tu@Sun.COM s32 ixgbe_write_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, 1529353SSamuel.Tu@Sun.COM u8 data); 1539353SSamuel.Tu@Sun.COM s32 ixgbe_write_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 eeprom_data); 1549353SSamuel.Tu@Sun.COM s32 ixgbe_get_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr); 1559353SSamuel.Tu@Sun.COM s32 ixgbe_set_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr); 1569353SSamuel.Tu@Sun.COM s32 ixgbe_get_device_caps(struct ixgbe_hw *hw, u16 *device_caps); 15710305SPaul.Guo@Sun.COM s32 ixgbe_acquire_swfw_semaphore(struct ixgbe_hw *hw, u16 mask); 15810305SPaul.Guo@Sun.COM void ixgbe_release_swfw_semaphore(struct ixgbe_hw *hw, u16 mask); 15910998SChenlu.Chen@Sun.COM s32 ixgbe_get_wwn_prefix(struct ixgbe_hw *hw, u16 *wwnn_prefix, 16010998SChenlu.Chen@Sun.COM u16 *wwpn_prefix); 161*13006SChenlu.Chen@Sun.COM s32 ixgbe_get_fcoe_boot_status(struct ixgbe_hw *hw, u16 *bs); 1626621Sbt150084 1636621Sbt150084 #endif /* _IXGBE_API_H */ 164