xref: /dflybsd-src/sys/dev/netif/ig_hal/e1000_mac.h (revision 01a55482b42bba8de64caeb8c9ede647a9208734)
19c80d176SSepherosa Ziehau /******************************************************************************
29c80d176SSepherosa Ziehau 
3*01a55482SSepherosa Ziehau   Copyright (c) 2001-2019, Intel Corporation
49c80d176SSepherosa Ziehau   All rights reserved.
59c80d176SSepherosa Ziehau 
69c80d176SSepherosa Ziehau   Redistribution and use in source and binary forms, with or without
79c80d176SSepherosa Ziehau   modification, are permitted provided that the following conditions are met:
89c80d176SSepherosa Ziehau 
99c80d176SSepherosa Ziehau    1. Redistributions of source code must retain the above copyright notice,
109c80d176SSepherosa Ziehau       this list of conditions and the following disclaimer.
119c80d176SSepherosa Ziehau 
129c80d176SSepherosa Ziehau    2. Redistributions in binary form must reproduce the above copyright
139c80d176SSepherosa Ziehau       notice, this list of conditions and the following disclaimer in the
149c80d176SSepherosa Ziehau       documentation and/or other materials provided with the distribution.
159c80d176SSepherosa Ziehau 
169c80d176SSepherosa Ziehau    3. Neither the name of the Intel Corporation nor the names of its
179c80d176SSepherosa Ziehau       contributors may be used to endorse or promote products derived from
189c80d176SSepherosa Ziehau       this software without specific prior written permission.
199c80d176SSepherosa Ziehau 
209c80d176SSepherosa Ziehau   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
219c80d176SSepherosa Ziehau   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
229c80d176SSepherosa Ziehau   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
239c80d176SSepherosa Ziehau   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
249c80d176SSepherosa Ziehau   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
259c80d176SSepherosa Ziehau   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
269c80d176SSepherosa Ziehau   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
279c80d176SSepherosa Ziehau   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
289c80d176SSepherosa Ziehau   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
299c80d176SSepherosa Ziehau   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
309c80d176SSepherosa Ziehau   POSSIBILITY OF SUCH DAMAGE.
319c80d176SSepherosa Ziehau 
329c80d176SSepherosa Ziehau ******************************************************************************/
3374dc3754SSepherosa Ziehau /*$FreeBSD$*/
349c80d176SSepherosa Ziehau 
359c80d176SSepherosa Ziehau #ifndef _E1000_MAC_H_
369c80d176SSepherosa Ziehau #define _E1000_MAC_H_
379c80d176SSepherosa Ziehau 
389c80d176SSepherosa Ziehau void e1000_init_mac_ops_generic(struct e1000_hw *hw);
3965aebe9fSSepherosa Ziehau #define E1000_REMOVED(a) (0)
409c80d176SSepherosa Ziehau void e1000_null_mac_generic(struct e1000_hw *hw);
419c80d176SSepherosa Ziehau s32  e1000_null_ops_generic(struct e1000_hw *hw);
429c80d176SSepherosa Ziehau s32  e1000_null_link_info(struct e1000_hw *hw, u16 *s, u16 *d);
439c80d176SSepherosa Ziehau bool e1000_null_mng_mode(struct e1000_hw *hw);
446a5a645eSSepherosa Ziehau void e1000_null_update_mc(struct e1000_hw *hw, u8 *h, u32 a);
459c80d176SSepherosa Ziehau void e1000_null_write_vfta(struct e1000_hw *hw, u32 a, u32 b);
464765c386SMichael Neumann int  e1000_null_rar_set(struct e1000_hw *hw, u8 *h, u32 a);
47379ebbe7SSepherosa Ziehau s32  e1000_null_set_obff_timer(struct e1000_hw *hw, u32 a);
489c80d176SSepherosa Ziehau s32  e1000_blink_led_generic(struct e1000_hw *hw);
499c80d176SSepherosa Ziehau s32  e1000_check_for_copper_link_generic(struct e1000_hw *hw);
509c80d176SSepherosa Ziehau s32  e1000_check_for_fiber_link_generic(struct e1000_hw *hw);
519c80d176SSepherosa Ziehau s32  e1000_check_for_serdes_link_generic(struct e1000_hw *hw);
529c80d176SSepherosa Ziehau s32  e1000_cleanup_led_generic(struct e1000_hw *hw);
539c80d176SSepherosa Ziehau s32  e1000_commit_fc_settings_generic(struct e1000_hw *hw);
549c80d176SSepherosa Ziehau s32  e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);
559c80d176SSepherosa Ziehau s32  e1000_config_fc_after_link_up_generic(struct e1000_hw *hw);
569c80d176SSepherosa Ziehau s32  e1000_disable_pcie_master_generic(struct e1000_hw *hw);
579c80d176SSepherosa Ziehau s32  e1000_force_mac_fc_generic(struct e1000_hw *hw);
589c80d176SSepherosa Ziehau s32  e1000_get_auto_rd_done_generic(struct e1000_hw *hw);
599c80d176SSepherosa Ziehau s32  e1000_get_bus_info_pci_generic(struct e1000_hw *hw);
609c80d176SSepherosa Ziehau s32  e1000_get_bus_info_pcie_generic(struct e1000_hw *hw);
619c80d176SSepherosa Ziehau void e1000_set_lan_id_single_port(struct e1000_hw *hw);
629c80d176SSepherosa Ziehau void e1000_set_lan_id_multi_port_pci(struct e1000_hw *hw);
639c80d176SSepherosa Ziehau s32  e1000_get_hw_semaphore_generic(struct e1000_hw *hw);
649c80d176SSepherosa Ziehau s32  e1000_get_speed_and_duplex_copper_generic(struct e1000_hw *hw, u16 *speed,
659c80d176SSepherosa Ziehau 					       u16 *duplex);
669c80d176SSepherosa Ziehau s32  e1000_get_speed_and_duplex_fiber_serdes_generic(struct e1000_hw *hw,
679c80d176SSepherosa Ziehau 						     u16 *speed, u16 *duplex);
689c80d176SSepherosa Ziehau s32  e1000_id_led_init_generic(struct e1000_hw *hw);
699c80d176SSepherosa Ziehau s32  e1000_led_on_generic(struct e1000_hw *hw);
709c80d176SSepherosa Ziehau s32  e1000_led_off_generic(struct e1000_hw *hw);
719c80d176SSepherosa Ziehau void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
726a5a645eSSepherosa Ziehau 				       u8 *mc_addr_list, u32 mc_addr_count);
73*01a55482SSepherosa Ziehau int e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
749c80d176SSepherosa Ziehau s32  e1000_set_default_fc_generic(struct e1000_hw *hw);
759c80d176SSepherosa Ziehau s32  e1000_set_fc_watermarks_generic(struct e1000_hw *hw);
769c80d176SSepherosa Ziehau s32  e1000_setup_fiber_serdes_link_generic(struct e1000_hw *hw);
779c80d176SSepherosa Ziehau s32  e1000_setup_led_generic(struct e1000_hw *hw);
789c80d176SSepherosa Ziehau s32  e1000_setup_link_generic(struct e1000_hw *hw);
794be59a01SSepherosa Ziehau s32  e1000_validate_mdi_setting_crossover_generic(struct e1000_hw *hw);
8062583d18SSepherosa Ziehau s32  e1000_write_8bit_ctrl_reg_generic(struct e1000_hw *hw, u32 reg,
8162583d18SSepherosa Ziehau 				       u32 offset, u8 data);
829c80d176SSepherosa Ziehau 
839c80d176SSepherosa Ziehau u32  e1000_hash_mc_addr_generic(struct e1000_hw *hw, u8 *mc_addr);
849c80d176SSepherosa Ziehau 
859c80d176SSepherosa Ziehau void e1000_clear_hw_cntrs_base_generic(struct e1000_hw *hw);
869c80d176SSepherosa Ziehau void e1000_clear_vfta_generic(struct e1000_hw *hw);
879c80d176SSepherosa Ziehau void e1000_init_rx_addrs_generic(struct e1000_hw *hw, u16 rar_count);
889c80d176SSepherosa Ziehau void e1000_pcix_mmrbc_workaround_generic(struct e1000_hw *hw);
899c80d176SSepherosa Ziehau void e1000_put_hw_semaphore_generic(struct e1000_hw *hw);
909c80d176SSepherosa Ziehau s32  e1000_check_alt_mac_addr_generic(struct e1000_hw *hw);
919c80d176SSepherosa Ziehau void e1000_reset_adaptive_generic(struct e1000_hw *hw);
929c80d176SSepherosa Ziehau void e1000_set_pcie_no_snoop_generic(struct e1000_hw *hw, u32 no_snoop);
939c80d176SSepherosa Ziehau void e1000_update_adaptive_generic(struct e1000_hw *hw);
949c80d176SSepherosa Ziehau void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value);
959c80d176SSepherosa Ziehau 
969c80d176SSepherosa Ziehau #endif
97