18cfa0ad2SJack F Vogel /****************************************************************************** 27282444bSPedro F. Giffuni SPDX-License-Identifier: BSD-3-Clause 38cfa0ad2SJack F Vogel 4702cac6cSKevin Bowling Copyright (c) 2001-2020, Intel Corporation 58cfa0ad2SJack F Vogel All rights reserved. 68cfa0ad2SJack F Vogel 78cfa0ad2SJack F Vogel Redistribution and use in source and binary forms, with or without 88cfa0ad2SJack F Vogel modification, are permitted provided that the following conditions are met: 98cfa0ad2SJack F Vogel 108cfa0ad2SJack F Vogel 1. Redistributions of source code must retain the above copyright notice, 118cfa0ad2SJack F Vogel this list of conditions and the following disclaimer. 128cfa0ad2SJack F Vogel 138cfa0ad2SJack F Vogel 2. Redistributions in binary form must reproduce the above copyright 148cfa0ad2SJack F Vogel notice, this list of conditions and the following disclaimer in the 158cfa0ad2SJack F Vogel documentation and/or other materials provided with the distribution. 168cfa0ad2SJack F Vogel 178cfa0ad2SJack F Vogel 3. Neither the name of the Intel Corporation nor the names of its 188cfa0ad2SJack F Vogel contributors may be used to endorse or promote products derived from 198cfa0ad2SJack F Vogel this software without specific prior written permission. 208cfa0ad2SJack F Vogel 218cfa0ad2SJack F Vogel THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 228cfa0ad2SJack F Vogel AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 238cfa0ad2SJack F Vogel IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 248cfa0ad2SJack F Vogel ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 258cfa0ad2SJack F Vogel LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 268cfa0ad2SJack F Vogel CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 278cfa0ad2SJack F Vogel SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 288cfa0ad2SJack F Vogel INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 298cfa0ad2SJack F Vogel CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 308cfa0ad2SJack F Vogel ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 318cfa0ad2SJack F Vogel POSSIBILITY OF SUCH DAMAGE. 328cfa0ad2SJack F Vogel 338cfa0ad2SJack F Vogel ******************************************************************************/ 348cfa0ad2SJack F Vogel 358cfa0ad2SJack F Vogel #ifndef _E1000_HW_H_ 368cfa0ad2SJack F Vogel #define _E1000_HW_H_ 378cfa0ad2SJack F Vogel 388cfa0ad2SJack F Vogel #include "e1000_osdep.h" 398cfa0ad2SJack F Vogel #include "e1000_regs.h" 408cfa0ad2SJack F Vogel #include "e1000_defines.h" 418cfa0ad2SJack F Vogel 428cfa0ad2SJack F Vogel struct e1000_hw; 438cfa0ad2SJack F Vogel 448cfa0ad2SJack F Vogel #define E1000_DEV_ID_82542 0x1000 458cfa0ad2SJack F Vogel #define E1000_DEV_ID_82543GC_FIBER 0x1001 468cfa0ad2SJack F Vogel #define E1000_DEV_ID_82543GC_COPPER 0x1004 478cfa0ad2SJack F Vogel #define E1000_DEV_ID_82544EI_COPPER 0x1008 488cfa0ad2SJack F Vogel #define E1000_DEV_ID_82544EI_FIBER 0x1009 498cfa0ad2SJack F Vogel #define E1000_DEV_ID_82544GC_COPPER 0x100C 508cfa0ad2SJack F Vogel #define E1000_DEV_ID_82544GC_LOM 0x100D 518cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EM 0x100E 528cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EM_LOM 0x1015 538cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EP_LOM 0x1016 548cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EP 0x1017 558cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EP_LP 0x101E 568cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545EM_COPPER 0x100F 578cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545EM_FIBER 0x1011 588cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545GM_COPPER 0x1026 598cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545GM_FIBER 0x1027 608cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545GM_SERDES 0x1028 618cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546EB_COPPER 0x1010 628cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546EB_FIBER 0x1012 638cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D 648cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_COPPER 0x1079 658cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_FIBER 0x107A 668cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_SERDES 0x107B 678cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_PCIE 0x108A 688cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 698cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 708cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541EI 0x1013 718cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541EI_MOBILE 0x1018 728cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541ER_LOM 0x1014 738cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541ER 0x1078 748cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541GI 0x1076 758cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541GI_LF 0x107C 768cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541GI_MOBILE 0x1077 778cfa0ad2SJack F Vogel #define E1000_DEV_ID_82547EI 0x1019 788cfa0ad2SJack F Vogel #define E1000_DEV_ID_82547EI_MOBILE 0x101A 798cfa0ad2SJack F Vogel #define E1000_DEV_ID_82547GI 0x1075 808cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_COPPER 0x105E 818cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_FIBER 0x105F 828cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_SERDES 0x1060 838cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9 848cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA 858cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4 868cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5 878cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5 888cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC 898cfa0ad2SJack F Vogel #define E1000_DEV_ID_82572EI_COPPER 0x107D 908cfa0ad2SJack F Vogel #define E1000_DEV_ID_82572EI_FIBER 0x107E 918cfa0ad2SJack F Vogel #define E1000_DEV_ID_82572EI_SERDES 0x107F 928cfa0ad2SJack F Vogel #define E1000_DEV_ID_82572EI 0x10B9 938cfa0ad2SJack F Vogel #define E1000_DEV_ID_82573E 0x108B 948cfa0ad2SJack F Vogel #define E1000_DEV_ID_82573E_IAMT 0x108C 958cfa0ad2SJack F Vogel #define E1000_DEV_ID_82573L 0x109A 968cfa0ad2SJack F Vogel #define E1000_DEV_ID_82574L 0x10D3 97d035aa2dSJack F Vogel #define E1000_DEV_ID_82574LA 0x10F6 989d81738fSJack F Vogel #define E1000_DEV_ID_82583V 0x150C 998cfa0ad2SJack F Vogel #define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 1008cfa0ad2SJack F Vogel #define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 1018cfa0ad2SJack F Vogel #define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA 1028cfa0ad2SJack F Vogel #define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB 1034edd8523SJack F Vogel #define E1000_DEV_ID_ICH8_82567V_3 0x1501 1048cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 1058cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IGP_AMT 0x104A 1068cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IGP_C 0x104B 1078cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IFE 0x104C 1088cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IFE_GT 0x10C4 1098cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IFE_G 0x10C5 1108cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IGP_M 0x104D 1118cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_M 0x10BF 1128cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5 1138cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB 1148cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD 1158cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_BM 0x10E5 1168cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_C 0x294C 1178cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IFE 0x10C0 1188cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IFE_GT 0x10C3 1198cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IFE_G 0x10C2 1208cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC 1218cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD 1228cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_R_BM_V 0x10CE 1238cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE 1248cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF 1257d9119bdSJack F Vogel #define E1000_DEV_ID_ICH10_D_BM_V 0x1525 1269d81738fSJack F Vogel #define E1000_DEV_ID_PCH_M_HV_LM 0x10EA 1279d81738fSJack F Vogel #define E1000_DEV_ID_PCH_M_HV_LC 0x10EB 1289d81738fSJack F Vogel #define E1000_DEV_ID_PCH_D_HV_DM 0x10EF 1299d81738fSJack F Vogel #define E1000_DEV_ID_PCH_D_HV_DC 0x10F0 1307d9119bdSJack F Vogel #define E1000_DEV_ID_PCH2_LV_LM 0x1502 1317d9119bdSJack F Vogel #define E1000_DEV_ID_PCH2_LV_V 0x1503 1326ab6bfe3SJack F Vogel #define E1000_DEV_ID_PCH_LPT_I217_LM 0x153A 1336ab6bfe3SJack F Vogel #define E1000_DEV_ID_PCH_LPT_I217_V 0x153B 1346ab6bfe3SJack F Vogel #define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A 1356ab6bfe3SJack F Vogel #define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559 1368cc64f1eSJack F Vogel #define E1000_DEV_ID_PCH_I218_LM2 0x15A0 1378cc64f1eSJack F Vogel #define E1000_DEV_ID_PCH_I218_V2 0x15A1 1388cc64f1eSJack F Vogel #define E1000_DEV_ID_PCH_I218_LM3 0x15A2 /* Wildcat Point PCH */ 1398cc64f1eSJack F Vogel #define E1000_DEV_ID_PCH_I218_V3 0x15A3 /* Wildcat Point PCH */ 140c80429ceSEric Joyner #define E1000_DEV_ID_PCH_SPT_I219_LM 0x156F /* Sunrise Point PCH */ 141c80429ceSEric Joyner #define E1000_DEV_ID_PCH_SPT_I219_V 0x1570 /* Sunrise Point PCH */ 142c80429ceSEric Joyner #define E1000_DEV_ID_PCH_SPT_I219_LM2 0x15B7 /* Sunrise Point-H PCH */ 143c80429ceSEric Joyner #define E1000_DEV_ID_PCH_SPT_I219_V2 0x15B8 /* Sunrise Point-H PCH */ 144c80429ceSEric Joyner #define E1000_DEV_ID_PCH_LBG_I219_LM3 0x15B9 /* LEWISBURG PCH */ 145e760e292SSean Bruno #define E1000_DEV_ID_PCH_SPT_I219_LM4 0x15D7 146e760e292SSean Bruno #define E1000_DEV_ID_PCH_SPT_I219_V4 0x15D8 147e760e292SSean Bruno #define E1000_DEV_ID_PCH_SPT_I219_LM5 0x15E3 148e760e292SSean Bruno #define E1000_DEV_ID_PCH_SPT_I219_V5 0x15D6 1496fe4c0a0SSean Bruno #define E1000_DEV_ID_PCH_CNP_I219_LM6 0x15BD 1506fe4c0a0SSean Bruno #define E1000_DEV_ID_PCH_CNP_I219_V6 0x15BE 1516fe4c0a0SSean Bruno #define E1000_DEV_ID_PCH_CNP_I219_LM7 0x15BB 1526fe4c0a0SSean Bruno #define E1000_DEV_ID_PCH_CNP_I219_V7 0x15BC 1536fe4c0a0SSean Bruno #define E1000_DEV_ID_PCH_ICP_I219_LM8 0x15DF 1546fe4c0a0SSean Bruno #define E1000_DEV_ID_PCH_ICP_I219_V8 0x15E0 1556fe4c0a0SSean Bruno #define E1000_DEV_ID_PCH_ICP_I219_LM9 0x15E1 1566fe4c0a0SSean Bruno #define E1000_DEV_ID_PCH_ICP_I219_V9 0x15E2 15751569bd7SEric Joyner #define E1000_DEV_ID_PCH_CMP_I219_LM10 0x0D4E 15851569bd7SEric Joyner #define E1000_DEV_ID_PCH_CMP_I219_V10 0x0D4F 15951569bd7SEric Joyner #define E1000_DEV_ID_PCH_CMP_I219_LM11 0x0D4C 16051569bd7SEric Joyner #define E1000_DEV_ID_PCH_CMP_I219_V11 0x0D4D 16151569bd7SEric Joyner #define E1000_DEV_ID_PCH_CMP_I219_LM12 0x0D53 16251569bd7SEric Joyner #define E1000_DEV_ID_PCH_CMP_I219_V12 0x0D55 16359690eabSKevin Bowling #define E1000_DEV_ID_PCH_TGP_I219_LM13 0x15FB 16459690eabSKevin Bowling #define E1000_DEV_ID_PCH_TGP_I219_V13 0x15FC 16559690eabSKevin Bowling #define E1000_DEV_ID_PCH_TGP_I219_LM14 0x15F9 16659690eabSKevin Bowling #define E1000_DEV_ID_PCH_TGP_I219_V14 0x15FA 16759690eabSKevin Bowling #define E1000_DEV_ID_PCH_TGP_I219_LM15 0x15F4 16859690eabSKevin Bowling #define E1000_DEV_ID_PCH_TGP_I219_V15 0x15F5 16959690eabSKevin Bowling #define E1000_DEV_ID_PCH_ADL_I219_LM16 0x1A1E 17059690eabSKevin Bowling #define E1000_DEV_ID_PCH_ADL_I219_V16 0x1A1F 17159690eabSKevin Bowling #define E1000_DEV_ID_PCH_ADL_I219_LM17 0x1A1C 17259690eabSKevin Bowling #define E1000_DEV_ID_PCH_ADL_I219_V17 0x1A1D 17359690eabSKevin Bowling #define E1000_DEV_ID_PCH_MTP_I219_LM18 0x550A 17459690eabSKevin Bowling #define E1000_DEV_ID_PCH_MTP_I219_V18 0x550B 175*77b70ad7SKevin Bowling #define E1000_DEV_ID_PCH_ADL_I219_LM19 0x550C 176*77b70ad7SKevin Bowling #define E1000_DEV_ID_PCH_ADL_I219_V19 0x550D 177c0548bfcSPiotr Kubaj #define E1000_DEV_ID_PCH_LNL_I219_LM20 0x550E 178c0548bfcSPiotr Kubaj #define E1000_DEV_ID_PCH_LNL_I219_V20 0x550F 179c0548bfcSPiotr Kubaj #define E1000_DEV_ID_PCH_LNL_I219_LM21 0x5510 180c0548bfcSPiotr Kubaj #define E1000_DEV_ID_PCH_LNL_I219_V21 0x5511 181c0548bfcSPiotr Kubaj #define E1000_DEV_ID_PCH_RPL_I219_LM22 0x0DC7 182c0548bfcSPiotr Kubaj #define E1000_DEV_ID_PCH_RPL_I219_V22 0x0DC8 183c0548bfcSPiotr Kubaj #define E1000_DEV_ID_PCH_RPL_I219_LM23 0x0DC5 184c0548bfcSPiotr Kubaj #define E1000_DEV_ID_PCH_RPL_I219_V23 0x0DC6 185905ae588SKevin Bowling #define E1000_DEV_ID_PCH_ARL_I219_LM24 0x57A0 186905ae588SKevin Bowling #define E1000_DEV_ID_PCH_ARL_I219_V24 0x57A1 187905ae588SKevin Bowling #define E1000_DEV_ID_PCH_PTP_I219_LM25 0x57B3 188905ae588SKevin Bowling #define E1000_DEV_ID_PCH_PTP_I219_V25 0x57B4 189905ae588SKevin Bowling #define E1000_DEV_ID_PCH_PTP_I219_LM26 0x57B5 190905ae588SKevin Bowling #define E1000_DEV_ID_PCH_PTP_I219_V26 0x57B6 191905ae588SKevin Bowling #define E1000_DEV_ID_PCH_PTP_I219_LM27 0x57B7 192905ae588SKevin Bowling #define E1000_DEV_ID_PCH_PTP_I219_V27 0x57B8 1938cfa0ad2SJack F Vogel #define E1000_DEV_ID_82576 0x10C9 1948cfa0ad2SJack F Vogel #define E1000_DEV_ID_82576_FIBER 0x10E6 1958cfa0ad2SJack F Vogel #define E1000_DEV_ID_82576_SERDES 0x10E7 1968cfa0ad2SJack F Vogel #define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8 1977d9119bdSJack F Vogel #define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526 198d035aa2dSJack F Vogel #define E1000_DEV_ID_82576_NS 0x150A 1994edd8523SJack F Vogel #define E1000_DEV_ID_82576_NS_SERDES 0x1518 2009d81738fSJack F Vogel #define E1000_DEV_ID_82576_SERDES_QUAD 0x150D 201b8270585SJack F Vogel #define E1000_DEV_ID_82576_VF 0x10CA 2026ab6bfe3SJack F Vogel #define E1000_DEV_ID_82576_VF_HV 0x152D 203f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_VF 0x1520 2046ab6bfe3SJack F Vogel #define E1000_DEV_ID_I350_VF_HV 0x152F 2058cfa0ad2SJack F Vogel #define E1000_DEV_ID_82575EB_COPPER 0x10A7 2068cfa0ad2SJack F Vogel #define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9 2078cfa0ad2SJack F Vogel #define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6 2084edd8523SJack F Vogel #define E1000_DEV_ID_82580_COPPER 0x150E 2094edd8523SJack F Vogel #define E1000_DEV_ID_82580_FIBER 0x150F 2104edd8523SJack F Vogel #define E1000_DEV_ID_82580_SERDES 0x1510 2114edd8523SJack F Vogel #define E1000_DEV_ID_82580_SGMII 0x1511 2124edd8523SJack F Vogel #define E1000_DEV_ID_82580_COPPER_DUAL 0x1516 2137d9119bdSJack F Vogel #define E1000_DEV_ID_82580_QUAD_FIBER 0x1527 214f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_COPPER 0x1521 215f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_FIBER 0x1522 216f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_SERDES 0x1523 217f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_SGMII 0x1524 2184dab5c37SJack F Vogel #define E1000_DEV_ID_I350_DA4 0x1546 219ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_COPPER 0x1533 220ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_COPPER_OEM1 0x1534 221ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_COPPER_IT 0x1535 222ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_FIBER 0x1536 223ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_SERDES 0x1537 224ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_SGMII 0x1538 2257609433eSJack F Vogel #define E1000_DEV_ID_I210_COPPER_FLASHLESS 0x157B 2267609433eSJack F Vogel #define E1000_DEV_ID_I210_SERDES_FLASHLESS 0x157C 22782a9d0c2SGuinan Sun #define E1000_DEV_ID_I210_SGMII_FLASHLESS 0x15F6 228ab5d0362SJack F Vogel #define E1000_DEV_ID_I211_COPPER 0x1539 2297609433eSJack F Vogel #define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40 2307609433eSJack F Vogel #define E1000_DEV_ID_I354_SGMII 0x1F41 2317609433eSJack F Vogel #define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45 232f0ecc46dSJack F Vogel #define E1000_DEV_ID_DH89XXCC_SGMII 0x0438 233f0ecc46dSJack F Vogel #define E1000_DEV_ID_DH89XXCC_SERDES 0x043A 234f0ecc46dSJack F Vogel #define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C 235f0ecc46dSJack F Vogel #define E1000_DEV_ID_DH89XXCC_SFP 0x0440 2366ab6bfe3SJack F Vogel 2378cfa0ad2SJack F Vogel #define E1000_REVISION_0 0 2388cfa0ad2SJack F Vogel #define E1000_REVISION_1 1 2398cfa0ad2SJack F Vogel #define E1000_REVISION_2 2 2408cfa0ad2SJack F Vogel #define E1000_REVISION_3 3 2418cfa0ad2SJack F Vogel #define E1000_REVISION_4 4 2428cfa0ad2SJack F Vogel 2438cfa0ad2SJack F Vogel #define E1000_FUNC_0 0 2448cfa0ad2SJack F Vogel #define E1000_FUNC_1 1 2454edd8523SJack F Vogel #define E1000_FUNC_2 2 2464edd8523SJack F Vogel #define E1000_FUNC_3 3 2478cfa0ad2SJack F Vogel 248d035aa2dSJack F Vogel #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN0 0 249d035aa2dSJack F Vogel #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN1 3 2504edd8523SJack F Vogel #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN2 6 2514edd8523SJack F Vogel #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN3 9 252d035aa2dSJack F Vogel 2538cfa0ad2SJack F Vogel enum e1000_mac_type { 2548cfa0ad2SJack F Vogel e1000_undefined = 0, 2558cfa0ad2SJack F Vogel e1000_82542, 2568cfa0ad2SJack F Vogel e1000_82543, 2578cfa0ad2SJack F Vogel e1000_82544, 2588cfa0ad2SJack F Vogel e1000_82540, 2598cfa0ad2SJack F Vogel e1000_82545, 2608cfa0ad2SJack F Vogel e1000_82545_rev_3, 2618cfa0ad2SJack F Vogel e1000_82546, 2628cfa0ad2SJack F Vogel e1000_82546_rev_3, 2638cfa0ad2SJack F Vogel e1000_82541, 2648cfa0ad2SJack F Vogel e1000_82541_rev_2, 2658cfa0ad2SJack F Vogel e1000_82547, 2668cfa0ad2SJack F Vogel e1000_82547_rev_2, 2678cfa0ad2SJack F Vogel e1000_82571, 2688cfa0ad2SJack F Vogel e1000_82572, 2698cfa0ad2SJack F Vogel e1000_82573, 2708cfa0ad2SJack F Vogel e1000_82574, 2719d81738fSJack F Vogel e1000_82583, 2728cfa0ad2SJack F Vogel e1000_80003es2lan, 2738cfa0ad2SJack F Vogel e1000_ich8lan, 2748cfa0ad2SJack F Vogel e1000_ich9lan, 2758cfa0ad2SJack F Vogel e1000_ich10lan, 2769d81738fSJack F Vogel e1000_pchlan, 2777d9119bdSJack F Vogel e1000_pch2lan, 2786ab6bfe3SJack F Vogel e1000_pch_lpt, 279c80429ceSEric Joyner e1000_pch_spt, 2806fe4c0a0SSean Bruno e1000_pch_cnp, 28159690eabSKevin Bowling e1000_pch_tgp, 28259690eabSKevin Bowling e1000_pch_adp, 28359690eabSKevin Bowling e1000_pch_mtp, 284905ae588SKevin Bowling e1000_pch_ptp, 2858cfa0ad2SJack F Vogel e1000_82575, 2868cfa0ad2SJack F Vogel e1000_82576, 2874edd8523SJack F Vogel e1000_82580, 288f0ecc46dSJack F Vogel e1000_i350, 2897609433eSJack F Vogel e1000_i354, 290ab5d0362SJack F Vogel e1000_i210, 291ab5d0362SJack F Vogel e1000_i211, 292b8270585SJack F Vogel e1000_vfadapt, 293f0ecc46dSJack F Vogel e1000_vfadapt_i350, 2941bbdc25fSKevin Bowling e1000_num_macs /* List is 1-based, so subtract 1 for true count. */ 2958cfa0ad2SJack F Vogel }; 2968cfa0ad2SJack F Vogel 2978cfa0ad2SJack F Vogel enum e1000_media_type { 2988cfa0ad2SJack F Vogel e1000_media_type_unknown = 0, 2998cfa0ad2SJack F Vogel e1000_media_type_copper = 1, 3008cfa0ad2SJack F Vogel e1000_media_type_fiber = 2, 3018cfa0ad2SJack F Vogel e1000_media_type_internal_serdes = 3, 3028cfa0ad2SJack F Vogel e1000_num_media_types 3038cfa0ad2SJack F Vogel }; 3048cfa0ad2SJack F Vogel 3058cfa0ad2SJack F Vogel enum e1000_nvm_type { 3068cfa0ad2SJack F Vogel e1000_nvm_unknown = 0, 3078cfa0ad2SJack F Vogel e1000_nvm_none, 3088cfa0ad2SJack F Vogel e1000_nvm_eeprom_spi, 3098cfa0ad2SJack F Vogel e1000_nvm_eeprom_microwire, 3108cfa0ad2SJack F Vogel e1000_nvm_flash_hw, 3117609433eSJack F Vogel e1000_nvm_invm, 3128cfa0ad2SJack F Vogel e1000_nvm_flash_sw 3138cfa0ad2SJack F Vogel }; 3148cfa0ad2SJack F Vogel 3158cfa0ad2SJack F Vogel enum e1000_nvm_override { 3168cfa0ad2SJack F Vogel e1000_nvm_override_none = 0, 3178cfa0ad2SJack F Vogel e1000_nvm_override_spi_small, 3188cfa0ad2SJack F Vogel e1000_nvm_override_spi_large, 3198cfa0ad2SJack F Vogel e1000_nvm_override_microwire_small, 3208cfa0ad2SJack F Vogel e1000_nvm_override_microwire_large 3218cfa0ad2SJack F Vogel }; 3228cfa0ad2SJack F Vogel 3238cfa0ad2SJack F Vogel enum e1000_phy_type { 3248cfa0ad2SJack F Vogel e1000_phy_unknown = 0, 3258cfa0ad2SJack F Vogel e1000_phy_none, 3268cfa0ad2SJack F Vogel e1000_phy_m88, 3278cfa0ad2SJack F Vogel e1000_phy_igp, 3288cfa0ad2SJack F Vogel e1000_phy_igp_2, 3298cfa0ad2SJack F Vogel e1000_phy_gg82563, 3308cfa0ad2SJack F Vogel e1000_phy_igp_3, 3318cfa0ad2SJack F Vogel e1000_phy_ife, 3328cfa0ad2SJack F Vogel e1000_phy_bm, 3339d81738fSJack F Vogel e1000_phy_82578, 3349d81738fSJack F Vogel e1000_phy_82577, 3357d9119bdSJack F Vogel e1000_phy_82579, 3366ab6bfe3SJack F Vogel e1000_phy_i217, 3374edd8523SJack F Vogel e1000_phy_82580, 3388cfa0ad2SJack F Vogel e1000_phy_vf, 339ab5d0362SJack F Vogel e1000_phy_i210, 3408cfa0ad2SJack F Vogel }; 3418cfa0ad2SJack F Vogel 3428cfa0ad2SJack F Vogel enum e1000_bus_type { 3438cfa0ad2SJack F Vogel e1000_bus_type_unknown = 0, 3448cfa0ad2SJack F Vogel e1000_bus_type_pci, 3458cfa0ad2SJack F Vogel e1000_bus_type_pcix, 3468cfa0ad2SJack F Vogel e1000_bus_type_pci_express, 3478cfa0ad2SJack F Vogel e1000_bus_type_reserved 3488cfa0ad2SJack F Vogel }; 3498cfa0ad2SJack F Vogel 3508cfa0ad2SJack F Vogel enum e1000_bus_speed { 3518cfa0ad2SJack F Vogel e1000_bus_speed_unknown = 0, 3528cfa0ad2SJack F Vogel e1000_bus_speed_33, 3538cfa0ad2SJack F Vogel e1000_bus_speed_66, 3548cfa0ad2SJack F Vogel e1000_bus_speed_100, 3558cfa0ad2SJack F Vogel e1000_bus_speed_120, 3568cfa0ad2SJack F Vogel e1000_bus_speed_133, 3578cfa0ad2SJack F Vogel e1000_bus_speed_2500, 3588cfa0ad2SJack F Vogel e1000_bus_speed_5000, 3598cfa0ad2SJack F Vogel e1000_bus_speed_reserved 3608cfa0ad2SJack F Vogel }; 3618cfa0ad2SJack F Vogel 3628cfa0ad2SJack F Vogel enum e1000_bus_width { 3638cfa0ad2SJack F Vogel e1000_bus_width_unknown = 0, 3648cfa0ad2SJack F Vogel e1000_bus_width_pcie_x1, 3658cfa0ad2SJack F Vogel e1000_bus_width_pcie_x2, 3668cfa0ad2SJack F Vogel e1000_bus_width_pcie_x4 = 4, 3678cfa0ad2SJack F Vogel e1000_bus_width_pcie_x8 = 8, 3688cfa0ad2SJack F Vogel e1000_bus_width_32, 3698cfa0ad2SJack F Vogel e1000_bus_width_64, 3708cfa0ad2SJack F Vogel e1000_bus_width_reserved 3718cfa0ad2SJack F Vogel }; 3728cfa0ad2SJack F Vogel 3738cfa0ad2SJack F Vogel enum e1000_1000t_rx_status { 3748cfa0ad2SJack F Vogel e1000_1000t_rx_status_not_ok = 0, 3758cfa0ad2SJack F Vogel e1000_1000t_rx_status_ok, 3768cfa0ad2SJack F Vogel e1000_1000t_rx_status_undefined = 0xFF 3778cfa0ad2SJack F Vogel }; 3788cfa0ad2SJack F Vogel 3798cfa0ad2SJack F Vogel enum e1000_rev_polarity { 3808cfa0ad2SJack F Vogel e1000_rev_polarity_normal = 0, 3818cfa0ad2SJack F Vogel e1000_rev_polarity_reversed, 3828cfa0ad2SJack F Vogel e1000_rev_polarity_undefined = 0xFF 3838cfa0ad2SJack F Vogel }; 3848cfa0ad2SJack F Vogel 385daf9197cSJack F Vogel enum e1000_fc_mode { 3868cfa0ad2SJack F Vogel e1000_fc_none = 0, 3878cfa0ad2SJack F Vogel e1000_fc_rx_pause, 3888cfa0ad2SJack F Vogel e1000_fc_tx_pause, 3898cfa0ad2SJack F Vogel e1000_fc_full, 3908cfa0ad2SJack F Vogel e1000_fc_default = 0xFF 3918cfa0ad2SJack F Vogel }; 3928cfa0ad2SJack F Vogel 3938cfa0ad2SJack F Vogel enum e1000_ffe_config { 3948cfa0ad2SJack F Vogel e1000_ffe_config_enabled = 0, 3958cfa0ad2SJack F Vogel e1000_ffe_config_active, 3968cfa0ad2SJack F Vogel e1000_ffe_config_blocked 3978cfa0ad2SJack F Vogel }; 3988cfa0ad2SJack F Vogel 3998cfa0ad2SJack F Vogel enum e1000_dsp_config { 4008cfa0ad2SJack F Vogel e1000_dsp_config_disabled = 0, 4018cfa0ad2SJack F Vogel e1000_dsp_config_enabled, 4028cfa0ad2SJack F Vogel e1000_dsp_config_activated, 4038cfa0ad2SJack F Vogel e1000_dsp_config_undefined = 0xFF 4048cfa0ad2SJack F Vogel }; 4058cfa0ad2SJack F Vogel 406daf9197cSJack F Vogel enum e1000_ms_type { 407daf9197cSJack F Vogel e1000_ms_hw_default = 0, 408daf9197cSJack F Vogel e1000_ms_force_master, 409daf9197cSJack F Vogel e1000_ms_force_slave, 410daf9197cSJack F Vogel e1000_ms_auto 411daf9197cSJack F Vogel }; 412daf9197cSJack F Vogel 413daf9197cSJack F Vogel enum e1000_smart_speed { 414daf9197cSJack F Vogel e1000_smart_speed_default = 0, 415daf9197cSJack F Vogel e1000_smart_speed_on, 416daf9197cSJack F Vogel e1000_smart_speed_off 417daf9197cSJack F Vogel }; 418daf9197cSJack F Vogel 419d035aa2dSJack F Vogel enum e1000_serdes_link_state { 420d035aa2dSJack F Vogel e1000_serdes_link_down = 0, 421d035aa2dSJack F Vogel e1000_serdes_link_autoneg_progress, 422d035aa2dSJack F Vogel e1000_serdes_link_autoneg_complete, 423d035aa2dSJack F Vogel e1000_serdes_link_forced_up 424d035aa2dSJack F Vogel }; 425d035aa2dSJack F Vogel 4267d9119bdSJack F Vogel #define __le16 u16 4277d9119bdSJack F Vogel #define __le32 u32 4287d9119bdSJack F Vogel #define __le64 u64 4298cfa0ad2SJack F Vogel /* Receive Descriptor */ 4308cfa0ad2SJack F Vogel struct e1000_rx_desc { 431daf9197cSJack F Vogel __le64 buffer_addr; /* Address of the descriptor's data buffer */ 432daf9197cSJack F Vogel __le16 length; /* Length of data DMAed into data buffer */ 433daf9197cSJack F Vogel __le16 csum; /* Packet checksum */ 4348cfa0ad2SJack F Vogel u8 status; /* Descriptor status */ 4358cfa0ad2SJack F Vogel u8 errors; /* Descriptor Errors */ 436daf9197cSJack F Vogel __le16 special; 4378cfa0ad2SJack F Vogel }; 4388cfa0ad2SJack F Vogel 4398cfa0ad2SJack F Vogel /* Receive Descriptor - Extended */ 4408cfa0ad2SJack F Vogel union e1000_rx_desc_extended { 4418cfa0ad2SJack F Vogel struct { 442daf9197cSJack F Vogel __le64 buffer_addr; 443daf9197cSJack F Vogel __le64 reserved; 4448cfa0ad2SJack F Vogel } read; 4458cfa0ad2SJack F Vogel struct { 4468cfa0ad2SJack F Vogel struct { 447daf9197cSJack F Vogel __le32 mrq; /* Multiple Rx Queues */ 4488cfa0ad2SJack F Vogel union { 449daf9197cSJack F Vogel __le32 rss; /* RSS Hash */ 4508cfa0ad2SJack F Vogel struct { 451daf9197cSJack F Vogel __le16 ip_id; /* IP id */ 452daf9197cSJack F Vogel __le16 csum; /* Packet Checksum */ 4538cfa0ad2SJack F Vogel } csum_ip; 4548cfa0ad2SJack F Vogel } hi_dword; 4558cfa0ad2SJack F Vogel } lower; 4568cfa0ad2SJack F Vogel struct { 457daf9197cSJack F Vogel __le32 status_error; /* ext status/error */ 458daf9197cSJack F Vogel __le16 length; 459daf9197cSJack F Vogel __le16 vlan; /* VLAN tag */ 4608cfa0ad2SJack F Vogel } upper; 4618cfa0ad2SJack F Vogel } wb; /* writeback */ 4628cfa0ad2SJack F Vogel }; 4638cfa0ad2SJack F Vogel 4648cfa0ad2SJack F Vogel #define MAX_PS_BUFFERS 4 4657609433eSJack F Vogel 4667609433eSJack F Vogel /* Number of packet split data buffers (not including the header buffer) */ 4677609433eSJack F Vogel #define PS_PAGE_BUFFERS (MAX_PS_BUFFERS - 1) 4687609433eSJack F Vogel 4698cfa0ad2SJack F Vogel /* Receive Descriptor - Packet Split */ 4708cfa0ad2SJack F Vogel union e1000_rx_desc_packet_split { 4718cfa0ad2SJack F Vogel struct { 4728cfa0ad2SJack F Vogel /* one buffer for protocol header(s), three data buffers */ 473daf9197cSJack F Vogel __le64 buffer_addr[MAX_PS_BUFFERS]; 4748cfa0ad2SJack F Vogel } read; 4758cfa0ad2SJack F Vogel struct { 4768cfa0ad2SJack F Vogel struct { 477daf9197cSJack F Vogel __le32 mrq; /* Multiple Rx Queues */ 4788cfa0ad2SJack F Vogel union { 479daf9197cSJack F Vogel __le32 rss; /* RSS Hash */ 4808cfa0ad2SJack F Vogel struct { 481daf9197cSJack F Vogel __le16 ip_id; /* IP id */ 482daf9197cSJack F Vogel __le16 csum; /* Packet Checksum */ 4838cfa0ad2SJack F Vogel } csum_ip; 4848cfa0ad2SJack F Vogel } hi_dword; 4858cfa0ad2SJack F Vogel } lower; 4868cfa0ad2SJack F Vogel struct { 487daf9197cSJack F Vogel __le32 status_error; /* ext status/error */ 488daf9197cSJack F Vogel __le16 length0; /* length of buffer 0 */ 489daf9197cSJack F Vogel __le16 vlan; /* VLAN tag */ 4908cfa0ad2SJack F Vogel } middle; 4918cfa0ad2SJack F Vogel struct { 492daf9197cSJack F Vogel __le16 header_status; 4937609433eSJack F Vogel /* length of buffers 1-3 */ 4947609433eSJack F Vogel __le16 length[PS_PAGE_BUFFERS]; 4958cfa0ad2SJack F Vogel } upper; 496daf9197cSJack F Vogel __le64 reserved; 4978cfa0ad2SJack F Vogel } wb; /* writeback */ 4988cfa0ad2SJack F Vogel }; 4998cfa0ad2SJack F Vogel 5008cfa0ad2SJack F Vogel /* Transmit Descriptor */ 5018cfa0ad2SJack F Vogel struct e1000_tx_desc { 502daf9197cSJack F Vogel __le64 buffer_addr; /* Address of the descriptor's data buffer */ 5038cfa0ad2SJack F Vogel union { 504daf9197cSJack F Vogel __le32 data; 5058cfa0ad2SJack F Vogel struct { 506daf9197cSJack F Vogel __le16 length; /* Data buffer length */ 5078cfa0ad2SJack F Vogel u8 cso; /* Checksum offset */ 5088cfa0ad2SJack F Vogel u8 cmd; /* Descriptor control */ 5098cfa0ad2SJack F Vogel } flags; 5108cfa0ad2SJack F Vogel } lower; 5118cfa0ad2SJack F Vogel union { 512daf9197cSJack F Vogel __le32 data; 5138cfa0ad2SJack F Vogel struct { 5148cfa0ad2SJack F Vogel u8 status; /* Descriptor status */ 5158cfa0ad2SJack F Vogel u8 css; /* Checksum start */ 516daf9197cSJack F Vogel __le16 special; 5178cfa0ad2SJack F Vogel } fields; 5188cfa0ad2SJack F Vogel } upper; 5198cfa0ad2SJack F Vogel }; 5208cfa0ad2SJack F Vogel 5218cfa0ad2SJack F Vogel /* Offload Context Descriptor */ 5228cfa0ad2SJack F Vogel struct e1000_context_desc { 5238cfa0ad2SJack F Vogel union { 524daf9197cSJack F Vogel __le32 ip_config; 5258cfa0ad2SJack F Vogel struct { 5268cfa0ad2SJack F Vogel u8 ipcss; /* IP checksum start */ 5278cfa0ad2SJack F Vogel u8 ipcso; /* IP checksum offset */ 528daf9197cSJack F Vogel __le16 ipcse; /* IP checksum end */ 5298cfa0ad2SJack F Vogel } ip_fields; 5308cfa0ad2SJack F Vogel } lower_setup; 5318cfa0ad2SJack F Vogel union { 532daf9197cSJack F Vogel __le32 tcp_config; 5338cfa0ad2SJack F Vogel struct { 5348cfa0ad2SJack F Vogel u8 tucss; /* TCP checksum start */ 5358cfa0ad2SJack F Vogel u8 tucso; /* TCP checksum offset */ 536daf9197cSJack F Vogel __le16 tucse; /* TCP checksum end */ 5378cfa0ad2SJack F Vogel } tcp_fields; 5388cfa0ad2SJack F Vogel } upper_setup; 539daf9197cSJack F Vogel __le32 cmd_and_length; 5408cfa0ad2SJack F Vogel union { 541daf9197cSJack F Vogel __le32 data; 5428cfa0ad2SJack F Vogel struct { 5438cfa0ad2SJack F Vogel u8 status; /* Descriptor status */ 5448cfa0ad2SJack F Vogel u8 hdr_len; /* Header length */ 545daf9197cSJack F Vogel __le16 mss; /* Maximum segment size */ 5468cfa0ad2SJack F Vogel } fields; 5478cfa0ad2SJack F Vogel } tcp_seg_setup; 5488cfa0ad2SJack F Vogel }; 5498cfa0ad2SJack F Vogel 5508cfa0ad2SJack F Vogel /* Offload data descriptor */ 5518cfa0ad2SJack F Vogel struct e1000_data_desc { 552daf9197cSJack F Vogel __le64 buffer_addr; /* Address of the descriptor's buffer address */ 5538cfa0ad2SJack F Vogel union { 554daf9197cSJack F Vogel __le32 data; 5558cfa0ad2SJack F Vogel struct { 556daf9197cSJack F Vogel __le16 length; /* Data buffer length */ 5578cfa0ad2SJack F Vogel u8 typ_len_ext; 5588cfa0ad2SJack F Vogel u8 cmd; 5598cfa0ad2SJack F Vogel } flags; 5608cfa0ad2SJack F Vogel } lower; 5618cfa0ad2SJack F Vogel union { 562daf9197cSJack F Vogel __le32 data; 5638cfa0ad2SJack F Vogel struct { 5648cfa0ad2SJack F Vogel u8 status; /* Descriptor status */ 5658cfa0ad2SJack F Vogel u8 popts; /* Packet Options */ 566daf9197cSJack F Vogel __le16 special; 5678cfa0ad2SJack F Vogel } fields; 5688cfa0ad2SJack F Vogel } upper; 5698cfa0ad2SJack F Vogel }; 5708cfa0ad2SJack F Vogel 5718cfa0ad2SJack F Vogel /* Statistics counters collected by the MAC */ 5728cfa0ad2SJack F Vogel struct e1000_hw_stats { 5738cfa0ad2SJack F Vogel u64 crcerrs; 5748cfa0ad2SJack F Vogel u64 algnerrc; 5758cfa0ad2SJack F Vogel u64 symerrs; 5768cfa0ad2SJack F Vogel u64 rxerrc; 5778cfa0ad2SJack F Vogel u64 mpc; 5788cfa0ad2SJack F Vogel u64 scc; 5798cfa0ad2SJack F Vogel u64 ecol; 5808cfa0ad2SJack F Vogel u64 mcc; 5818cfa0ad2SJack F Vogel u64 latecol; 5828cfa0ad2SJack F Vogel u64 colc; 5838cfa0ad2SJack F Vogel u64 dc; 5848cfa0ad2SJack F Vogel u64 tncrs; 5858cfa0ad2SJack F Vogel u64 sec; 5868cfa0ad2SJack F Vogel u64 cexterr; 5878cfa0ad2SJack F Vogel u64 rlec; 5888cfa0ad2SJack F Vogel u64 xonrxc; 5898cfa0ad2SJack F Vogel u64 xontxc; 5908cfa0ad2SJack F Vogel u64 xoffrxc; 5918cfa0ad2SJack F Vogel u64 xofftxc; 5928cfa0ad2SJack F Vogel u64 fcruc; 5938cfa0ad2SJack F Vogel u64 prc64; 5948cfa0ad2SJack F Vogel u64 prc127; 5958cfa0ad2SJack F Vogel u64 prc255; 5968cfa0ad2SJack F Vogel u64 prc511; 5978cfa0ad2SJack F Vogel u64 prc1023; 5988cfa0ad2SJack F Vogel u64 prc1522; 5998cfa0ad2SJack F Vogel u64 gprc; 6008cfa0ad2SJack F Vogel u64 bprc; 6018cfa0ad2SJack F Vogel u64 mprc; 6028cfa0ad2SJack F Vogel u64 gptc; 6038cfa0ad2SJack F Vogel u64 gorc; 6048cfa0ad2SJack F Vogel u64 gotc; 6058cfa0ad2SJack F Vogel u64 rnbc; 6068cfa0ad2SJack F Vogel u64 ruc; 6078cfa0ad2SJack F Vogel u64 rfc; 6088cfa0ad2SJack F Vogel u64 roc; 6098cfa0ad2SJack F Vogel u64 rjc; 6108cfa0ad2SJack F Vogel u64 mgprc; 6118cfa0ad2SJack F Vogel u64 mgpdc; 6128cfa0ad2SJack F Vogel u64 mgptc; 6138cfa0ad2SJack F Vogel u64 tor; 6148cfa0ad2SJack F Vogel u64 tot; 6158cfa0ad2SJack F Vogel u64 tpr; 6168cfa0ad2SJack F Vogel u64 tpt; 6178cfa0ad2SJack F Vogel u64 ptc64; 6188cfa0ad2SJack F Vogel u64 ptc127; 6198cfa0ad2SJack F Vogel u64 ptc255; 6208cfa0ad2SJack F Vogel u64 ptc511; 6218cfa0ad2SJack F Vogel u64 ptc1023; 6228cfa0ad2SJack F Vogel u64 ptc1522; 6238cfa0ad2SJack F Vogel u64 mptc; 6248cfa0ad2SJack F Vogel u64 bptc; 6258cfa0ad2SJack F Vogel u64 tsctc; 6268cfa0ad2SJack F Vogel u64 tsctfc; 6278cfa0ad2SJack F Vogel u64 iac; 6288cfa0ad2SJack F Vogel u64 icrxptc; 6298cfa0ad2SJack F Vogel u64 icrxatc; 6308cfa0ad2SJack F Vogel u64 ictxptc; 6318cfa0ad2SJack F Vogel u64 ictxatc; 6328cfa0ad2SJack F Vogel u64 ictxqec; 6338cfa0ad2SJack F Vogel u64 ictxqmtc; 6348cfa0ad2SJack F Vogel u64 icrxdmtc; 6358cfa0ad2SJack F Vogel u64 icrxoc; 6368cfa0ad2SJack F Vogel u64 cbtmpc; 6378cfa0ad2SJack F Vogel u64 htdpmc; 6388cfa0ad2SJack F Vogel u64 cbrdpc; 6398cfa0ad2SJack F Vogel u64 cbrmpc; 6408cfa0ad2SJack F Vogel u64 rpthc; 6418cfa0ad2SJack F Vogel u64 hgptc; 6428cfa0ad2SJack F Vogel u64 htcbdpc; 6438cfa0ad2SJack F Vogel u64 hgorc; 6448cfa0ad2SJack F Vogel u64 hgotc; 6458cfa0ad2SJack F Vogel u64 lenerrs; 6468cfa0ad2SJack F Vogel u64 scvpc; 6478cfa0ad2SJack F Vogel u64 hrmpc; 648daf9197cSJack F Vogel u64 doosync; 6494dab5c37SJack F Vogel u64 o2bgptc; 6504dab5c37SJack F Vogel u64 o2bspc; 6514dab5c37SJack F Vogel u64 b2ospc; 6524dab5c37SJack F Vogel u64 b2ogprc; 653daf9197cSJack F Vogel }; 654daf9197cSJack F Vogel 655b8270585SJack F Vogel struct e1000_vf_stats { 656b8270585SJack F Vogel u64 base_gprc; 657b8270585SJack F Vogel u64 base_gptc; 658b8270585SJack F Vogel u64 base_gorc; 659b8270585SJack F Vogel u64 base_gotc; 660b8270585SJack F Vogel u64 base_mprc; 661b8270585SJack F Vogel u64 base_gotlbc; 662b8270585SJack F Vogel u64 base_gptlbc; 663b8270585SJack F Vogel u64 base_gorlbc; 664b8270585SJack F Vogel u64 base_gprlbc; 665b8270585SJack F Vogel 666b8270585SJack F Vogel u32 last_gprc; 667b8270585SJack F Vogel u32 last_gptc; 668b8270585SJack F Vogel u32 last_gorc; 669b8270585SJack F Vogel u32 last_gotc; 670b8270585SJack F Vogel u32 last_mprc; 671b8270585SJack F Vogel u32 last_gotlbc; 672b8270585SJack F Vogel u32 last_gptlbc; 673b8270585SJack F Vogel u32 last_gorlbc; 674b8270585SJack F Vogel u32 last_gprlbc; 675b8270585SJack F Vogel 676b8270585SJack F Vogel u64 gprc; 677b8270585SJack F Vogel u64 gptc; 678b8270585SJack F Vogel u64 gorc; 679b8270585SJack F Vogel u64 gotc; 680b8270585SJack F Vogel u64 mprc; 681b8270585SJack F Vogel u64 gotlbc; 682b8270585SJack F Vogel u64 gptlbc; 683b8270585SJack F Vogel u64 gorlbc; 684b8270585SJack F Vogel u64 gprlbc; 685b8270585SJack F Vogel }; 6868cfa0ad2SJack F Vogel 6878cfa0ad2SJack F Vogel struct e1000_phy_stats { 6888cfa0ad2SJack F Vogel u32 idle_errors; 6898cfa0ad2SJack F Vogel u32 receive_errors; 6908cfa0ad2SJack F Vogel }; 6918cfa0ad2SJack F Vogel 6928cfa0ad2SJack F Vogel struct e1000_host_mng_dhcp_cookie { 6938cfa0ad2SJack F Vogel u32 signature; 6948cfa0ad2SJack F Vogel u8 status; 6958cfa0ad2SJack F Vogel u8 reserved0; 6968cfa0ad2SJack F Vogel u16 vlan_id; 6978cfa0ad2SJack F Vogel u32 reserved1; 6988cfa0ad2SJack F Vogel u16 reserved2; 6998cfa0ad2SJack F Vogel u8 reserved3; 7008cfa0ad2SJack F Vogel u8 checksum; 7018cfa0ad2SJack F Vogel }; 7028cfa0ad2SJack F Vogel 7038cfa0ad2SJack F Vogel /* Host Interface "Rev 1" */ 7048cfa0ad2SJack F Vogel struct e1000_host_command_header { 7058cfa0ad2SJack F Vogel u8 command_id; 7068cfa0ad2SJack F Vogel u8 command_length; 7078cfa0ad2SJack F Vogel u8 command_options; 7088cfa0ad2SJack F Vogel u8 checksum; 7098cfa0ad2SJack F Vogel }; 7108cfa0ad2SJack F Vogel 7118cfa0ad2SJack F Vogel #define E1000_HI_MAX_DATA_LENGTH 252 7128cfa0ad2SJack F Vogel struct e1000_host_command_info { 7138cfa0ad2SJack F Vogel struct e1000_host_command_header command_header; 7148cfa0ad2SJack F Vogel u8 command_data[E1000_HI_MAX_DATA_LENGTH]; 7158cfa0ad2SJack F Vogel }; 7168cfa0ad2SJack F Vogel 7178cfa0ad2SJack F Vogel /* Host Interface "Rev 2" */ 7188cfa0ad2SJack F Vogel struct e1000_host_mng_command_header { 7198cfa0ad2SJack F Vogel u8 command_id; 7208cfa0ad2SJack F Vogel u8 checksum; 7218cfa0ad2SJack F Vogel u16 reserved1; 7228cfa0ad2SJack F Vogel u16 reserved2; 7238cfa0ad2SJack F Vogel u16 command_length; 7248cfa0ad2SJack F Vogel }; 7258cfa0ad2SJack F Vogel 7268cfa0ad2SJack F Vogel #define E1000_HI_MAX_MNG_DATA_LENGTH 0x6F8 7278cfa0ad2SJack F Vogel struct e1000_host_mng_command_info { 7288cfa0ad2SJack F Vogel struct e1000_host_mng_command_header command_header; 7298cfa0ad2SJack F Vogel u8 command_data[E1000_HI_MAX_MNG_DATA_LENGTH]; 7308cfa0ad2SJack F Vogel }; 7318cfa0ad2SJack F Vogel 7328cfa0ad2SJack F Vogel #include "e1000_mac.h" 7338cfa0ad2SJack F Vogel #include "e1000_phy.h" 7348cfa0ad2SJack F Vogel #include "e1000_nvm.h" 7358cfa0ad2SJack F Vogel #include "e1000_manage.h" 736b8270585SJack F Vogel #include "e1000_mbx.h" 7378cfa0ad2SJack F Vogel 7388cfa0ad2SJack F Vogel /* Function pointers for the MAC. */ 7396ab6bfe3SJack F Vogel struct e1000_mac_operations { 7408cfa0ad2SJack F Vogel s32 (*init_params)(struct e1000_hw *); 741d035aa2dSJack F Vogel s32 (*id_led_init)(struct e1000_hw *); 7428cfa0ad2SJack F Vogel s32 (*blink_led)(struct e1000_hw *); 7436ab6bfe3SJack F Vogel bool (*check_mng_mode)(struct e1000_hw *); 7448cfa0ad2SJack F Vogel s32 (*check_for_link)(struct e1000_hw *); 7458cfa0ad2SJack F Vogel s32 (*cleanup_led)(struct e1000_hw *); 7468cfa0ad2SJack F Vogel void (*clear_hw_cntrs)(struct e1000_hw *); 7478cfa0ad2SJack F Vogel void (*clear_vfta)(struct e1000_hw *); 7488cfa0ad2SJack F Vogel s32 (*get_bus_info)(struct e1000_hw *); 749daf9197cSJack F Vogel void (*set_lan_id)(struct e1000_hw *); 7508cfa0ad2SJack F Vogel s32 (*get_link_up_info)(struct e1000_hw *, u16 *, u16 *); 7518cfa0ad2SJack F Vogel s32 (*led_on)(struct e1000_hw *); 7528cfa0ad2SJack F Vogel s32 (*led_off)(struct e1000_hw *); 753d035aa2dSJack F Vogel void (*update_mc_addr_list)(struct e1000_hw *, u8 *, u32); 7548cfa0ad2SJack F Vogel s32 (*reset_hw)(struct e1000_hw *); 7558cfa0ad2SJack F Vogel s32 (*init_hw)(struct e1000_hw *); 7568cfa0ad2SJack F Vogel void (*shutdown_serdes)(struct e1000_hw *); 757a69ed8dfSJack F Vogel void (*power_up_serdes)(struct e1000_hw *); 7588cfa0ad2SJack F Vogel s32 (*setup_link)(struct e1000_hw *); 7598cfa0ad2SJack F Vogel s32 (*setup_physical_interface)(struct e1000_hw *); 7608cfa0ad2SJack F Vogel s32 (*setup_led)(struct e1000_hw *); 7618cfa0ad2SJack F Vogel void (*write_vfta)(struct e1000_hw *, u32, u32); 7628cfa0ad2SJack F Vogel void (*config_collision_dist)(struct e1000_hw *); 7638cc64f1eSJack F Vogel int (*rar_set)(struct e1000_hw *, u8*, u32); 7648cfa0ad2SJack F Vogel s32 (*read_mac_addr)(struct e1000_hw *); 7658cfa0ad2SJack F Vogel s32 (*validate_mdi_setting)(struct e1000_hw *); 766e373323fSSean Bruno s32 (*set_obff_timer)(struct e1000_hw *, u32); 767ab5d0362SJack F Vogel s32 (*acquire_swfw_sync)(struct e1000_hw *, u16); 768ab5d0362SJack F Vogel void (*release_swfw_sync)(struct e1000_hw *, u16); 7698cfa0ad2SJack F Vogel }; 7708cfa0ad2SJack F Vogel 7716ab6bfe3SJack F Vogel /* When to use various PHY register access functions: 7724dab5c37SJack F Vogel * 7734dab5c37SJack F Vogel * Func Caller 7744dab5c37SJack F Vogel * Function Does Does When to use 7754dab5c37SJack F Vogel * ~~~~~~~~~~~~ ~~~~~ ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7764dab5c37SJack F Vogel * X_reg L,P,A n/a for simple PHY reg accesses 7774dab5c37SJack F Vogel * X_reg_locked P,A L for multiple accesses of different regs 7784dab5c37SJack F Vogel * on different pages 7794dab5c37SJack F Vogel * X_reg_page A L,P for multiple accesses of different regs 7804dab5c37SJack F Vogel * on the same page 7814dab5c37SJack F Vogel * 7824dab5c37SJack F Vogel * Where X=[read|write], L=locking, P=sets page, A=register access 7834dab5c37SJack F Vogel * 7844dab5c37SJack F Vogel */ 7858cfa0ad2SJack F Vogel struct e1000_phy_operations { 7868cfa0ad2SJack F Vogel s32 (*init_params)(struct e1000_hw *); 7878cfa0ad2SJack F Vogel s32 (*acquire)(struct e1000_hw *); 788daf9197cSJack F Vogel s32 (*cfg_on_link_up)(struct e1000_hw *); 7898cfa0ad2SJack F Vogel s32 (*check_polarity)(struct e1000_hw *); 7908cfa0ad2SJack F Vogel s32 (*check_reset_block)(struct e1000_hw *); 7918cfa0ad2SJack F Vogel s32 (*commit)(struct e1000_hw *); 7928cfa0ad2SJack F Vogel s32 (*force_speed_duplex)(struct e1000_hw *); 7938cfa0ad2SJack F Vogel s32 (*get_cfg_done)(struct e1000_hw *hw); 7948cfa0ad2SJack F Vogel s32 (*get_cable_length)(struct e1000_hw *); 7958cfa0ad2SJack F Vogel s32 (*get_info)(struct e1000_hw *); 7964dab5c37SJack F Vogel s32 (*set_page)(struct e1000_hw *, u16); 7978cfa0ad2SJack F Vogel s32 (*read_reg)(struct e1000_hw *, u32, u16 *); 7984edd8523SJack F Vogel s32 (*read_reg_locked)(struct e1000_hw *, u32, u16 *); 7994dab5c37SJack F Vogel s32 (*read_reg_page)(struct e1000_hw *, u32, u16 *); 8008cfa0ad2SJack F Vogel void (*release)(struct e1000_hw *); 8018cfa0ad2SJack F Vogel s32 (*reset)(struct e1000_hw *); 8028cfa0ad2SJack F Vogel s32 (*set_d0_lplu_state)(struct e1000_hw *, bool); 8038cfa0ad2SJack F Vogel s32 (*set_d3_lplu_state)(struct e1000_hw *, bool); 8048cfa0ad2SJack F Vogel s32 (*write_reg)(struct e1000_hw *, u32, u16); 8054edd8523SJack F Vogel s32 (*write_reg_locked)(struct e1000_hw *, u32, u16); 8064dab5c37SJack F Vogel s32 (*write_reg_page)(struct e1000_hw *, u32, u16); 8078cfa0ad2SJack F Vogel void (*power_up)(struct e1000_hw *); 8088cfa0ad2SJack F Vogel void (*power_down)(struct e1000_hw *); 8094dab5c37SJack F Vogel s32 (*read_i2c_byte)(struct e1000_hw *, u8, u8, u8 *); 8104dab5c37SJack F Vogel s32 (*write_i2c_byte)(struct e1000_hw *, u8, u8, u8); 8118cfa0ad2SJack F Vogel }; 8128cfa0ad2SJack F Vogel 8136ab6bfe3SJack F Vogel /* Function pointers for the NVM. */ 8148cfa0ad2SJack F Vogel struct e1000_nvm_operations { 8158cfa0ad2SJack F Vogel s32 (*init_params)(struct e1000_hw *); 8168cfa0ad2SJack F Vogel s32 (*acquire)(struct e1000_hw *); 8178cfa0ad2SJack F Vogel s32 (*read)(struct e1000_hw *, u16, u16, u16 *); 8188cfa0ad2SJack F Vogel void (*release)(struct e1000_hw *); 8198cfa0ad2SJack F Vogel void (*reload)(struct e1000_hw *); 8208cfa0ad2SJack F Vogel s32 (*update)(struct e1000_hw *); 8218cfa0ad2SJack F Vogel s32 (*valid_led_default)(struct e1000_hw *, u16 *); 8228cfa0ad2SJack F Vogel s32 (*validate)(struct e1000_hw *); 8238cfa0ad2SJack F Vogel s32 (*write)(struct e1000_hw *, u16, u16, u16 *); 8248cfa0ad2SJack F Vogel }; 8258cfa0ad2SJack F Vogel 8268cfa0ad2SJack F Vogel struct e1000_mac_info { 8278cfa0ad2SJack F Vogel struct e1000_mac_operations ops; 828e81998f4SEric Joyner u8 addr[ETHER_ADDR_LEN]; 829e81998f4SEric Joyner u8 perm_addr[ETHER_ADDR_LEN]; 8308cfa0ad2SJack F Vogel 8318cfa0ad2SJack F Vogel enum e1000_mac_type type; 8328cfa0ad2SJack F Vogel 8338cfa0ad2SJack F Vogel u32 collision_delta; 8348cfa0ad2SJack F Vogel u32 ledctl_default; 8358cfa0ad2SJack F Vogel u32 ledctl_mode1; 8368cfa0ad2SJack F Vogel u32 ledctl_mode2; 8378cfa0ad2SJack F Vogel u32 mc_filter_type; 8388cfa0ad2SJack F Vogel u32 tx_packet_delta; 8398cfa0ad2SJack F Vogel u32 txcw; 8408cfa0ad2SJack F Vogel 8418cfa0ad2SJack F Vogel u16 current_ifs_val; 8428cfa0ad2SJack F Vogel u16 ifs_max_val; 8438cfa0ad2SJack F Vogel u16 ifs_min_val; 8448cfa0ad2SJack F Vogel u16 ifs_ratio; 8458cfa0ad2SJack F Vogel u16 ifs_step_size; 8468cfa0ad2SJack F Vogel u16 mta_reg_count; 8474edd8523SJack F Vogel u16 uta_reg_count; 8489d81738fSJack F Vogel 8499d81738fSJack F Vogel /* Maximum size of the MTA register table in all supported adapters */ 8509d81738fSJack F Vogel #define MAX_MTA_REG 128 851d035aa2dSJack F Vogel u32 mta_shadow[MAX_MTA_REG]; 8528cfa0ad2SJack F Vogel u16 rar_entry_count; 8538cfa0ad2SJack F Vogel 8548cfa0ad2SJack F Vogel u8 forced_speed_duplex; 8558cfa0ad2SJack F Vogel 8568cfa0ad2SJack F Vogel bool adaptive_ifs; 8578ec87fc5SJack F Vogel bool has_fwsm; 8588cfa0ad2SJack F Vogel bool arc_subsystem_valid; 8598cfa0ad2SJack F Vogel bool asf_firmware_present; 8608cfa0ad2SJack F Vogel bool autoneg; 8618cfa0ad2SJack F Vogel bool autoneg_failed; 8628cfa0ad2SJack F Vogel bool get_link_status; 8638cfa0ad2SJack F Vogel bool in_ifs_mode; 8648cfa0ad2SJack F Vogel bool report_tx_early; 865d035aa2dSJack F Vogel enum e1000_serdes_link_state serdes_link_state; 8668cfa0ad2SJack F Vogel bool serdes_has_link; 8678cfa0ad2SJack F Vogel bool tx_pkt_filtering; 8686ab6bfe3SJack F Vogel u32 max_frame_size; 8698cfa0ad2SJack F Vogel }; 8708cfa0ad2SJack F Vogel 8718cfa0ad2SJack F Vogel struct e1000_phy_info { 8728cfa0ad2SJack F Vogel struct e1000_phy_operations ops; 8738cfa0ad2SJack F Vogel enum e1000_phy_type type; 8748cfa0ad2SJack F Vogel 8758cfa0ad2SJack F Vogel enum e1000_1000t_rx_status local_rx; 8768cfa0ad2SJack F Vogel enum e1000_1000t_rx_status remote_rx; 8778cfa0ad2SJack F Vogel enum e1000_ms_type ms_type; 8788cfa0ad2SJack F Vogel enum e1000_ms_type original_ms_type; 8798cfa0ad2SJack F Vogel enum e1000_rev_polarity cable_polarity; 8808cfa0ad2SJack F Vogel enum e1000_smart_speed smart_speed; 8818cfa0ad2SJack F Vogel 8828cfa0ad2SJack F Vogel u32 addr; 8838cfa0ad2SJack F Vogel u32 id; 8848cfa0ad2SJack F Vogel u32 reset_delay_us; /* in usec */ 8858cfa0ad2SJack F Vogel u32 revision; 8868cfa0ad2SJack F Vogel 8878cfa0ad2SJack F Vogel enum e1000_media_type media_type; 8888cfa0ad2SJack F Vogel 8898cfa0ad2SJack F Vogel u16 autoneg_advertised; 8908cfa0ad2SJack F Vogel u16 autoneg_mask; 8918cfa0ad2SJack F Vogel u16 cable_length; 8928cfa0ad2SJack F Vogel u16 max_cable_length; 8938cfa0ad2SJack F Vogel u16 min_cable_length; 8948cfa0ad2SJack F Vogel 8958cfa0ad2SJack F Vogel u8 mdix; 8968cfa0ad2SJack F Vogel 8978cfa0ad2SJack F Vogel bool disable_polarity_correction; 8988cfa0ad2SJack F Vogel bool is_mdix; 8998cfa0ad2SJack F Vogel bool polarity_correction; 9008cfa0ad2SJack F Vogel bool speed_downgraded; 9018cfa0ad2SJack F Vogel bool autoneg_wait_to_complete; 9028cfa0ad2SJack F Vogel }; 9038cfa0ad2SJack F Vogel 9048cfa0ad2SJack F Vogel struct e1000_nvm_info { 9058cfa0ad2SJack F Vogel struct e1000_nvm_operations ops; 9068cfa0ad2SJack F Vogel enum e1000_nvm_type type; 9078cfa0ad2SJack F Vogel enum e1000_nvm_override override; 9088cfa0ad2SJack F Vogel 9098cfa0ad2SJack F Vogel u32 flash_bank_size; 9108cfa0ad2SJack F Vogel u32 flash_base_addr; 9118cfa0ad2SJack F Vogel 9128cfa0ad2SJack F Vogel u16 word_size; 9138cfa0ad2SJack F Vogel u16 delay_usec; 9148cfa0ad2SJack F Vogel u16 address_bits; 9158cfa0ad2SJack F Vogel u16 opcode_bits; 9168cfa0ad2SJack F Vogel u16 page_size; 9178cfa0ad2SJack F Vogel }; 9188cfa0ad2SJack F Vogel 9198cfa0ad2SJack F Vogel struct e1000_bus_info { 9208cfa0ad2SJack F Vogel enum e1000_bus_type type; 9218cfa0ad2SJack F Vogel enum e1000_bus_speed speed; 9228cfa0ad2SJack F Vogel enum e1000_bus_width width; 9238cfa0ad2SJack F Vogel 9248cfa0ad2SJack F Vogel u16 func; 9258cfa0ad2SJack F Vogel u16 pci_cmd_word; 9268cfa0ad2SJack F Vogel }; 9278cfa0ad2SJack F Vogel 9288cfa0ad2SJack F Vogel struct e1000_fc_info { 9298cfa0ad2SJack F Vogel u32 high_water; /* Flow control high-water mark */ 9308cfa0ad2SJack F Vogel u32 low_water; /* Flow control low-water mark */ 9318cfa0ad2SJack F Vogel u16 pause_time; /* Flow control pause timer */ 932b8270585SJack F Vogel u16 refresh_time; /* Flow control refresh timer */ 9338cfa0ad2SJack F Vogel bool send_xon; /* Flow control send XON */ 9348cfa0ad2SJack F Vogel bool strict_ieee; /* Strict IEEE mode */ 935daf9197cSJack F Vogel enum e1000_fc_mode current_mode; /* FC mode in effect */ 936daf9197cSJack F Vogel enum e1000_fc_mode requested_mode; /* FC mode requested by caller */ 937daf9197cSJack F Vogel }; 938daf9197cSJack F Vogel 9397d9119bdSJack F Vogel struct e1000_mbx_operations { 9407d9119bdSJack F Vogel s32 (*init_params)(struct e1000_hw *hw); 9417d9119bdSJack F Vogel s32 (*read)(struct e1000_hw *, u32 *, u16, u16); 9427d9119bdSJack F Vogel s32 (*write)(struct e1000_hw *, u32 *, u16, u16); 9437d9119bdSJack F Vogel s32 (*read_posted)(struct e1000_hw *, u32 *, u16, u16); 9447d9119bdSJack F Vogel s32 (*write_posted)(struct e1000_hw *, u32 *, u16, u16); 9457d9119bdSJack F Vogel s32 (*check_for_msg)(struct e1000_hw *, u16); 9467d9119bdSJack F Vogel s32 (*check_for_ack)(struct e1000_hw *, u16); 9477d9119bdSJack F Vogel s32 (*check_for_rst)(struct e1000_hw *, u16); 9487d9119bdSJack F Vogel }; 9497d9119bdSJack F Vogel 9507d9119bdSJack F Vogel struct e1000_mbx_stats { 9517d9119bdSJack F Vogel u32 msgs_tx; 9527d9119bdSJack F Vogel u32 msgs_rx; 9537d9119bdSJack F Vogel 9547d9119bdSJack F Vogel u32 acks; 9557d9119bdSJack F Vogel u32 reqs; 9567d9119bdSJack F Vogel u32 rsts; 9577d9119bdSJack F Vogel }; 9587d9119bdSJack F Vogel 9597d9119bdSJack F Vogel struct e1000_mbx_info { 9607d9119bdSJack F Vogel struct e1000_mbx_operations ops; 9617d9119bdSJack F Vogel struct e1000_mbx_stats stats; 9627d9119bdSJack F Vogel u32 timeout; 9637d9119bdSJack F Vogel u32 usec_delay; 9647d9119bdSJack F Vogel u16 size; 9657d9119bdSJack F Vogel }; 9667d9119bdSJack F Vogel 967daf9197cSJack F Vogel struct e1000_dev_spec_82541 { 968daf9197cSJack F Vogel enum e1000_dsp_config dsp_config; 969daf9197cSJack F Vogel enum e1000_ffe_config ffe_config; 970daf9197cSJack F Vogel u16 spd_default; 971daf9197cSJack F Vogel bool phy_init_script; 972daf9197cSJack F Vogel }; 973daf9197cSJack F Vogel 974daf9197cSJack F Vogel struct e1000_dev_spec_82542 { 975daf9197cSJack F Vogel bool dma_fairness; 976daf9197cSJack F Vogel }; 977daf9197cSJack F Vogel 978daf9197cSJack F Vogel struct e1000_dev_spec_82543 { 979daf9197cSJack F Vogel u32 tbi_compatibility; 980daf9197cSJack F Vogel bool dma_fairness; 981daf9197cSJack F Vogel bool init_phy_disabled; 982daf9197cSJack F Vogel }; 983daf9197cSJack F Vogel 984daf9197cSJack F Vogel struct e1000_dev_spec_82571 { 985daf9197cSJack F Vogel bool laa_is_present; 9869d81738fSJack F Vogel u32 smb_counter; 987daf9197cSJack F Vogel }; 988daf9197cSJack F Vogel 9894edd8523SJack F Vogel struct e1000_dev_spec_80003es2lan { 9904edd8523SJack F Vogel bool mdic_wa_enable; 9914edd8523SJack F Vogel }; 9924edd8523SJack F Vogel 993daf9197cSJack F Vogel struct e1000_shadow_ram { 994daf9197cSJack F Vogel u16 value; 995daf9197cSJack F Vogel bool modified; 996daf9197cSJack F Vogel }; 997daf9197cSJack F Vogel 998daf9197cSJack F Vogel #define E1000_SHADOW_RAM_WORDS 2048 999daf9197cSJack F Vogel 10008cc64f1eSJack F Vogel /* I218 PHY Ultra Low Power (ULP) states */ 10018cc64f1eSJack F Vogel enum e1000_ulp_state { 10028cc64f1eSJack F Vogel e1000_ulp_state_unknown, 10038cc64f1eSJack F Vogel e1000_ulp_state_off, 10048cc64f1eSJack F Vogel e1000_ulp_state_on, 10058cc64f1eSJack F Vogel }; 10068cc64f1eSJack F Vogel 1007daf9197cSJack F Vogel struct e1000_dev_spec_ich8lan { 1008daf9197cSJack F Vogel bool kmrn_lock_loss_workaround_enabled; 1009daf9197cSJack F Vogel struct e1000_shadow_ram shadow_ram[E1000_SHADOW_RAM_WORDS]; 10104edd8523SJack F Vogel bool nvm_k1_enabled; 1011e760e292SSean Bruno bool disable_k1_off; 1012ab5d0362SJack F Vogel bool eee_disable; 10136ab6bfe3SJack F Vogel u16 eee_lp_ability; 10148cc64f1eSJack F Vogel enum e1000_ulp_state ulp_state; 1015e760e292SSean Bruno bool ulp_capability_disabled; 1016e760e292SSean Bruno bool during_suspend_flow; 1017984d1616SKevin Bowling bool smbus_disable; 1018b8270585SJack F Vogel }; 1019b8270585SJack F Vogel 1020daf9197cSJack F Vogel struct e1000_dev_spec_82575 { 1021daf9197cSJack F Vogel bool sgmii_active; 1022d035aa2dSJack F Vogel bool global_device_reset; 1023ab5d0362SJack F Vogel bool eee_disable; 10244dab5c37SJack F Vogel bool module_plugged; 10256ab6bfe3SJack F Vogel bool clear_semaphore_once; 10264dab5c37SJack F Vogel u32 mtu; 10276ab6bfe3SJack F Vogel struct sfp_e1000_flags eth_flags; 10287609433eSJack F Vogel u8 media_port; 10297609433eSJack F Vogel bool media_changed; 1030daf9197cSJack F Vogel }; 1031daf9197cSJack F Vogel 1032daf9197cSJack F Vogel struct e1000_dev_spec_vf { 1033daf9197cSJack F Vogel u32 vf_number; 1034d035aa2dSJack F Vogel u32 v2p_mailbox; 10358cfa0ad2SJack F Vogel }; 10368cfa0ad2SJack F Vogel 10378cfa0ad2SJack F Vogel struct e1000_hw { 10388cfa0ad2SJack F Vogel void *back; 10398cfa0ad2SJack F Vogel 10408cfa0ad2SJack F Vogel u8 *hw_addr; 10418cfa0ad2SJack F Vogel u8 *flash_address; 10428cfa0ad2SJack F Vogel unsigned long io_base; 10438cfa0ad2SJack F Vogel 10448cfa0ad2SJack F Vogel struct e1000_mac_info mac; 10458cfa0ad2SJack F Vogel struct e1000_fc_info fc; 10468cfa0ad2SJack F Vogel struct e1000_phy_info phy; 10478cfa0ad2SJack F Vogel struct e1000_nvm_info nvm; 10488cfa0ad2SJack F Vogel struct e1000_bus_info bus; 1049b8270585SJack F Vogel struct e1000_mbx_info mbx; 10508cfa0ad2SJack F Vogel struct e1000_host_mng_dhcp_cookie mng_cookie; 10518cfa0ad2SJack F Vogel 1052daf9197cSJack F Vogel union { 1053daf9197cSJack F Vogel struct e1000_dev_spec_82541 _82541; 1054daf9197cSJack F Vogel struct e1000_dev_spec_82542 _82542; 1055daf9197cSJack F Vogel struct e1000_dev_spec_82543 _82543; 1056daf9197cSJack F Vogel struct e1000_dev_spec_82571 _82571; 10574edd8523SJack F Vogel struct e1000_dev_spec_80003es2lan _80003es2lan; 1058daf9197cSJack F Vogel struct e1000_dev_spec_ich8lan ich8lan; 1059daf9197cSJack F Vogel struct e1000_dev_spec_82575 _82575; 1060daf9197cSJack F Vogel struct e1000_dev_spec_vf vf; 1061daf9197cSJack F Vogel } dev_spec; 10628cfa0ad2SJack F Vogel 10638cfa0ad2SJack F Vogel u16 device_id; 10648cfa0ad2SJack F Vogel u16 subsystem_vendor_id; 10658cfa0ad2SJack F Vogel u16 subsystem_device_id; 10668cfa0ad2SJack F Vogel u16 vendor_id; 10678cfa0ad2SJack F Vogel 10688cfa0ad2SJack F Vogel u8 revision_id; 10698cfa0ad2SJack F Vogel }; 10708cfa0ad2SJack F Vogel 10718cfa0ad2SJack F Vogel #include "e1000_82541.h" 10728cfa0ad2SJack F Vogel #include "e1000_82543.h" 10738cfa0ad2SJack F Vogel #include "e1000_82571.h" 10748cfa0ad2SJack F Vogel #include "e1000_80003es2lan.h" 10758cfa0ad2SJack F Vogel #include "e1000_ich8lan.h" 10768cfa0ad2SJack F Vogel #include "e1000_82575.h" 1077ab5d0362SJack F Vogel #include "e1000_i210.h" 10786b9d35faSGuinan Sun #include "e1000_base.h" 10798cfa0ad2SJack F Vogel 10808cfa0ad2SJack F Vogel /* These functions must be implemented by drivers */ 10818cfa0ad2SJack F Vogel void e1000_pci_clear_mwi(struct e1000_hw *hw); 10828cfa0ad2SJack F Vogel void e1000_pci_set_mwi(struct e1000_hw *hw); 10838cfa0ad2SJack F Vogel s32 e1000_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value); 10849d81738fSJack F Vogel s32 e1000_write_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value); 10858cfa0ad2SJack F Vogel void e1000_read_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value); 10868cfa0ad2SJack F Vogel void e1000_write_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value); 10878cfa0ad2SJack F Vogel 10888cfa0ad2SJack F Vogel #endif 1089