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.95 scm_061610_003709 */ 326621Sbt150084 336621Sbt150084 #ifndef _IXGBE_COMMON_H 346621Sbt150084 #define _IXGBE_COMMON_H 356621Sbt150084 366621Sbt150084 #include "ixgbe_type.h" 3712003SPaul.Guo@Sun.COM #ifndef IXGBE_WRITE_REG64 3812003SPaul.Guo@Sun.COM #define IXGBE_WRITE_REG64(hw, reg, value) \ 3912003SPaul.Guo@Sun.COM do { \ 4012003SPaul.Guo@Sun.COM IXGBE_WRITE_REG(hw, reg, (u32) value); \ 4112003SPaul.Guo@Sun.COM IXGBE_WRITE_REG(hw, reg + 4, (u32) (value >> 32)); \ 4212003SPaul.Guo@Sun.COM } while (0) 4312003SPaul.Guo@Sun.COM #endif /* IXGBE_WRITE_REG64 */ 446621Sbt150084 4510998SChenlu.Chen@Sun.COM u32 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw); 4610998SChenlu.Chen@Sun.COM 476621Sbt150084 s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw); 486621Sbt150084 s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw); 496621Sbt150084 s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw); 506621Sbt150084 s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw); 516621Sbt150084 s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num); 526621Sbt150084 s32 ixgbe_get_mac_addr_generic(struct ixgbe_hw *hw, u8 *mac_addr); 536621Sbt150084 s32 ixgbe_get_bus_info_generic(struct ixgbe_hw *hw); 549353SSamuel.Tu@Sun.COM void ixgbe_set_lan_id_multi_port_pcie(struct ixgbe_hw *hw); 556621Sbt150084 s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw); 566621Sbt150084 576621Sbt150084 s32 ixgbe_led_on_generic(struct ixgbe_hw *hw, u32 index); 586621Sbt150084 s32 ixgbe_led_off_generic(struct ixgbe_hw *hw, u32 index); 596621Sbt150084 606621Sbt150084 s32 ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw); 616621Sbt150084 s32 ixgbe_write_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 data); 6210998SChenlu.Chen@Sun.COM s32 ixgbe_read_eerd_generic(struct ixgbe_hw *hw, u16 offset, u16 *data); 636621Sbt150084 s32 ixgbe_read_eeprom_bit_bang_generic(struct ixgbe_hw *hw, u16 offset, 646621Sbt150084 u16 *data); 6512003SPaul.Guo@Sun.COM u16 ixgbe_calc_eeprom_checksum_generic(struct ixgbe_hw *hw); 666621Sbt150084 s32 ixgbe_validate_eeprom_checksum_generic(struct ixgbe_hw *hw, 676621Sbt150084 u16 *checksum_val); 686621Sbt150084 s32 ixgbe_update_eeprom_checksum_generic(struct ixgbe_hw *hw); 6910998SChenlu.Chen@Sun.COM s32 ixgbe_poll_eerd_eewr_done(struct ixgbe_hw *hw, u32 ee_reg); 706621Sbt150084 716621Sbt150084 s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, 726621Sbt150084 u32 enable_addr); 738490SPaul.Guo@Sun.COM s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index); 746621Sbt150084 s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw); 756621Sbt150084 s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, 766621Sbt150084 u32 mc_addr_count, 776621Sbt150084 ixgbe_mc_addr_itr func); 786621Sbt150084 s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, u8 *addr_list, 796621Sbt150084 u32 addr_count, ixgbe_mc_addr_itr func); 806621Sbt150084 s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); 816621Sbt150084 s32 ixgbe_disable_mc_generic(struct ixgbe_hw *hw); 829353SSamuel.Tu@Sun.COM s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval); 839353SSamuel.Tu@Sun.COM 849353SSamuel.Tu@Sun.COM s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num); 859353SSamuel.Tu@Sun.COM s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw, s32 packtetbuf_num); 869353SSamuel.Tu@Sun.COM s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw); 876621Sbt150084 886621Sbt150084 s32 ixgbe_validate_mac_addr(u8 *mac_addr); 896621Sbt150084 s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u16 mask); 906621Sbt150084 void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u16 mask); 916621Sbt150084 s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw); 926621Sbt150084 939353SSamuel.Tu@Sun.COM s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index); 949353SSamuel.Tu@Sun.COM s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index); 956621Sbt150084 9610998SChenlu.Chen@Sun.COM s32 ixgbe_get_san_mac_addr_generic(struct ixgbe_hw *hw, u8 *san_mac_addr); 9710998SChenlu.Chen@Sun.COM s32 ixgbe_set_san_mac_addr_generic(struct ixgbe_hw *hw, u8 *san_mac_addr); 9810998SChenlu.Chen@Sun.COM 9910998SChenlu.Chen@Sun.COM s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq); 10010998SChenlu.Chen@Sun.COM s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq); 10110998SChenlu.Chen@Sun.COM s32 ixgbe_insert_mac_addr_generic(struct ixgbe_hw *hw, u8 *addr, u32 vmdq); 10210998SChenlu.Chen@Sun.COM s32 ixgbe_init_uta_tables_generic(struct ixgbe_hw *hw); 10310998SChenlu.Chen@Sun.COM s32 ixgbe_set_vfta_generic(struct ixgbe_hw *hw, u32 vlan, 10410998SChenlu.Chen@Sun.COM u32 vind, bool vlan_on); 10510998SChenlu.Chen@Sun.COM s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw); 10610998SChenlu.Chen@Sun.COM 10710998SChenlu.Chen@Sun.COM s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, 10810998SChenlu.Chen@Sun.COM ixgbe_link_speed *speed, bool *link_up, bool link_up_wait_to_complete); 10910998SChenlu.Chen@Sun.COM 11010998SChenlu.Chen@Sun.COM s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix, 11110998SChenlu.Chen@Sun.COM u16 *wwpn_prefix); 112*13006SChenlu.Chen@Sun.COM s32 ixgbe_get_fcoe_boot_status_generic(struct ixgbe_hw *hw, u16 *bs); 11310998SChenlu.Chen@Sun.COM 1146621Sbt150084 #endif /* _IXGBE_COMMON_H */ 115