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_82543_H_ 369c80d176SSepherosa Ziehau #define _E1000_82543_H_ 379c80d176SSepherosa Ziehau 389c80d176SSepherosa Ziehau #define PHY_PREAMBLE 0xFFFFFFFF 399c80d176SSepherosa Ziehau #define PHY_PREAMBLE_SIZE 32 409c80d176SSepherosa Ziehau #define PHY_SOF 0x1 419c80d176SSepherosa Ziehau #define PHY_OP_READ 0x2 429c80d176SSepherosa Ziehau #define PHY_OP_WRITE 0x1 439c80d176SSepherosa Ziehau #define PHY_TURNAROUND 0x2 449c80d176SSepherosa Ziehau 459c80d176SSepherosa Ziehau #define TBI_COMPAT_ENABLED 0x1 /* Global "knob" for the workaround */ 469c80d176SSepherosa Ziehau /* If TBI_COMPAT_ENABLED, then this is the current state (on/off) */ 479c80d176SSepherosa Ziehau #define TBI_SBP_ENABLED 0x2 489c80d176SSepherosa Ziehau 499c80d176SSepherosa Ziehau void e1000_tbi_adjust_stats_82543(struct e1000_hw *hw, 509c80d176SSepherosa Ziehau struct e1000_hw_stats *stats, 519c80d176SSepherosa Ziehau u32 frame_len, u8 *mac_addr, 529c80d176SSepherosa Ziehau u32 max_frame_size); 539c80d176SSepherosa Ziehau void e1000_set_tbi_compatibility_82543(struct e1000_hw *hw, 549c80d176SSepherosa Ziehau bool state); 559c80d176SSepherosa Ziehau bool e1000_tbi_sbp_enabled_82543(struct e1000_hw *hw); 569c80d176SSepherosa Ziehau 579c80d176SSepherosa Ziehau #endif 58