175eba5b6SRobert Mustacchi /****************************************************************************** 275eba5b6SRobert Mustacchi 3*42cc51e0SRobert Mustacchi Copyright (c) 2001-2015, Intel Corporation 475eba5b6SRobert Mustacchi All rights reserved. 575eba5b6SRobert Mustacchi 675eba5b6SRobert Mustacchi Redistribution and use in source and binary forms, with or without 775eba5b6SRobert Mustacchi modification, are permitted provided that the following conditions are met: 875eba5b6SRobert Mustacchi 975eba5b6SRobert Mustacchi 1. Redistributions of source code must retain the above copyright notice, 1075eba5b6SRobert Mustacchi this list of conditions and the following disclaimer. 1175eba5b6SRobert Mustacchi 1275eba5b6SRobert Mustacchi 2. Redistributions in binary form must reproduce the above copyright 1375eba5b6SRobert Mustacchi notice, this list of conditions and the following disclaimer in the 1475eba5b6SRobert Mustacchi documentation and/or other materials provided with the distribution. 1575eba5b6SRobert Mustacchi 1675eba5b6SRobert Mustacchi 3. Neither the name of the Intel Corporation nor the names of its 1775eba5b6SRobert Mustacchi contributors may be used to endorse or promote products derived from 1875eba5b6SRobert Mustacchi this software without specific prior written permission. 1975eba5b6SRobert Mustacchi 2075eba5b6SRobert Mustacchi THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2175eba5b6SRobert Mustacchi AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2275eba5b6SRobert Mustacchi IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2375eba5b6SRobert Mustacchi ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 2475eba5b6SRobert Mustacchi LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2575eba5b6SRobert Mustacchi CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2675eba5b6SRobert Mustacchi SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2775eba5b6SRobert Mustacchi INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2875eba5b6SRobert Mustacchi CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2975eba5b6SRobert Mustacchi ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3075eba5b6SRobert Mustacchi POSSIBILITY OF SUCH DAMAGE. 3175eba5b6SRobert Mustacchi 3275eba5b6SRobert Mustacchi ******************************************************************************/ 3375eba5b6SRobert Mustacchi /*$FreeBSD$*/ 3475eba5b6SRobert Mustacchi 3575eba5b6SRobert Mustacchi #ifndef _E1000_82543_H_ 3675eba5b6SRobert Mustacchi #define _E1000_82543_H_ 3775eba5b6SRobert Mustacchi 3875eba5b6SRobert Mustacchi #define PHY_PREAMBLE 0xFFFFFFFF 3975eba5b6SRobert Mustacchi #define PHY_PREAMBLE_SIZE 32 4075eba5b6SRobert Mustacchi #define PHY_SOF 0x1 4175eba5b6SRobert Mustacchi #define PHY_OP_READ 0x2 4275eba5b6SRobert Mustacchi #define PHY_OP_WRITE 0x1 4375eba5b6SRobert Mustacchi #define PHY_TURNAROUND 0x2 4475eba5b6SRobert Mustacchi 4575eba5b6SRobert Mustacchi #define TBI_COMPAT_ENABLED 0x1 /* Global "knob" for the workaround */ 4675eba5b6SRobert Mustacchi /* If TBI_COMPAT_ENABLED, then this is the current state (on/off) */ 4775eba5b6SRobert Mustacchi #define TBI_SBP_ENABLED 0x2 4875eba5b6SRobert Mustacchi 4975eba5b6SRobert Mustacchi void e1000_tbi_adjust_stats_82543(struct e1000_hw *hw, 5075eba5b6SRobert Mustacchi struct e1000_hw_stats *stats, 5175eba5b6SRobert Mustacchi u32 frame_len, u8 *mac_addr, 5275eba5b6SRobert Mustacchi u32 max_frame_size); 5375eba5b6SRobert Mustacchi void e1000_set_tbi_compatibility_82543(struct e1000_hw *hw, 5475eba5b6SRobert Mustacchi bool state); 5575eba5b6SRobert Mustacchi bool e1000_tbi_sbp_enabled_82543(struct e1000_hw *hw); 5675eba5b6SRobert Mustacchi 5775eba5b6SRobert Mustacchi #endif 58