xref: /onnv-gate/usr/src/uts/common/io/igb/igb_mac.h (revision 12111:a462ebfcbf99)
15779Sxy150489 /*
25779Sxy150489  * CDDL HEADER START
35779Sxy150489  *
45779Sxy150489  * The contents of this file are subject to the terms of the
55779Sxy150489  * Common Development and Distribution License (the "License").
65779Sxy150489  * You may not use this file except in compliance with the License.
75779Sxy150489  *
8*12111SGuoqing.Zhu@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*12111SGuoqing.Zhu@Sun.COM  * or http://www.opensolaris.org/os/licensing.
105779Sxy150489  * See the License for the specific language governing permissions
115779Sxy150489  * and limitations under the License.
125779Sxy150489  *
13*12111SGuoqing.Zhu@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*12111SGuoqing.Zhu@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155779Sxy150489  * If applicable, add the following below this CDDL HEADER, with the
165779Sxy150489  * fields enclosed by brackets "[]" replaced with your own identifying
175779Sxy150489  * information: Portions Copyright [yyyy] [name of copyright owner]
185779Sxy150489  *
195779Sxy150489  * CDDL HEADER END
205779Sxy150489  */
215779Sxy150489 
225779Sxy150489 /*
23*12111SGuoqing.Zhu@Sun.COM  * Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
245779Sxy150489  */
255779Sxy150489 
26*12111SGuoqing.Zhu@Sun.COM /*
27*12111SGuoqing.Zhu@Sun.COM  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
28*12111SGuoqing.Zhu@Sun.COM  */
29*12111SGuoqing.Zhu@Sun.COM 
30*12111SGuoqing.Zhu@Sun.COM /* IntelVersion: 1.32 v3_3_14_3_BHSW1 */
315812Sxy150489 
325779Sxy150489 #ifndef	_IGB_MAC_H
335779Sxy150489 #define	_IGB_MAC_H
345779Sxy150489 
355779Sxy150489 #ifdef __cplusplus
365779Sxy150489 extern "C" {
375779Sxy150489 #endif
385779Sxy150489 
395779Sxy150489 /*
405779Sxy150489  * Functions that should not be called directly from drivers but can be used
415779Sxy150489  * by other files in this 'shared code'
425779Sxy150489  */
438571SChenlu.Chen@Sun.COM void e1000_init_mac_ops_generic(struct e1000_hw *hw);
448571SChenlu.Chen@Sun.COM void e1000_null_mac_generic(struct e1000_hw *hw);
458571SChenlu.Chen@Sun.COM s32  e1000_null_ops_generic(struct e1000_hw *hw);
468571SChenlu.Chen@Sun.COM s32  e1000_null_link_info(struct e1000_hw *hw, u16 *s, u16 *d);
478571SChenlu.Chen@Sun.COM bool e1000_null_mng_mode(struct e1000_hw *hw);
4810319SJason.Xu@Sun.COM void e1000_null_update_mc(struct e1000_hw *hw, u8 *h, u32 a);
498571SChenlu.Chen@Sun.COM void e1000_null_write_vfta(struct e1000_hw *hw, u32 a, u32 b);
508571SChenlu.Chen@Sun.COM void e1000_null_mta_set(struct e1000_hw *hw, u32 a);
518571SChenlu.Chen@Sun.COM void e1000_null_rar_set(struct e1000_hw *hw, u8 *h, u32 a);
525779Sxy150489 s32  e1000_blink_led_generic(struct e1000_hw *hw);
535779Sxy150489 s32  e1000_check_for_copper_link_generic(struct e1000_hw *hw);
545779Sxy150489 s32  e1000_check_for_fiber_link_generic(struct e1000_hw *hw);
555779Sxy150489 s32  e1000_check_for_serdes_link_generic(struct e1000_hw *hw);
565779Sxy150489 s32  e1000_cleanup_led_generic(struct e1000_hw *hw);
575779Sxy150489 s32  e1000_config_fc_after_link_up_generic(struct e1000_hw *hw);
585779Sxy150489 s32  e1000_disable_pcie_master_generic(struct e1000_hw *hw);
595779Sxy150489 s32  e1000_force_mac_fc_generic(struct e1000_hw *hw);
605779Sxy150489 s32  e1000_get_auto_rd_done_generic(struct e1000_hw *hw);
615779Sxy150489 s32  e1000_get_bus_info_pcie_generic(struct e1000_hw *hw);
6210319SJason.Xu@Sun.COM void e1000_set_lan_id_single_port(struct e1000_hw *hw);
635779Sxy150489 s32  e1000_get_hw_semaphore_generic(struct e1000_hw *hw);
645779Sxy150489 s32  e1000_get_speed_and_duplex_copper_generic(struct e1000_hw *hw, u16 *speed,
655779Sxy150489     u16 *duplex);
665779Sxy150489 s32  e1000_get_speed_and_duplex_fiber_serdes_generic(struct e1000_hw *hw,
675779Sxy150489     u16 *speed, u16 *duplex);
685779Sxy150489 s32  e1000_id_led_init_generic(struct e1000_hw *hw);
695779Sxy150489 s32  e1000_led_on_generic(struct e1000_hw *hw);
705779Sxy150489 s32  e1000_led_off_generic(struct e1000_hw *hw);
715779Sxy150489 void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
7210319SJason.Xu@Sun.COM     u8 *mc_addr_list, u32 mc_addr_count);
735779Sxy150489 s32  e1000_set_fc_watermarks_generic(struct e1000_hw *hw);
745779Sxy150489 s32  e1000_setup_fiber_serdes_link_generic(struct e1000_hw *hw);
755779Sxy150489 s32  e1000_setup_led_generic(struct e1000_hw *hw);
765779Sxy150489 s32  e1000_setup_link_generic(struct e1000_hw *hw);
775779Sxy150489 s32  e1000_write_8bit_ctrl_reg_generic(struct e1000_hw *hw, u32 reg,
785779Sxy150489     u32 offset, u8 data);
795779Sxy150489 
805779Sxy150489 u32  e1000_hash_mc_addr_generic(struct e1000_hw *hw, u8 *mc_addr);
815779Sxy150489 
825779Sxy150489 void e1000_clear_hw_cntrs_base_generic(struct e1000_hw *hw);
835779Sxy150489 void e1000_clear_vfta_generic(struct e1000_hw *hw);
845779Sxy150489 void e1000_config_collision_dist_generic(struct e1000_hw *hw);
855779Sxy150489 void e1000_init_rx_addrs_generic(struct e1000_hw *hw, u16 rar_count);
865779Sxy150489 void e1000_mta_set_generic(struct e1000_hw *hw, u32 hash_value);
875779Sxy150489 void e1000_pcix_mmrbc_workaround_generic(struct e1000_hw *hw);
885779Sxy150489 void e1000_put_hw_semaphore_generic(struct e1000_hw *hw);
895779Sxy150489 void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
905779Sxy150489 s32  e1000_check_alt_mac_addr_generic(struct e1000_hw *hw);
915779Sxy150489 void e1000_reset_adaptive_generic(struct e1000_hw *hw);
925779Sxy150489 void e1000_set_pcie_no_snoop_generic(struct e1000_hw *hw, u32 no_snoop);
935779Sxy150489 void e1000_update_adaptive_generic(struct e1000_hw *hw);
945779Sxy150489 void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value);
955779Sxy150489 
965779Sxy150489 #ifdef __cplusplus
975779Sxy150489 }
985779Sxy150489 #endif
995779Sxy150489 
1005779Sxy150489 #endif	/* _IGB_MAC_H */
101