1*75ab5f91Slh155975 /* 2*75ab5f91Slh155975 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 3*75ab5f91Slh155975 * Use is subject to license terms. 4*75ab5f91Slh155975 */ 5*75ab5f91Slh155975 6*75ab5f91Slh155975 #ifndef AMD8111S_HW_H 7*75ab5f91Slh155975 #define AMD8111S_HW_H 8*75ab5f91Slh155975 9*75ab5f91Slh155975 #pragma ident "%Z%%M% %I% %E% SMI" 10*75ab5f91Slh155975 11*75ab5f91Slh155975 /* 12*75ab5f91Slh155975 * Copyright (c) 2001-2006 Advanced Micro Devices, Inc. All rights reserved. 13*75ab5f91Slh155975 * 14*75ab5f91Slh155975 * Redistribution and use in source and binary forms, with or without 15*75ab5f91Slh155975 * modification, are permitted provided that the following conditions are met: 16*75ab5f91Slh155975 * 17*75ab5f91Slh155975 * + Redistributions of source code must retain the above copyright notice, 18*75ab5f91Slh155975 * + this list of conditions and the following disclaimer. 19*75ab5f91Slh155975 * 20*75ab5f91Slh155975 * + Redistributions in binary form must reproduce the above copyright 21*75ab5f91Slh155975 * + notice, this list of conditions and the following disclaimer in the 22*75ab5f91Slh155975 * + documentation and/or other materials provided with the distribution. 23*75ab5f91Slh155975 * 24*75ab5f91Slh155975 * + Neither the name of Advanced Micro Devices, Inc. nor the names of its 25*75ab5f91Slh155975 * + contributors may be used to endorse or promote products derived from 26*75ab5f91Slh155975 * + this software without specific prior written permission. 27*75ab5f91Slh155975 * 28*75ab5f91Slh155975 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 29*75ab5f91Slh155975 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 30*75ab5f91Slh155975 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31*75ab5f91Slh155975 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 32*75ab5f91Slh155975 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. OR 33*75ab5f91Slh155975 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 34*75ab5f91Slh155975 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 35*75ab5f91Slh155975 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 36*75ab5f91Slh155975 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 37*75ab5f91Slh155975 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 38*75ab5f91Slh155975 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 39*75ab5f91Slh155975 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 40*75ab5f91Slh155975 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41*75ab5f91Slh155975 * 42*75ab5f91Slh155975 * Import/Export/Re-Export/Use/Release/Transfer Restrictions and 43*75ab5f91Slh155975 * Compliance with Applicable Laws. Notice is hereby given that 44*75ab5f91Slh155975 * the software may be subject to restrictions on use, release, 45*75ab5f91Slh155975 * transfer, importation, exportation and/or re-exportation under 46*75ab5f91Slh155975 * the laws and regulations of the United States or other 47*75ab5f91Slh155975 * countries ("Applicable Laws"), which include but are not 48*75ab5f91Slh155975 * limited to U.S. export control laws such as the Export 49*75ab5f91Slh155975 * Administration Regulations and national security controls as 50*75ab5f91Slh155975 * defined thereunder, as well as State Department controls under 51*75ab5f91Slh155975 * the U.S. Munitions List. Permission to use and/or 52*75ab5f91Slh155975 * redistribute the software is conditioned upon compliance with 53*75ab5f91Slh155975 * all Applicable Laws, including U.S. export control laws 54*75ab5f91Slh155975 * regarding specifically designated persons, countries and 55*75ab5f91Slh155975 * nationals of countries subject to national security controls. 56*75ab5f91Slh155975 */ 57*75ab5f91Slh155975 58*75ab5f91Slh155975 59*75ab5f91Slh155975 /* Definitions for the type of Memory allocations needed */ 60*75ab5f91Slh155975 61*75ab5f91Slh155975 #define ETH_LENGTH_OF_ADDRESS 6 62*75ab5f91Slh155975 #define ETH_MAC_HDR_SIZE 14 63*75ab5f91Slh155975 64*75ab5f91Slh155975 65*75ab5f91Slh155975 #define ADD_MULTICAST 1 66*75ab5f91Slh155975 67*75ab5f91Slh155975 #define ENABLE_MULTICAST 2 68*75ab5f91Slh155975 #define DISABLE_MULTICAST 3 69*75ab5f91Slh155975 70*75ab5f91Slh155975 #define ENABLE_ALL_MULTICAST 4 71*75ab5f91Slh155975 #define DISABLE_ALL_MULTICAST 5 72*75ab5f91Slh155975 73*75ab5f91Slh155975 #define ENABLE_BROADCAST 6 74*75ab5f91Slh155975 #define DISABLE_BROADCAST 7 75*75ab5f91Slh155975 76*75ab5f91Slh155975 #define ADD_WAKE_UP_PATTERN 8 77*75ab5f91Slh155975 #define REMOVE_WAKE_UP_PATTERN 9 78*75ab5f91Slh155975 #define ENABLE_MAGIC_PACKET_WAKE_UP 10 79*75ab5f91Slh155975 80*75ab5f91Slh155975 #define SET_SINGLE_MULTICAST 11 81*75ab5f91Slh155975 #define UNSET_SINGLE_MULTICAST 12 82*75ab5f91Slh155975 #define DELETE_MULTICAST 13 83*75ab5f91Slh155975 84*75ab5f91Slh155975 #define LINK_DOWN 1 85*75ab5f91Slh155975 #define LINK_UP 2 86*75ab5f91Slh155975 #define LINK_UNKNOWN 3 87*75ab5f91Slh155975 88*75ab5f91Slh155975 /* Setting the MODE */ 89*75ab5f91Slh155975 #define PROMISCOUS 1 90*75ab5f91Slh155975 #define DISABLE_PROM 2 91*75ab5f91Slh155975 92*75ab5f91Slh155975 #define VIRTUAL 1 93*75ab5f91Slh155975 94*75ab5f91Slh155975 #define ALIGNMENT 0x0f 95*75ab5f91Slh155975 96*75ab5f91Slh155975 #define TX_RING_LEN_BITS 10 /* 1024 descriptors */ 97*75ab5f91Slh155975 #define RX_RING_LEN_BITS 10 /* 1024 descriptors */ 98*75ab5f91Slh155975 #define TX_BUF_SIZE 2048 99*75ab5f91Slh155975 #define RX_BUF_SIZE 2048 100*75ab5f91Slh155975 101*75ab5f91Slh155975 #define TX_RING_SIZE (1 << (TX_RING_LEN_BITS)) 102*75ab5f91Slh155975 #define TX_COALESC_SIZE (1 << 11) 103*75ab5f91Slh155975 #define TX_RING_MOD_MASK (2 * TX_RING_SIZE - 1) 104*75ab5f91Slh155975 105*75ab5f91Slh155975 #define TX_RESCHEDULE_THRESHOLD (TX_RING_SIZE >> 1) 106*75ab5f91Slh155975 107*75ab5f91Slh155975 #define RX_RING_SIZE (1 << (RX_RING_LEN_BITS)) 108*75ab5f91Slh155975 #define RX_RING_MOD_MASK (RX_RING_SIZE - 1) 109*75ab5f91Slh155975 110*75ab5f91Slh155975 #define MAX_MULTICAST_ADDRESSES 32 111*75ab5f91Slh155975 #define JUMBO_ENABLED 0 112*75ab5f91Slh155975 #define JUMBO_DISABLED 1 113*75ab5f91Slh155975 114*75ab5f91Slh155975 /* Default value of IPG convergence time */ 115*75ab5f91Slh155975 #define MIN_IPG_DEFAULT 96 116*75ab5f91Slh155975 #define MAX_IPG_DEFAULT 255 117*75ab5f91Slh155975 #define MAX_BUFFER_COUNT 8 /* full coalesce */ 118*75ab5f91Slh155975 119*75ab5f91Slh155975 #define ULONG unsigned long 120*75ab5f91Slh155975 #define UCHAR unsigned char 121*75ab5f91Slh155975 122*75ab5f91Slh155975 /* Generic MII registers. */ 123*75ab5f91Slh155975 #define MII_BMCR 0x00 /* Basic mode control register */ 124*75ab5f91Slh155975 #define MII_BMSR 0x01 /* Basic mode status register */ 125*75ab5f91Slh155975 #define MII_PHYSID1 0x02 /* PHYS ID 1 */ 126*75ab5f91Slh155975 #define MII_PHYSID2 0x03 /* PHYS ID 2 */ 127*75ab5f91Slh155975 #define MII_ADVERTISE 0x04 /* Advertisement control reg */ 128*75ab5f91Slh155975 #define MII_LPA 0x05 /* Link partner ability reg */ 129*75ab5f91Slh155975 #define MII_EXPANSION 0x06 /* Expansion register */ 130*75ab5f91Slh155975 #define MII_DCOUNTER 0x12 /* Disconnect counter */ 131*75ab5f91Slh155975 #define MII_FCSCOUNTER 0x13 /* False carrier counter */ 132*75ab5f91Slh155975 #define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ 133*75ab5f91Slh155975 #define MII_RERRCOUNTER 0x15 /* Receive error counter */ 134*75ab5f91Slh155975 #define MII_SREVISION 0x16 /* Silicon revision */ 135*75ab5f91Slh155975 #define MII_RESV1 0x17 /* Reserved... */ 136*75ab5f91Slh155975 #define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ 137*75ab5f91Slh155975 #define MII_PHYADDR 0x19 /* PHY address */ 138*75ab5f91Slh155975 #define MII_RESV2 0x1a /* Reserved... */ 139*75ab5f91Slh155975 #define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ 140*75ab5f91Slh155975 #define MII_NCONFIG 0x1c /* Network interface config */ 141*75ab5f91Slh155975 142*75ab5f91Slh155975 143*75ab5f91Slh155975 #define DEVICE_ID 0x744b 144*75ab5f91Slh155975 #define VENDOR_ID 0x1022 145*75ab5f91Slh155975 146*75ab5f91Slh155975 /* L4 Chip Name */ 147*75ab5f91Slh155975 #define DEVICE_CHIPNAME "Memory_Map_L7 AMDIDC" 148*75ab5f91Slh155975 149*75ab5f91Slh155975 /* Error Status Registers */ 150*75ab5f91Slh155975 #define MIB_OFFSET 0x28 151*75ab5f91Slh155975 152*75ab5f91Slh155975 /* 153*75ab5f91Slh155975 * MIB counter definitions 154*75ab5f91Slh155975 */ 155*75ab5f91Slh155975 #define RcvMissPkts 0x00 156*75ab5f91Slh155975 #define RcvOctets 0x01 157*75ab5f91Slh155975 #define RcvBroadCastPkts 0x02 158*75ab5f91Slh155975 #define RcvMultiCastPkts 0x03 159*75ab5f91Slh155975 #define RcvUndersizePkts 0x04 160*75ab5f91Slh155975 #define RcvOversizePkts 0x05 161*75ab5f91Slh155975 #define RcvFragments 0x06 162*75ab5f91Slh155975 #define RcvJabbers 0x07 163*75ab5f91Slh155975 #define RcvUniCastPkts 0x08 164*75ab5f91Slh155975 #define RcvAlignmentErrors 0x09 165*75ab5f91Slh155975 #define RcvFCSErrors 0x0a 166*75ab5f91Slh155975 #define RcvGoodOctets 0x0b 167*75ab5f91Slh155975 #define RcvMACCtrl 0x0c 168*75ab5f91Slh155975 #define RcvFlowCtrl 0x0d 169*75ab5f91Slh155975 #define RcvPkts64Octets 0x0e 170*75ab5f91Slh155975 #define RcvPkts65to127Octets 0x0f 171*75ab5f91Slh155975 #define RcvPkts128to255Octets 0x10 172*75ab5f91Slh155975 #define RcvPkts256to511Octets 0x11 173*75ab5f91Slh155975 #define RcvPkts512to1023Octets 0x12 174*75ab5f91Slh155975 #define RcvPkts1024to1518Octets 0x13 175*75ab5f91Slh155975 #define RcvUnsupportedOpcode 0x14 176*75ab5f91Slh155975 #define RcvSymbolErrors 0x15 177*75ab5f91Slh155975 #define RcvDropPktsRing0 0x16 178*75ab5f91Slh155975 179*75ab5f91Slh155975 #define XmtUnderrunPkts 0x20 180*75ab5f91Slh155975 #define XmtOctets 0x21 181*75ab5f91Slh155975 #define XmtPackets 0x22 182*75ab5f91Slh155975 #define XmtBroadCastPkts 0x23 183*75ab5f91Slh155975 #define XmtMultiCastPkts 0x24 184*75ab5f91Slh155975 #define XmtCollisions 0x25 185*75ab5f91Slh155975 #define XmtUniCastPkts 0x26 186*75ab5f91Slh155975 #define XmtOneCollision 0x27 187*75ab5f91Slh155975 #define XmtMultipleCollision 0x28 188*75ab5f91Slh155975 #define XmtDeferredTransmit 0x29 189*75ab5f91Slh155975 #define XmtLateCollision 0x2a 190*75ab5f91Slh155975 #define XmtExcessiveDefer 0x2b 191*75ab5f91Slh155975 #define XmtLossCarrier 0x2c 192*75ab5f91Slh155975 #define XmtExcessiveCollision 0x2d 193*75ab5f91Slh155975 #define XmtBackPressure 0x2e 194*75ab5f91Slh155975 #define XmtFlowCtrl 0x2f 195*75ab5f91Slh155975 #define XmtPkts64Octets 0x30 196*75ab5f91Slh155975 #define XmtPkts65to127Octets 0x31 197*75ab5f91Slh155975 #define XmtPkts128to255Octets 0x32 198*75ab5f91Slh155975 #define XmtPkts256to511Octets 0x33 199*75ab5f91Slh155975 #define XmtPkts512to1023Octets 0x34 200*75ab5f91Slh155975 #define XmtPkts1024to1518Octets 0x35 201*75ab5f91Slh155975 #define XmtOversizePkts 0x36 202*75ab5f91Slh155975 203*75ab5f91Slh155975 /* Link Status */ 204*75ab5f91Slh155975 #define SPEED_MASK 0x0380 /* B9 .. B7 */ 205*75ab5f91Slh155975 #define SPEED_100Mbps 0x0180 206*75ab5f91Slh155975 #define SPEED_10Mbps 0x0100 207*75ab5f91Slh155975 208*75ab5f91Slh155975 209*75ab5f91Slh155975 /* PMR (Pattern Match RAM) */ 210*75ab5f91Slh155975 #define MAX_ALLOWED_PATTERNS 8 211*75ab5f91Slh155975 #define MAX_PATTERNS 1024 212*75ab5f91Slh155975 #define ALL_MULTI B16_MASK 213*75ab5f91Slh155975 #define ONLY_MULTI B15_MASK 214*75ab5f91Slh155975 215*75ab5f91Slh155975 #define B31_MASK 0x80000000 216*75ab5f91Slh155975 #define B30_MASK 0x40000000 217*75ab5f91Slh155975 #define B29_MASK 0x20000000 218*75ab5f91Slh155975 #define B28_MASK 0x10000000 219*75ab5f91Slh155975 #define B27_MASK 0x08000000 220*75ab5f91Slh155975 #define B26_MASK 0x04000000 221*75ab5f91Slh155975 #define B25_MASK 0x02000000 222*75ab5f91Slh155975 #define B24_MASK 0x01000000 223*75ab5f91Slh155975 #define B23_MASK 0x00800000 224*75ab5f91Slh155975 #define B22_MASK 0x00400000 225*75ab5f91Slh155975 #define B21_MASK 0x00200000 226*75ab5f91Slh155975 #define B20_MASK 0x00100000 227*75ab5f91Slh155975 #define B19_MASK 0x00080000 228*75ab5f91Slh155975 #define B18_MASK 0x00040000 229*75ab5f91Slh155975 #define B17_MASK 0x00020000 230*75ab5f91Slh155975 #define B16_MASK 0x00010000 231*75ab5f91Slh155975 232*75ab5f91Slh155975 #define B15_MASK 0x8000 233*75ab5f91Slh155975 #define B14_MASK 0x4000 234*75ab5f91Slh155975 #define B13_MASK 0x2000 235*75ab5f91Slh155975 #define B12_MASK 0x1000 236*75ab5f91Slh155975 #define B11_MASK 0x0800 237*75ab5f91Slh155975 #define B10_MASK 0x0400 238*75ab5f91Slh155975 #define B9_MASK 0x0200 239*75ab5f91Slh155975 #define B8_MASK 0x0100 240*75ab5f91Slh155975 #define B7_MASK 0x0080 241*75ab5f91Slh155975 #define B6_MASK 0x0040 242*75ab5f91Slh155975 #define B5_MASK 0x0020 243*75ab5f91Slh155975 #define B4_MASK 0x0010 244*75ab5f91Slh155975 #define B3_MASK 0x0008 245*75ab5f91Slh155975 #define B2_MASK 0x0004 246*75ab5f91Slh155975 #define B1_MASK 0x0002 247*75ab5f91Slh155975 #define B0_MASK 0x0001 248*75ab5f91Slh155975 249*75ab5f91Slh155975 /* PCI register offset */ 250*75ab5f91Slh155975 /* required by odl in getting the Memory Base Address */ 251*75ab5f91Slh155975 #define MEMBASE_MASK 0xFFFFF000 252*75ab5f91Slh155975 #define PCI_CAP_ID_REG_OFFSET 0x34 253*75ab5f91Slh155975 #define PCI_PMC_REG_OFFSET 0x36 254*75ab5f91Slh155975 #define PCI_PMCSR_REG_OFFSET 0x38 255*75ab5f91Slh155975 #define MIB_OFFSET 0x28 256*75ab5f91Slh155975 #define STAT_ASF 0x00 /* 32bit register */ 257*75ab5f91Slh155975 258*75ab5f91Slh155975 #define FORCED_PHY_MASK 0xFF07 259*75ab5f91Slh155975 260*75ab5f91Slh155975 /* Offset of Drifrent Registers */ 261*75ab5f91Slh155975 #define AP_VALUE 0x98 /* 32bit register */ 262*75ab5f91Slh155975 #define AUTOPOLL0 0x88 /* 16bit register */ 263*75ab5f91Slh155975 #define AUTOPOLL1 0x8A /* 16bit register */ 264*75ab5f91Slh155975 #define AUTOPOLL2 0x8C /* 16bit register */ 265*75ab5f91Slh155975 #define AUTOPOLL3 0x8E /* 16bit register */ 266*75ab5f91Slh155975 #define AUTOPOLL4 0x90 /* 16bit register */ 267*75ab5f91Slh155975 #define AUTOPOLL5 0x92 /* 16bit register */ 268*75ab5f91Slh155975 /* Receive Ring Base Address Registers . */ 269*75ab5f91Slh155975 #define RCV_RING_BASE_ADDR0 0x120 /* 64bit register */ 270*75ab5f91Slh155975 /* Transmit Ring Base Address */ 271*75ab5f91Slh155975 #define XMT_RING_BASE_ADDR0 0x100 /* 64bit register */ 272*75ab5f91Slh155975 #define XMT_RING_BASE_ADDR1 0x108 /* 64bit register */ 273*75ab5f91Slh155975 #define XMT_RING_BASE_ADDR2 0x110 /* 64bit register */ 274*75ab5f91Slh155975 #define XMT_RING_BASE_ADDR3 0x118 /* 64bit register */ 275*75ab5f91Slh155975 /* CAM ADDRESS */ 276*75ab5f91Slh155975 #define CAM_ADDR 0x1A0 /* 16bit register */ 277*75ab5f91Slh155975 #define CAM_DATA 0x198 /* 64bit register */ 278*75ab5f91Slh155975 /* CHIP ID */ 279*75ab5f91Slh155975 #define CHIPID 0x004 /* 32bit register */ 280*75ab5f91Slh155975 /* COMMAND STYLE REGISTERS */ 281*75ab5f91Slh155975 #define CMD0 0x48 /* 32bit register */ 282*75ab5f91Slh155975 #define CMD2 0x50 /* 32bit register */ 283*75ab5f91Slh155975 #define CMD3 0x54 /* 32bit register */ 284*75ab5f91Slh155975 #define CMD7 0x64 /* 32bit register */ 285*75ab5f91Slh155975 /* CONTRIOL REGISTER */ 286*75ab5f91Slh155975 #define CTRL1 0x6C /* 32bit register */ 287*75ab5f91Slh155975 #define CTRL2 0x70 /* 32bit register */ 288*75ab5f91Slh155975 /* DELAY INTERRUPT REGISTER */ 289*75ab5f91Slh155975 #define DLY_INT_A 0xA8 /* 32bit register */ 290*75ab5f91Slh155975 #define DLY_INT_B 0xAC /* 32bit register */ 291*75ab5f91Slh155975 /* FLOW CONTROL REGISTER */ 292*75ab5f91Slh155975 #define FLOW_CONTROL 0xC8 /* 32bit register */ 293*75ab5f91Slh155975 /* INTER FRAME SPACING */ 294*75ab5f91Slh155975 #define IFS 0x18E /* 16bit register */ 295*75ab5f91Slh155975 #define IFS1 0x18C /* 8bit register */ 296*75ab5f91Slh155975 /* INTERRUPT REGISTER */ 297*75ab5f91Slh155975 #define INT0 0x38 /* 32bit register */ 298*75ab5f91Slh155975 #define INTEN0 0x40 /* 32bit register */ 299*75ab5f91Slh155975 /* LOGICAL ADDRESS */ 300*75ab5f91Slh155975 #define LADRF1 0x168 /* 64bit register */ 301*75ab5f91Slh155975 /* MIB ADDRESS REGISTER */ 302*75ab5f91Slh155975 #define MIB_ADDR 0x14 /* 16bit register */ 303*75ab5f91Slh155975 #define MIB_DATA 0x10 /* 32bit register */ 304*75ab5f91Slh155975 /* MAC ADDRESS */ 305*75ab5f91Slh155975 #define PADR 0x160 /* 48bit register */ 306*75ab5f91Slh155975 /* PHY ADDRESS */ 307*75ab5f91Slh155975 #define PHY_ACCESS 0xD0 /* 32bit register */ 308*75ab5f91Slh155975 /* PATTERN REGISTER */ 309*75ab5f91Slh155975 #define PMAT0 0x190 /* 32bit register */ 310*75ab5f91Slh155975 #define PMAT1 0x194 /* 32bit register */ 311*75ab5f91Slh155975 /* RECEIVE RING LENGTH OFFSET */ 312*75ab5f91Slh155975 #define RCV_RING_LEN0 0x150 /* 16bit register */ 313*75ab5f91Slh155975 /* SRAM BOUNDARY */ 314*75ab5f91Slh155975 #define SRAM_BOUNDARY 0x17A /* 16bit register */ 315*75ab5f91Slh155975 #define SRAM_SIZE 0x178 /* 16bit register */ 316*75ab5f91Slh155975 /* STATUS REGISTER */ 317*75ab5f91Slh155975 #define STAT0 0x30 /* 32bit register */ 318*75ab5f91Slh155975 #define STVAL 0xD8 /* 32bit register */ 319*75ab5f91Slh155975 #define TEST0 0x1A8 /* 32bit register */ 320*75ab5f91Slh155975 #define XMT_RING_LEN0 0x140 /* 16bit register */ 321*75ab5f91Slh155975 #define XMT_RING_LEN1 0x144 /* 16bit register */ 322*75ab5f91Slh155975 #define XMT_RING_LEN2 0x148 /* 16bit register */ 323*75ab5f91Slh155975 #define XMT_RING_LEN3 0x14C /* 16bit register */ 324*75ab5f91Slh155975 #define XMT_RING_LIMIT 0x7C /* 32bit register */ 325*75ab5f91Slh155975 326*75ab5f91Slh155975 327*75ab5f91Slh155975 328*75ab5f91Slh155975 #define RCV_RING_LEN1 0x154 /* 16bit register */ 329*75ab5f91Slh155975 #define RCV_RING_LEN2 0x158 /* 16bit register */ 330*75ab5f91Slh155975 #define RCV_RING_LEN3 0x15C /* 16bit register */ 331*75ab5f91Slh155975 #define FFC_THRESH 0xCC /* 32bit register */ 332*75ab5f91Slh155975 #define RCV_RING_BASE_ADDR1 0x128 /* 64bit register */ 333*75ab5f91Slh155975 #define RCV_RING_BASE_ADDR2 0x130 /* 64bit register */ 334*75ab5f91Slh155975 #define RCV_RING_BASE_ADDR3 0x138 /* 64bit register */ 335*75ab5f91Slh155975 #define RCV_RING_CFG 0x78 /* 16bit register */ 336*75ab5f91Slh155975 #define PCS_ANEG 0x9C /* 32bit register */ 337*75ab5f91Slh155975 #define PCS_RCFG 0xA0 /* 32bit register */ 338*75ab5f91Slh155975 #define PCS_XCFG 0xA4 /* 32bit register */ 339*75ab5f91Slh155975 #define DFC_INDEX2 0xB8 /* 16bit register */ 340*75ab5f91Slh155975 #define DFC_INDEX3 0xBA /* 16bit register */ 341*75ab5f91Slh155975 #define DFC_INDEX0 0xBC /* 16bit register */ 342*75ab5f91Slh155975 #define DFC_INDEX1 0xBE /* 16bit register */ 343*75ab5f91Slh155975 #define DFC_THRESH2 0xC0 /* 16bit register */ 344*75ab5f91Slh155975 #define DFC_THRESH3 0xC2 /* 16bit register */ 345*75ab5f91Slh155975 #define DFC_THRESH0 0xC4 /* 16bit register */ 346*75ab5f91Slh155975 #define DFC_THRESH1 0xC6 /* 16bit register */ 347*75ab5f91Slh155975 #define PAUSE_CNT 0xDE /* 32bit register */ 348*75ab5f91Slh155975 #define LED0 0xE0 /* 16bit register */ 349*75ab5f91Slh155975 #define LED1 0xE2 /* 16bit register */ 350*75ab5f91Slh155975 #define LED2 0xE4 /* 16bit register */ 351*75ab5f91Slh155975 #define LED3 0xE6 /* 16bit register */ 352*75ab5f91Slh155975 353*75ab5f91Slh155975 354*75ab5f91Slh155975 #define EEPROM_ACC 0x17C /* 16bit register */ 355*75ab5f91Slh155975 356*75ab5f91Slh155975 357*75ab5f91Slh155975 /* Register Bit Definitions */ 358*75ab5f91Slh155975 /* STAT_ASF 0x00, 32bit register */ 359*75ab5f91Slh155975 #define ASF_INIT_DONE B1_MASK 360*75ab5f91Slh155975 #define ASF_INIT_PRESENT B0_MASK 361*75ab5f91Slh155975 362*75ab5f91Slh155975 /* MIB_ADDR 0x14, 16bit register */ 363*75ab5f91Slh155975 #define MIB_CMD_ACTIVE B15_MASK 364*75ab5f91Slh155975 #define MIB_RD_CMD B13_MASK 365*75ab5f91Slh155975 #define MIB_CLEAR B12_MASK 366*75ab5f91Slh155975 #define MIB_ADDRESS 0x0000003F /* 5:0 */ 367*75ab5f91Slh155975 368*75ab5f91Slh155975 /* QOS_ADDR 0x1C, 16bit register */ 369*75ab5f91Slh155975 #define QOS_CMD_ACTIVE B15_MASK 370*75ab5f91Slh155975 #define QOS_WR_CMD B14_MASK 371*75ab5f91Slh155975 #define QOS_RD_CMD B13_MASK 372*75ab5f91Slh155975 #define QOS_ADDRESS 0x0000001F /* 4:0 */ 373*75ab5f91Slh155975 374*75ab5f91Slh155975 /* STAT0 0x30, 32bit register */ 375*75ab5f91Slh155975 #define PAUSE_PEND B14_MASK 376*75ab5f91Slh155975 #define PAUSING B13_MASK 377*75ab5f91Slh155975 #define PMAT_DET B12_MASK 378*75ab5f91Slh155975 #define MP_DET B11_MASK 379*75ab5f91Slh155975 #define LC_DET B10_MASK 380*75ab5f91Slh155975 #define SPEED_MASK 0x0380 /* 9:7 */ 381*75ab5f91Slh155975 #define FULL_DPLX B6_MASK 382*75ab5f91Slh155975 #define LINK_STAT B5_MASK 383*75ab5f91Slh155975 #define AUTONEG_COMPLETE B4_MASK 384*75ab5f91Slh155975 /* #define MIIPD B3_MASK */ 385*75ab5f91Slh155975 #define RX_SUSPENDED B2_MASK 386*75ab5f91Slh155975 #define TX_SUSPENDED B1_MASK 387*75ab5f91Slh155975 #define RUNNING B0_MASK 388*75ab5f91Slh155975 389*75ab5f91Slh155975 390*75ab5f91Slh155975 /* INTEN0 0x40, 32bit register */ 391*75ab5f91Slh155975 392*75ab5f91Slh155975 #define VAL3 B31_MASK 393*75ab5f91Slh155975 #define VAL2 B23_MASK 394*75ab5f91Slh155975 #define VAL1 B15_MASK 395*75ab5f91Slh155975 #define VAL0 B7_MASK 396*75ab5f91Slh155975 397*75ab5f91Slh155975 /* VAL3 */ 398*75ab5f91Slh155975 #define PSCINTEN B28_MASK 399*75ab5f91Slh155975 #define LCINTEN B27_MASK 400*75ab5f91Slh155975 #define APINT5EN B26_MASK 401*75ab5f91Slh155975 #define APINT4EN B25_MASK 402*75ab5f91Slh155975 #define APINT3EN B24_MASK 403*75ab5f91Slh155975 404*75ab5f91Slh155975 /* VAL2 */ 405*75ab5f91Slh155975 #define APINT2EN B22_MASK 406*75ab5f91Slh155975 #define APINT1EN B21_MASK 407*75ab5f91Slh155975 #define APINT0EN B20_MASK 408*75ab5f91Slh155975 #define MIIPDTINTEN B19_MASK 409*75ab5f91Slh155975 #define MCCIINTEN B18_MASK 410*75ab5f91Slh155975 #define MCCINTEN B17_MASK 411*75ab5f91Slh155975 #define MREINTEN B16_MASK 412*75ab5f91Slh155975 413*75ab5f91Slh155975 /* VAL1 */ 414*75ab5f91Slh155975 #define SPNDINTEN B14_MASK 415*75ab5f91Slh155975 #define MPINTEN B13_MASK 416*75ab5f91Slh155975 #define SINTEN B12_MASK 417*75ab5f91Slh155975 #define TINTEN3 B11_MASK 418*75ab5f91Slh155975 #define TINTEN2 B10_MASK 419*75ab5f91Slh155975 #define TINTEN1 B9_MASK 420*75ab5f91Slh155975 #define TINTEN0 B8_MASK 421*75ab5f91Slh155975 422*75ab5f91Slh155975 /* VAL0 */ 423*75ab5f91Slh155975 #define STINTEN B4_MASK 424*75ab5f91Slh155975 #define RINTEN3 B3_MASK 425*75ab5f91Slh155975 #define RINTEN2 B2_MASK 426*75ab5f91Slh155975 #define RINTEN1 B1_MASK 427*75ab5f91Slh155975 #define RINTEN0 B0_MASK 428*75ab5f91Slh155975 429*75ab5f91Slh155975 /* CMD0 0x48, 32bit register */ 430*75ab5f91Slh155975 /* VAL2 */ 431*75ab5f91Slh155975 #define RDMD3 B19_MASK 432*75ab5f91Slh155975 #define RDMD2 B18_MASK 433*75ab5f91Slh155975 #define RDMD1 B17_MASK 434*75ab5f91Slh155975 #define RDMD0 B16_MASK 435*75ab5f91Slh155975 436*75ab5f91Slh155975 /* VAL1 */ 437*75ab5f91Slh155975 #define TDMD3 B11_MASK 438*75ab5f91Slh155975 #define TDMD2 B10_MASK 439*75ab5f91Slh155975 #define TDMD1 B9_MASK 440*75ab5f91Slh155975 #define TDMD0 B8_MASK 441*75ab5f91Slh155975 442*75ab5f91Slh155975 /* VAL0 */ 443*75ab5f91Slh155975 #define UINTCMD B6_MASK 444*75ab5f91Slh155975 #define RX_FAST_SPND B5_MASK 445*75ab5f91Slh155975 #define TX_FAST_SPND B4_MASK 446*75ab5f91Slh155975 #define RX_SPND B3_MASK 447*75ab5f91Slh155975 #define TX_SPND B2_MASK 448*75ab5f91Slh155975 #define INTREN B1_MASK 449*75ab5f91Slh155975 #define RUN B0_MASK 450*75ab5f91Slh155975 451*75ab5f91Slh155975 /* CMD2 0x50, 32bit register */ 452*75ab5f91Slh155975 /* VAL3 */ 453*75ab5f91Slh155975 #define CONDUIT_MODE B29_MASK 454*75ab5f91Slh155975 #define PREF_QTAG B28_MASK 455*75ab5f91Slh155975 #define ALT_PRI_OK B27_MASK 456*75ab5f91Slh155975 457*75ab5f91Slh155975 /* VAL2 */ 458*75ab5f91Slh155975 #define CAM_ENABLE B22_MASK 459*75ab5f91Slh155975 #define QOS_ENABLE B21_MASK 460*75ab5f91Slh155975 #define HASH_ENABLE B20_MASK 461*75ab5f91Slh155975 #define RPA B19_MASK 462*75ab5f91Slh155975 #define DRCVPA B18_MASK 463*75ab5f91Slh155975 #define DRCVBC B17_MASK 464*75ab5f91Slh155975 #define PROM B16_MASK 465*75ab5f91Slh155975 466*75ab5f91Slh155975 /* VAL1 */ 467*75ab5f91Slh155975 #define ASTRIP_RCV B13_MASK 468*75ab5f91Slh155975 #define CMD2_RCV_DROP0 B12_MASK 469*75ab5f91Slh155975 #define EMBA B11_MASK 470*75ab5f91Slh155975 #define DXMT2PD B10_MASK 471*75ab5f91Slh155975 #define LTINTEN B9_MASK 472*75ab5f91Slh155975 #define DXMTFCS B8_MASK 473*75ab5f91Slh155975 474*75ab5f91Slh155975 /* VAL0 */ 475*75ab5f91Slh155975 #define APAD_XMT B6_MASK 476*75ab5f91Slh155975 #define DRTY B5_MASK 477*75ab5f91Slh155975 #define INLOOP B4_MASK 478*75ab5f91Slh155975 #define EXLOOP B3_MASK 479*75ab5f91Slh155975 #define REX_RTRY B2_MASK 480*75ab5f91Slh155975 #define REX_UFLO B1_MASK 481*75ab5f91Slh155975 #define REX_LCOL B0_MASK 482*75ab5f91Slh155975 483*75ab5f91Slh155975 /* CMD3 0x54, 32bit register */ 484*75ab5f91Slh155975 485*75ab5f91Slh155975 /* VAL3 */ 486*75ab5f91Slh155975 #define ASF_INIT_DONE_ALIAS B29_MASK 487*75ab5f91Slh155975 488*75ab5f91Slh155975 /* VAL2 */ 489*75ab5f91Slh155975 #define JUMBO B21_MASK 490*75ab5f91Slh155975 #define VSIZE B20_MASK 491*75ab5f91Slh155975 #define VLONLY B19_MASK 492*75ab5f91Slh155975 #define VL_TAG_DEL B18_MASK 493*75ab5f91Slh155975 494*75ab5f91Slh155975 /* VAL1 */ 495*75ab5f91Slh155975 #define EN_PMGR B14_MASK 496*75ab5f91Slh155975 #define INTLEVEL B13_MASK 497*75ab5f91Slh155975 #define FORCE_FULL_DUPLEX B12_MASK 498*75ab5f91Slh155975 #define FORCE_LINK_STATUS B11_MASK 499*75ab5f91Slh155975 #define APEP B10_MASK 500*75ab5f91Slh155975 #define MPPLBA B9_MASK 501*75ab5f91Slh155975 502*75ab5f91Slh155975 /* VAL0 */ 503*75ab5f91Slh155975 #define RESET_PHY_PULSE B2_MASK 504*75ab5f91Slh155975 #define RESET_PHY B1_MASK 505*75ab5f91Slh155975 #define PHY_RST_POL B0_MASK 506*75ab5f91Slh155975 507*75ab5f91Slh155975 /* CMD7 0x64, 32bit register */ 508*75ab5f91Slh155975 /* VAL0 */ 509*75ab5f91Slh155975 #define PMAT_SAVE_MATCH B4_MASK 510*75ab5f91Slh155975 #define PMAT_MODE B3_MASK 511*75ab5f91Slh155975 #define MPEN_SW B1_MASK 512*75ab5f91Slh155975 #define LCMODE_SW B0_MASK 513*75ab5f91Slh155975 514*75ab5f91Slh155975 /* CTRL0 0x68, 32bit register */ 515*75ab5f91Slh155975 #define PHY_SEL 0x03000000 /* 25:24 */ 516*75ab5f91Slh155975 #define RESET_PHY_WIDTH 0x00FF0000 /* 23:16 */ 517*75ab5f91Slh155975 #define BSWP_REGS B10_MASK 518*75ab5f91Slh155975 #define BSWP_DESC B9_MASK 519*75ab5f91Slh155975 #define BSWP_DATA B8_MASK 520*75ab5f91Slh155975 #define CACHE_ALIGN B4_MASK 521*75ab5f91Slh155975 #define BURST_LIMIT 0x0000000F /* 3:0 */ 522*75ab5f91Slh155975 523*75ab5f91Slh155975 /* CTRL1 0x6C, 32bit register */ 524*75ab5f91Slh155975 #define SLOTMOD_MASK 0x03000000 /* 25:24 */ 525*75ab5f91Slh155975 #define XMTSP_MASK 0x300 /* 17:16 */ 526*75ab5f91Slh155975 #define XMTSP_128 0x200 527*75ab5f91Slh155975 #define XMTSP_64 0x100 528*75ab5f91Slh155975 529*75ab5f91Slh155975 /* CTRL2 0x70, 32bit register */ 530*75ab5f91Slh155975 #define FS_MASK 0x00070000 /* 18:16 */ 531*75ab5f91Slh155975 #define FMDC_MASK 0x00000300 /* 9:8 */ 532*75ab5f91Slh155975 #define XPHYRST B7_MASK 533*75ab5f91Slh155975 #define XPHYANE B6_MASK 534*75ab5f91Slh155975 #define XPHYFD B5_MASK 535*75ab5f91Slh155975 #define XPHYSP_100 B3_MASK /* 4:3, 100 Mbps */ 536*75ab5f91Slh155975 #define APDW_MASK 0x00000007 /* 2:0 */ 537*75ab5f91Slh155975 538*75ab5f91Slh155975 /* RCV_RING_CFG 0x78, 16bit register */ 539*75ab5f91Slh155975 #define RCV_DROP3 B11_MASK 540*75ab5f91Slh155975 #define RCV_DROP2 B10_MASK 541*75ab5f91Slh155975 #define RCV_DROP1 B9_MASK 542*75ab5f91Slh155975 #define RCV_DROP0 B8_MASK 543*75ab5f91Slh155975 #define RCV_RING_DEFAULT 0x0030 /* 5:4 */ 544*75ab5f91Slh155975 #define RCV_RING3_EN B3_MASK 545*75ab5f91Slh155975 #define RCV_RING2_EN B2_MASK 546*75ab5f91Slh155975 #define RCV_RING1_EN B1_MASK 547*75ab5f91Slh155975 #define RCV_RING0_EN B0_MASK 548*75ab5f91Slh155975 549*75ab5f91Slh155975 /* XMT_RING_LIMIT 0x7C, 32bit register */ 550*75ab5f91Slh155975 #define XMT_RING2_LIMIT 0x00FF0000 /* 23:16 */ 551*75ab5f91Slh155975 #define XMT_RING1_LIMIT 0x0000FF00 /* 15:8 */ 552*75ab5f91Slh155975 #define XMT_RING0_LIMIT 0x000000FF /* 7:0 */ 553*75ab5f91Slh155975 554*75ab5f91Slh155975 /* AUTOPOLL0 0x88, 16bit register */ 555*75ab5f91Slh155975 #define AP_REG0_EN B15_MASK 556*75ab5f91Slh155975 #define AP_REG0_ADDR_MASK 0x1F00 /* 12:8 */ 557*75ab5f91Slh155975 #define AP_PHY0_ADDR_MASK 0x001F /* 4:0 */ 558*75ab5f91Slh155975 559*75ab5f91Slh155975 /* AUTOPOLL1 0x8A, 16bit register */ 560*75ab5f91Slh155975 #define AP_REG1_EN B15_MASK 561*75ab5f91Slh155975 #define AP_REG1_ADDR_MASK 0x1F00 /* 12:8 */ 562*75ab5f91Slh155975 #define AP_PRE_SUP1 B6_MASK 563*75ab5f91Slh155975 #define AP_PHY1_DFLT B5_MASK 564*75ab5f91Slh155975 #define AP_PHY1_ADDR_MASK 0x001F /* 4:0 */ 565*75ab5f91Slh155975 566*75ab5f91Slh155975 /* AUTOPOLL2 0x8C, 16bit register */ 567*75ab5f91Slh155975 #define AP_REG2_EN B15_MASK 568*75ab5f91Slh155975 #define AP_REG2_ADDR_MASK 0x1F00 /* 12:8 */ 569*75ab5f91Slh155975 #define AP_PRE_SUP2 B6_MASK 570*75ab5f91Slh155975 #define AP_PHY2_DFLT B5_MASK 571*75ab5f91Slh155975 #define AP_PHY2_ADDR_MASK 0x001F /* 4:0 */ 572*75ab5f91Slh155975 573*75ab5f91Slh155975 /* AUTOPOLL3 0x8E, 16bit register */ 574*75ab5f91Slh155975 #define AP_REG3_EN B15_MASK 575*75ab5f91Slh155975 #define AP_REG3_ADDR_MASK 0x1F00 /* 12:8 */ 576*75ab5f91Slh155975 #define AP_PRE_SUP3 B6_MASK 577*75ab5f91Slh155975 #define AP_PHY3_DFLT B5_MASK 578*75ab5f91Slh155975 #define AP_PHY3_ADDR_MASK 0x001F /* 4:0 */ 579*75ab5f91Slh155975 580*75ab5f91Slh155975 /* AUTOPOLL4 0x90, 16bit register */ 581*75ab5f91Slh155975 #define AP_REG4_EN B15_MASK 582*75ab5f91Slh155975 #define AP_REG4_ADDR_MASK 0x1F00 /* 12:8 */ 583*75ab5f91Slh155975 #define AP_PRE_SUP4 B6_MASK 584*75ab5f91Slh155975 #define AP_PHY4_DFLT B5_MASK 585*75ab5f91Slh155975 #define AP_PHY4_ADDR_MASK 0x001F /* 4:0 */ 586*75ab5f91Slh155975 587*75ab5f91Slh155975 /* AUTOPOLL5 0x92, 16bit register */ 588*75ab5f91Slh155975 #define AP_REG5_EN B15_MASK 589*75ab5f91Slh155975 #define AP_REG5_ADDR_MASK 0x1F00 /* 12:8 */ 590*75ab5f91Slh155975 #define AP_PRE_SUP5 B6_MASK 591*75ab5f91Slh155975 #define AP_PHY5_DFLT B5_MASK 592*75ab5f91Slh155975 #define AP_PHY5_ADDR_MASK 0x001F /* 4:0 */ 593*75ab5f91Slh155975 594*75ab5f91Slh155975 /* AP_VALUE 0x98, 32bit ragister */ 595*75ab5f91Slh155975 #define AP_VAL_ACTIVE B31_MASK 596*75ab5f91Slh155975 #define AP_VAL_RD_CMD B29_MASK 597*75ab5f91Slh155975 #define AP_ADDR 0x00070000 /* 18:16 */ 598*75ab5f91Slh155975 #define AP_VAL 0x0000FFFF /* 15:0 */ 599*75ab5f91Slh155975 600*75ab5f91Slh155975 /* PCS_ANEG 0x9C, 32bit register */ 601*75ab5f91Slh155975 #define SYNC_LOST B10_MASK 602*75ab5f91Slh155975 #define IMATCH B9_MASK 603*75ab5f91Slh155975 #define CMATCH B8_MASK 604*75ab5f91Slh155975 #define PCS_AN_IDLE B1_MASK 605*75ab5f91Slh155975 #define PCS_AN_CFG B0_MASK 606*75ab5f91Slh155975 607*75ab5f91Slh155975 /* DLY_INT_A 0xA8, 32bit register */ 608*75ab5f91Slh155975 #define DLY_INT_A_R3 B31_MASK 609*75ab5f91Slh155975 #define DLY_INT_A_R2 B30_MASK 610*75ab5f91Slh155975 #define DLY_INT_A_R1 B29_MASK 611*75ab5f91Slh155975 #define DLY_INT_A_R0 B28_MASK 612*75ab5f91Slh155975 #define DLY_INT_A_T3 B27_MASK 613*75ab5f91Slh155975 #define DLY_INT_A_T2 B26_MASK 614*75ab5f91Slh155975 #define DLY_INT_A_T1 B25_MASK 615*75ab5f91Slh155975 #define DLY_INT_A_T0 B24_MASK 616*75ab5f91Slh155975 #define EVENT_COUNT_A 0x00FF0000 /* 20:16 */ 617*75ab5f91Slh155975 #define MAX_DELAY_TIME_A 0x000007FF /* 10:0 */ 618*75ab5f91Slh155975 619*75ab5f91Slh155975 /* DLY_INT_B 0xAC, 32bit register */ 620*75ab5f91Slh155975 #define DLY_INT_B_R3 B31_MASK 621*75ab5f91Slh155975 #define DLY_INT_B_R2 B30_MASK 622*75ab5f91Slh155975 #define DLY_INT_B_R1 B29_MASK 623*75ab5f91Slh155975 #define DLY_INT_B_R0 B28_MASK 624*75ab5f91Slh155975 #define DLY_INT_B_T3 B27_MASK 625*75ab5f91Slh155975 #define DLY_INT_B_T2 B26_MASK 626*75ab5f91Slh155975 #define DLY_INT_B_T1 B25_MASK 627*75ab5f91Slh155975 #define DLY_INT_B_T0 B24_MASK 628*75ab5f91Slh155975 #define EVENT_COUNT_B 0x00FF0000 /* 20:16 */ 629*75ab5f91Slh155975 #define MAX_DELAY_TIME_B 0x000007FF /* 10:0 */ 630*75ab5f91Slh155975 631*75ab5f91Slh155975 /* DFC_THRESH2 0xC0, 16bit register */ 632*75ab5f91Slh155975 #define DFC_THRESH2_HIGH 0xFF00 /* 15:8 */ 633*75ab5f91Slh155975 #define DFC_THRESH2_LOW 0x00FF /* 7:0 */ 634*75ab5f91Slh155975 635*75ab5f91Slh155975 /* DFC_THRESH3 0xC2, 16bit register */ 636*75ab5f91Slh155975 #define DFC_THRESH3_HIGH 0xFF00 /* 15:8 */ 637*75ab5f91Slh155975 #define DFC_THRESH3_LOW 0x00FF /* 7:0 */ 638*75ab5f91Slh155975 639*75ab5f91Slh155975 /* DFC_THRESH0 0xC4, 16bit register */ 640*75ab5f91Slh155975 #define DFC_THRESH0_HIGH 0xFF00 /* 15:8 */ 641*75ab5f91Slh155975 #define DFC_THRESH0_LOW 0x00FF /* 7:0 */ 642*75ab5f91Slh155975 643*75ab5f91Slh155975 /* DFC_THRESH1 0xC6, 16bit register */ 644*75ab5f91Slh155975 #define DFC_THRESH1_HIGH 0xFF00 /* 15:8 */ 645*75ab5f91Slh155975 #define DFC_THRESH1_LOW 0x00FF /* 7:0 */ 646*75ab5f91Slh155975 647*75ab5f91Slh155975 /* FLOW_CONTROL 0xC8, 32bit register */ 648*75ab5f91Slh155975 #define PAUSE_LEN_CHG B30_MASK 649*75ab5f91Slh155975 #define FFC_EN B28_MASK 650*75ab5f91Slh155975 #define DFC_RING3_EN B27_MASK 651*75ab5f91Slh155975 #define DFC_RING2_EN B26_MASK 652*75ab5f91Slh155975 #define DFC_RING1_EN B25_MASK 653*75ab5f91Slh155975 #define DFC_RING0_EN B24_MASK 654*75ab5f91Slh155975 #define FIXP_CONGEST B21_MASK 655*75ab5f91Slh155975 #define NAPA B20_MASK 656*75ab5f91Slh155975 #define NPA B19_MASK 657*75ab5f91Slh155975 #define FIXP B18_MASK 658*75ab5f91Slh155975 #define FCPEN B17_MASK 659*75ab5f91Slh155975 #define FCCMD B16_MASK 660*75ab5f91Slh155975 #define PAUSE_LEN 0x0000FFFF /* 15:0 */ 661*75ab5f91Slh155975 662*75ab5f91Slh155975 /* FFC THRESH 0xCC, 32bit register */ 663*75ab5f91Slh155975 #define FFC_HIGH 0xFFFF0000 /* 31:16 */ 664*75ab5f91Slh155975 #define FFC_LOW 0x0000FFFF /* 15:0 */ 665*75ab5f91Slh155975 666*75ab5f91Slh155975 /* PHY_ACCESS 0xD0, 32bit register */ 667*75ab5f91Slh155975 #define PHY_CMD_ACTIVE B31_MASK 668*75ab5f91Slh155975 #define PHY_WR_CMD B30_MASK 669*75ab5f91Slh155975 #define PHY_RD_CMD B29_MASK 670*75ab5f91Slh155975 #define PHY_RD_ERR B28_MASK 671*75ab5f91Slh155975 #define PHY_PRE_SUP B27_MASK 672*75ab5f91Slh155975 #define PHY_ADDR 0x03E00000 /* 25:21 */ 673*75ab5f91Slh155975 #define PHY_REG_ADDR 0x001F0000 /* 20:16 */ 674*75ab5f91Slh155975 #define PHY_DATA 0x0000FFFF /* 15:0 */ 675*75ab5f91Slh155975 #define PHY_ADDR_SHIFT 21 676*75ab5f91Slh155975 #define PHY_REG_ADDR_SHIFT 16 677*75ab5f91Slh155975 678*75ab5f91Slh155975 #define PHY_MAX_RETRY 30 679*75ab5f91Slh155975 680*75ab5f91Slh155975 681*75ab5f91Slh155975 /* EEPROM_ACC 0x17C, 16bit register */ 682*75ab5f91Slh155975 #define PVALID B15_MASK 683*75ab5f91Slh155975 #define PREAD B14_MASK 684*75ab5f91Slh155975 #define EEDET B13_MASK 685*75ab5f91Slh155975 #define EEN B4_MASK 686*75ab5f91Slh155975 #define ECS B2_MASK 687*75ab5f91Slh155975 #define EESK B1_MASK 688*75ab5f91Slh155975 #define EDI_EDO B0_MASK 689*75ab5f91Slh155975 690*75ab5f91Slh155975 /* PMAT0 0x190, 32bit register */ 691*75ab5f91Slh155975 #define PMR_ACTIVE B31_MASK 692*75ab5f91Slh155975 #define PMR_WR_CMD B30_MASK 693*75ab5f91Slh155975 #define PMR_RD_CMD B29_MASK 694*75ab5f91Slh155975 #define PMR_BANK B28_MASK 695*75ab5f91Slh155975 #define PMR_ADDR 0x007F0000 /* 22:16 */ 696*75ab5f91Slh155975 #define PMR_B4 0x000000FF /* 15:0 */ 697*75ab5f91Slh155975 698*75ab5f91Slh155975 /* PMAT1 0x194, 32bit register */ 699*75ab5f91Slh155975 #define PMR_B3 0xFF000000 /* 31:24 */ 700*75ab5f91Slh155975 #define PMR_B2 0x00FF0000 /* 23:16 */ 701*75ab5f91Slh155975 #define PMR_B1 0x0000FF00 /* 15:8 */ 702*75ab5f91Slh155975 #define PMR_B0 0x000000FF /* 7:0 */ 703*75ab5f91Slh155975 704*75ab5f91Slh155975 /* CAMDATA 0x198, 16bit register */ 705*75ab5f91Slh155975 #define CAM_DATA_MASK 0x000000FFFFFFFFFFFF 706*75ab5f91Slh155975 707*75ab5f91Slh155975 /* CAM_ADDR 0x1A0, 16bit register */ 708*75ab5f91Slh155975 #define CAM_CMD_ACTIVE B15_MASK 709*75ab5f91Slh155975 #define CAM_WR_CMD B14_MASK 710*75ab5f91Slh155975 #define CAM_RD_CMD B13_MASK 711*75ab5f91Slh155975 #define CAM_CLEAR B12_MASK 712*75ab5f91Slh155975 #define CAM_ADDRESS 0x001F 713*75ab5f91Slh155975 714*75ab5f91Slh155975 /* INT0 0x38, 32bit register */ 715*75ab5f91Slh155975 #define INTR B31_MASK 716*75ab5f91Slh155975 #define LCINT B27_MASK 717*75ab5f91Slh155975 #define TINT0 B8_MASK 718*75ab5f91Slh155975 #define STINT B4_MASK 719*75ab5f91Slh155975 #define RINT0 B0_MASK 720*75ab5f91Slh155975 721*75ab5f91Slh155975 /* TEST0 0x1A8, 32bit register */ 722*75ab5f91Slh155975 723*75ab5f91Slh155975 /* VAL1 */ 724*75ab5f91Slh155975 #define MFSM_RESET B10_MASK 725*75ab5f91Slh155975 #define BFD_SCALE_DOWN B9_MASK 726*75ab5f91Slh155975 727*75ab5f91Slh155975 /* VAL0 */ 728*75ab5f91Slh155975 #define LEDCNTTST B5_MASK 729*75ab5f91Slh155975 #define RTYTST_RANGEN B2_MASK 730*75ab5f91Slh155975 #define RTYTST_SLOT B1_MASK 731*75ab5f91Slh155975 #define SERRLEVEL B0_MASK 732*75ab5f91Slh155975 733*75ab5f91Slh155975 #define CABLE_CHK_TIME 100 734*75ab5f91Slh155975 735*75ab5f91Slh155975 #define PCI_IOMAP_BASE_REG 0x00 736*75ab5f91Slh155975 #define PCI_MEM_BASE_REG 0x10 737*75ab5f91Slh155975 738*75ab5f91Slh155975 #define XPHYFD B5_MASK 739*75ab5f91Slh155975 #define XPHYSP B3_MASK /* 4:3 */ 740*75ab5f91Slh155975 741*75ab5f91Slh155975 #define TX_RATE 0x1 742*75ab5f91Slh155975 #define RX_RATE 0x2 743*75ab5f91Slh155975 #define RX_BYTES 0xb 744*75ab5f91Slh155975 #define TX_BYTES 0xc 745*75ab5f91Slh155975 746*75ab5f91Slh155975 #define LOW_COALESC 1 747*75ab5f91Slh155975 #define MEDIUM_COALESC 2 748*75ab5f91Slh155975 #define HIGH_COALESC 3 749*75ab5f91Slh155975 #define NO_COALESC 4 750*75ab5f91Slh155975 751*75ab5f91Slh155975 #define CLIENT 0x1 752*75ab5f91Slh155975 #define SERVER 0x2 753*75ab5f91Slh155975 #define DISABLE 0x3 754*75ab5f91Slh155975 #define PCI_OPT 0x4 755*75ab5f91Slh155975 756*75ab5f91Slh155975 #define MULTICAST_BITMAP_ARRAY_SIZE 64 757*75ab5f91Slh155975 758*75ab5f91Slh155975 #define PHY_AUTO_NEGOTIATION 0 759*75ab5f91Slh155975 #define PHY_FORCE_HD_100 1 /* HD: Half Duplex */ 760*75ab5f91Slh155975 #define PHY_FORCE_FD_100 2 /* FD: Full Duplex */ 761*75ab5f91Slh155975 #define PHY_FORCE_HD_10 3 762*75ab5f91Slh155975 #define PHY_FORCE_FD_10 4 763*75ab5f91Slh155975 764*75ab5f91Slh155975 struct tx_desc { 765*75ab5f91Slh155975 unsigned int Tx_BCNT :16; /* Buffer Byte Count */ 766*75ab5f91Slh155975 unsigned int Tx_RES4 :6; /* RESVERD 6 bits */ 767*75ab5f91Slh155975 /* 768*75ab5f91Slh155975 * This bit causes the transmission of the corresponding frame to be 769*75ab5f91Slh155975 * aborted. If the transmitter has not started sending the frame at the 770*75ab5f91Slh155975 * time that the descriptor 771*75ab5f91Slh155975 */ 772*75ab5f91Slh155975 unsigned int KILL :1; 773*75ab5f91Slh155975 unsigned int Tx_RES3 :1; /* RESVERD 1 bits */ 774*75ab5f91Slh155975 /* End Of packet to indicates the last Buffer */ 775*75ab5f91Slh155975 unsigned int Tx_EOP :1; 776*75ab5f91Slh155975 unsigned int Tx_SOP :1; /* Defer to Transmit */ 777*75ab5f91Slh155975 unsigned int Tx_RES2 :2; 778*75ab5f91Slh155975 unsigned int Tx_LTINT :1; /* Start of packet for the Buffer */ 779*75ab5f91Slh155975 /* 780*75ab5f91Slh155975 * ADD_FCS dynamically controls the generation of FCS on a frame by 781*75ab5f91Slh155975 * frame basis. 782*75ab5f91Slh155975 */ 783*75ab5f91Slh155975 unsigned int Tx_ADD_FCS :1; 784*75ab5f91Slh155975 unsigned int Tx_RES1 :1; /* Reserved Location */ 785*75ab5f91Slh155975 unsigned int Tx_OWN :1; /* Own Bit for the Transmit */ 786*75ab5f91Slh155975 unsigned int TCI :16; /* VLAN Tag Control Command. */ 787*75ab5f91Slh155975 unsigned int TCC :2; /* Tag Control Information. */ 788*75ab5f91Slh155975 unsigned int Tx_RES0 :14; /* Resvered Location */ 789*75ab5f91Slh155975 /* 790*75ab5f91Slh155975 * TBADR[31:0] Transmit Buffer Address. This field contains the address 791*75ab5f91Slh155975 * of the Transmit buffer that is associated with this descriptor 792*75ab5f91Slh155975 */ 793*75ab5f91Slh155975 unsigned int Tx_Base_Addr :32; 794*75ab5f91Slh155975 unsigned int Tx_USPACE :32; /* User Space */ 795*75ab5f91Slh155975 }; 796*75ab5f91Slh155975 797*75ab5f91Slh155975 /* Receive Descriptor For the L7 */ 798*75ab5f91Slh155975 struct rx_desc { 799*75ab5f91Slh155975 800*75ab5f91Slh155975 /* User Reserved amar - Its just reservered. */ 801*75ab5f91Slh155975 unsigned int Rx_USPACE :32; 802*75ab5f91Slh155975 /* 803*75ab5f91Slh155975 * Message Byte Count is the number of bytes of the received message 804*75ab5f91Slh155975 * written 805*75ab5f91Slh155975 */ 806*75ab5f91Slh155975 unsigned int Rx_MCNT :16; 807*75ab5f91Slh155975 unsigned int TCI :16; 808*75ab5f91Slh155975 /* 809*75ab5f91Slh155975 * Buffer Byte Count is the length of the buffer pointed to by this 810*75ab5f91Slh155975 * descriptor 811*75ab5f91Slh155975 */ 812*75ab5f91Slh155975 unsigned int Rx_BCNT :16; 813*75ab5f91Slh155975 unsigned int Rx_RES1 :2; /* Reserved Location */ 814*75ab5f91Slh155975 /* 815*75ab5f91Slh155975 * VLAN Tag Type. Indicates what type of VLAN tag, if any, is included 816*75ab5f91Slh155975 * in the received 817*75ab5f91Slh155975 */ 818*75ab5f91Slh155975 unsigned int TT :2; 819*75ab5f91Slh155975 /* 820*75ab5f91Slh155975 * Broadcast Address Match is set by the Am79C976 controller when it 821*75ab5f91Slh155975 * accepts the reveice buffer 822*75ab5f91Slh155975 */ 823*75ab5f91Slh155975 unsigned int Rx_BAM :1; 824*75ab5f91Slh155975 /* 825*75ab5f91Slh155975 * Logical Address Filter Match is set by the Am79C976 controller 826*75ab5f91Slh155975 * to the Receive Buffer 827*75ab5f91Slh155975 */ 828*75ab5f91Slh155975 unsigned int Rx_LAFM :1; 829*75ab5f91Slh155975 /* Physical Address Match is set by the Am79C976 controller */ 830*75ab5f91Slh155975 unsigned int Rx_PAM :1; 831*75ab5f91Slh155975 unsigned int Rx_RES0 :1; /* Resvered Location */ 832*75ab5f91Slh155975 /* End Of packet to indicates the last Buffer */ 833*75ab5f91Slh155975 unsigned int Rx_EOP :1; 834*75ab5f91Slh155975 unsigned int Rx_SOP :1; /* Start of packet for the Buffer */ 835*75ab5f91Slh155975 unsigned int Rx_BUFF :1; /* Reserved location */ 836*75ab5f91Slh155975 /* 837*75ab5f91Slh155975 * CRC indicates that the receiver has detected a CRC (FCS) error on the 838*75ab5f91Slh155975 * incoming frame. 839*75ab5f91Slh155975 */ 840*75ab5f91Slh155975 unsigned int Rx_CRC :1; 841*75ab5f91Slh155975 /* 842*75ab5f91Slh155975 * Overflow error indicates that the receiver has lost all or part of 843*75ab5f91Slh155975 * the incoming frame. 844*75ab5f91Slh155975 */ 845*75ab5f91Slh155975 unsigned int Rx_OFLO :1; 846*75ab5f91Slh155975 unsigned int Rx_FRAM :1; /* Framing Error */ 847*75ab5f91Slh155975 unsigned int Rx_ERR :1; /* Error is Set By the Controller */ 848*75ab5f91Slh155975 unsigned int Rx_OWN :1; /* Own Bit of Descriptor */ 849*75ab5f91Slh155975 /* 850*75ab5f91Slh155975 * RBADR[31:0] Receive Buffer Address. This field contains the address 851*75ab5f91Slh155975 * of the receive buffer that is associated with this descriptor. 852*75ab5f91Slh155975 */ 853*75ab5f91Slh155975 unsigned int Rx_Base_Addr:32; 854*75ab5f91Slh155975 }; 855*75ab5f91Slh155975 856*75ab5f91Slh155975 857*75ab5f91Slh155975 /* Initialization Block (SSIZE32 = 1) */ 858*75ab5f91Slh155975 struct init_block { 859*75ab5f91Slh155975 unsigned int MODE :16; /* Mode */ 860*75ab5f91Slh155975 unsigned int RES1 :4; /* Reserved Location */ 861*75ab5f91Slh155975 /* Receive software structure is defined for 16 bit */ 862*75ab5f91Slh155975 unsigned int RLEN :4; 863*75ab5f91Slh155975 unsigned int RES2 :4; /* Reserved bits */ 864*75ab5f91Slh155975 /* Transmit software structure is defined for the 16 bit */ 865*75ab5f91Slh155975 unsigned int TLEN :4; 866*75ab5f91Slh155975 unsigned int PADDR0 :8; 867*75ab5f91Slh155975 unsigned int PADDR1 :8; 868*75ab5f91Slh155975 unsigned int PADDR2 :8; 869*75ab5f91Slh155975 unsigned int PADDR3 :8; 870*75ab5f91Slh155975 unsigned int PADDR4 :8; 871*75ab5f91Slh155975 unsigned int PADDR5 :8; 872*75ab5f91Slh155975 unsigned int RES3 :16; 873*75ab5f91Slh155975 unsigned char LADRF[8]; 874*75ab5f91Slh155975 /* RDRA indicate where the receive descriptor ring begins */ 875*75ab5f91Slh155975 unsigned int RDRA :32; 876*75ab5f91Slh155975 /* TDRA indicate where the transmit descriptor ring begins */ 877*75ab5f91Slh155975 unsigned int TDRA :32; 878*75ab5f91Slh155975 }; 879*75ab5f91Slh155975 880*75ab5f91Slh155975 /* MDL Physical and Normal Structure */ 881*75ab5f91Slh155975 struct mdl { 882*75ab5f91Slh155975 ULONG Io_Address; 883*75ab5f91Slh155975 ULONG Mem_Address; 884*75ab5f91Slh155975 885*75ab5f91Slh155975 volatile int CSR; 886*75ab5f91Slh155975 volatile int CardStatus; 887*75ab5f91Slh155975 888*75ab5f91Slh155975 /* PMR (Pattern Match RAM) */ 889*75ab5f91Slh155975 /* 890*75ab5f91Slh155975 * An array to store the indexes of each of the patterns in 891*75ab5f91Slh155975 * Pattern List. 892*75ab5f91Slh155975 */ 893*75ab5f91Slh155975 unsigned int *PMR_PtrList; 894*75ab5f91Slh155975 /* An array of pattern controls and pattern data bytes */ 895*75ab5f91Slh155975 unsigned char *PatternList; 896*75ab5f91Slh155975 unsigned int *PatternLength; 897*75ab5f91Slh155975 int EnableMulticast; 898*75ab5f91Slh155975 /* The begining of the free area in the PatternList array */ 899*75ab5f91Slh155975 unsigned short PatternList_FreeIndex; 900*75ab5f91Slh155975 /* The total number of patterns present in the PMR */ 901*75ab5f91Slh155975 unsigned short TotalPatterns; 902*75ab5f91Slh155975 unsigned short PatternEnableBit; 903*75ab5f91Slh155975 904*75ab5f91Slh155975 unsigned char Mac[6]; 905*75ab5f91Slh155975 unsigned char TEMP_MAC[6]; 906*75ab5f91Slh155975 unsigned int FLAGS; 907*75ab5f91Slh155975 unsigned char TempLADRF[8]; 908*75ab5f91Slh155975 909*75ab5f91Slh155975 ULONG Speed; 910*75ab5f91Slh155975 ULONG FullDuplex; 911*75ab5f91Slh155975 912*75ab5f91Slh155975 struct init_block *init_blk; 913*75ab5f91Slh155975 914*75ab5f91Slh155975 int tmpPtrArray[8]; 915*75ab5f91Slh155975 916*75ab5f91Slh155975 int MulticastBitMapArray[MULTICAST_BITMAP_ARRAY_SIZE]; 917*75ab5f91Slh155975 int External_Phy; 918*75ab5f91Slh155975 unsigned int phy_id; 919*75ab5f91Slh155975 920*75ab5f91Slh155975 /* For interrupt delay */ 921*75ab5f91Slh155975 /* Unit is 10 us. Its value must < 0x800 (2^11) */ 922*75ab5f91Slh155975 unsigned int rx_intrcoalesc_time; 923*75ab5f91Slh155975 /* Its value must < 32 (2^5) */ 924*75ab5f91Slh155975 unsigned int rx_intrcoalesc_events; 925*75ab5f91Slh155975 unsigned int tx_intrcoalesc_time; 926*75ab5f91Slh155975 unsigned int tx_intrcoalesc_events; 927*75ab5f91Slh155975 int IntrCoalescFlag; 928*75ab5f91Slh155975 929*75ab5f91Slh155975 int RxRingLenBits; 930*75ab5f91Slh155975 int TxRingLenBits; 931*75ab5f91Slh155975 int TxRingSize; 932*75ab5f91Slh155975 int RxRingSize; 933*75ab5f91Slh155975 934*75ab5f91Slh155975 int IpgValue; 935*75ab5f91Slh155975 }; 936*75ab5f91Slh155975 937*75ab5f91Slh155975 struct Rx_Buf_Desc { 938*75ab5f91Slh155975 struct rx_desc *descriptor; 939*75ab5f91Slh155975 long *USpaceMap; 940*75ab5f91Slh155975 }; 941*75ab5f91Slh155975 942*75ab5f91Slh155975 struct nonphysical 943*75ab5f91Slh155975 { 944*75ab5f91Slh155975 /* Tx descriptors queue */ 945*75ab5f91Slh155975 struct tx_desc *TxDescQRead; /* The next ring entry to be freed */ 946*75ab5f91Slh155975 struct tx_desc *TxDescQWrite; /* The next free ring entry */ 947*75ab5f91Slh155975 struct tx_desc *TxDescQStart; /* The start of the ring entries */ 948*75ab5f91Slh155975 struct tx_desc *TxDescQEnd; /* The end of the ring entries */ 949*75ab5f91Slh155975 950*75ab5f91Slh155975 /* struct Rx_Buf_Desc * queue */ 951*75ab5f91Slh155975 struct Rx_Buf_Desc *RxBufDescQRead; 952*75ab5f91Slh155975 struct Rx_Buf_Desc *RxBufDescQStart; 953*75ab5f91Slh155975 struct Rx_Buf_Desc *RxBufDescQEnd; 954*75ab5f91Slh155975 955*75ab5f91Slh155975 }; 956*75ab5f91Slh155975 957*75ab5f91Slh155975 struct mil 958*75ab5f91Slh155975 { 959*75ab5f91Slh155975 /* 960*75ab5f91Slh155975 * 1) For memory allocation and free 961*75ab5f91Slh155975 */ 962*75ab5f91Slh155975 963*75ab5f91Slh155975 /* 964*75ab5f91Slh155975 * Tx_desc: address of all tx descriptors block 965*75ab5f91Slh155975 * Tx_desc_pa: physical address of Tx_desc 966*75ab5f91Slh155975 */ 967*75ab5f91Slh155975 struct tx_desc *Tx_desc; 968*75ab5f91Slh155975 unsigned int Tx_desc_pa; 969*75ab5f91Slh155975 /* Original address, because Tx_desc needs 16 bytes alignment */ 970*75ab5f91Slh155975 ULONG Tx_desc_original; 971*75ab5f91Slh155975 972*75ab5f91Slh155975 struct rx_desc *Rx_desc; 973*75ab5f91Slh155975 unsigned int Rx_desc_pa; 974*75ab5f91Slh155975 /* Original address, because Rx_desc needs 16 bytes alignment */ 975*75ab5f91Slh155975 ULONG Rx_desc_original; 976*75ab5f91Slh155975 977*75ab5f91Slh155975 long *USpaceMapArray; /* Queue of struct rxBufInfo * */ 978*75ab5f91Slh155975 979*75ab5f91Slh155975 /* 980*75ab5f91Slh155975 * 2) For descriptor queue/buffer queue operation 981*75ab5f91Slh155975 */ 982*75ab5f91Slh155975 struct nonphysical *pNonphysical; 983*75ab5f91Slh155975 984*75ab5f91Slh155975 /* 985*75ab5f91Slh155975 * 3) Parameters 986*75ab5f91Slh155975 */ 987*75ab5f91Slh155975 int RxRingSize; 988*75ab5f91Slh155975 int TxRingSize; 989*75ab5f91Slh155975 int RxBufSize; 990*75ab5f91Slh155975 991*75ab5f91Slh155975 /* 992*75ab5f91Slh155975 * 4) Other 993*75ab5f91Slh155975 */ 994*75ab5f91Slh155975 int tx_reschedule; 995*75ab5f91Slh155975 char *name; 996*75ab5f91Slh155975 }; 997*75ab5f91Slh155975 998*75ab5f91Slh155975 struct LayerPointers 999*75ab5f91Slh155975 { 1000*75ab5f91Slh155975 struct odl *pOdl; 1001*75ab5f91Slh155975 struct mil *pMil; 1002*75ab5f91Slh155975 struct mdl *pMdl; 1003*75ab5f91Slh155975 1004*75ab5f91Slh155975 int instance; 1005*75ab5f91Slh155975 int attach_progress; 1006*75ab5f91Slh155975 int run; /* B_TRUE on plumb; B_FALSE on unplumb */ 1007*75ab5f91Slh155975 }; 1008*75ab5f91Slh155975 1009*75ab5f91Slh155975 /* MIL Function Prototypes. */ 1010*75ab5f91Slh155975 1011*75ab5f91Slh155975 /* 1012*75ab5f91Slh155975 * Initialisation of MIL data structures and External Interface Function 1013*75ab5f91Slh155975 * Pointers. 1014*75ab5f91Slh155975 */ 1015*75ab5f91Slh155975 void milInitGlbds(struct LayerPointers *); 1016*75ab5f91Slh155975 1017*75ab5f91Slh155975 void milInitRxQ(struct LayerPointers *); 1018*75ab5f91Slh155975 1019*75ab5f91Slh155975 void milResetTxQ(struct LayerPointers *); 1020*75ab5f91Slh155975 1021*75ab5f91Slh155975 void milFreeResources(struct LayerPointers *, ULONG *); 1022*75ab5f91Slh155975 1023*75ab5f91Slh155975 void milRequestResources(ULONG *); 1024*75ab5f91Slh155975 void milSetResources(struct LayerPointers *, ULONG *); 1025*75ab5f91Slh155975 1026*75ab5f91Slh155975 /* Open Functions. */ 1027*75ab5f91Slh155975 void mdlOpen(struct LayerPointers *); 1028*75ab5f91Slh155975 1029*75ab5f91Slh155975 void mdlHWReset(struct LayerPointers *); 1030*75ab5f91Slh155975 1031*75ab5f91Slh155975 /* Multicast */ 1032*75ab5f91Slh155975 void mdlDeleteMulticastAddress(struct LayerPointers *, UCHAR *); 1033*75ab5f91Slh155975 void mdlAddMulticastAddress(struct LayerPointers *, UCHAR *); 1034*75ab5f91Slh155975 1035*75ab5f91Slh155975 /* Transmit/Receive Interface provided by MDL */ 1036*75ab5f91Slh155975 void mdlTransmit(struct LayerPointers *); 1037*75ab5f91Slh155975 void mdlReceive(struct LayerPointers *); 1038*75ab5f91Slh155975 1039*75ab5f91Slh155975 unsigned int mdlReadMib(struct LayerPointers *, char); 1040*75ab5f91Slh155975 1041*75ab5f91Slh155975 /* Read Link Status */ 1042*75ab5f91Slh155975 int mdlReadLink(struct LayerPointers *); 1043*75ab5f91Slh155975 1044*75ab5f91Slh155975 /* Interrupt Handling */ 1045*75ab5f91Slh155975 unsigned int mdlReadInterrupt(struct LayerPointers *); 1046*75ab5f91Slh155975 1047*75ab5f91Slh155975 void mdlEnableInterrupt(struct LayerPointers *); 1048*75ab5f91Slh155975 void mdlDisableInterrupt(struct LayerPointers *); 1049*75ab5f91Slh155975 1050*75ab5f91Slh155975 void mdlGetActiveMediaInfo(struct LayerPointers *); 1051*75ab5f91Slh155975 1052*75ab5f91Slh155975 void mdlStartChip(struct LayerPointers *); 1053*75ab5f91Slh155975 void mdlStopChip(struct LayerPointers *); 1054*75ab5f91Slh155975 1055*75ab5f91Slh155975 void mdlGetMacAddress(struct LayerPointers *, unsigned char *); 1056*75ab5f91Slh155975 void mdlSetMacAddress(struct LayerPointers *, unsigned char *); 1057*75ab5f91Slh155975 1058*75ab5f91Slh155975 void mdlAddMulticastAddresses(struct LayerPointers *, int, unsigned char *); 1059*75ab5f91Slh155975 1060*75ab5f91Slh155975 void mdlSetPromiscuous(struct LayerPointers *); 1061*75ab5f91Slh155975 void mdlDisablePromiscuous(struct LayerPointers *); 1062*75ab5f91Slh155975 1063*75ab5f91Slh155975 void mdlSendPause(struct LayerPointers *); 1064*75ab5f91Slh155975 1065*75ab5f91Slh155975 void SetIntrCoalesc(struct LayerPointers *, boolean_t); 1066*75ab5f91Slh155975 void mdlPHYAutoNegotiation(struct LayerPointers *, unsigned int); 1067*75ab5f91Slh155975 void mdlRxFastSuspend(struct LayerPointers *); 1068*75ab5f91Slh155975 void mdlRxFastSuspendClear(struct LayerPointers *); 1069*75ab5f91Slh155975 1070*75ab5f91Slh155975 /* Externs */ 1071*75ab5f91Slh155975 1072*75ab5f91Slh155975 /* ODL functions */ 1073*75ab5f91Slh155975 extern void amd8111s_reset(struct LayerPointers *); 1074*75ab5f91Slh155975 extern unsigned char READ_REG8(struct LayerPointers *, long); 1075*75ab5f91Slh155975 extern void WRITE_REG8(struct LayerPointers *, long, int); 1076*75ab5f91Slh155975 extern int READ_REG16(struct LayerPointers *, long); 1077*75ab5f91Slh155975 extern void WRITE_REG16(struct LayerPointers *, long, int); 1078*75ab5f91Slh155975 extern long READ_REG32(struct LayerPointers *, long); 1079*75ab5f91Slh155975 extern void WRITE_REG32(struct LayerPointers *, long, int); 1080*75ab5f91Slh155975 extern void WRITE_REG64(struct LayerPointers *, long, char *); 1081*75ab5f91Slh155975 1082*75ab5f91Slh155975 #endif /* AMD8111S_HW_H */ 1083