1*dd52495fSSaurabh Misra /* 2*dd52495fSSaurabh Misra * Copyright (c) 2003 Stuart Walsh 3*dd52495fSSaurabh Misra * 4*dd52495fSSaurabh Misra * Redistribution and use in source and binary forms, with or without 5*dd52495fSSaurabh Misra * modification, are permitted provided that the following conditions 6*dd52495fSSaurabh Misra * are met: 7*dd52495fSSaurabh Misra * 1. Redistributions of source code must retain the above copyright 8*dd52495fSSaurabh Misra * notice, this list of conditions and the following disclaimer. 9*dd52495fSSaurabh Misra * 2. Redistributions in binary form must reproduce the above copyright 10*dd52495fSSaurabh Misra * notice, this list of conditions and the following disclaimer in the 11*dd52495fSSaurabh Misra * documentation and/or other materials provided with the distribution. 12*dd52495fSSaurabh Misra * 13*dd52495fSSaurabh Misra * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS 'AS IS' AND 14*dd52495fSSaurabh Misra * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15*dd52495fSSaurabh Misra * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16*dd52495fSSaurabh Misra * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17*dd52495fSSaurabh Misra * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18*dd52495fSSaurabh Misra * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19*dd52495fSSaurabh Misra * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20*dd52495fSSaurabh Misra * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21*dd52495fSSaurabh Misra * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22*dd52495fSSaurabh Misra * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23*dd52495fSSaurabh Misra * SUCH DAMAGE. 24*dd52495fSSaurabh Misra */ 25*dd52495fSSaurabh Misra /* 26*dd52495fSSaurabh Misra * $FreeBSD: src/sys/dev/bfe/if_bfereg.h,v 1.10.2.4.2.1 2008/11/25 02:59:29 27*dd52495fSSaurabh Misra * kensmith Exp $ 28*dd52495fSSaurabh Misra */ 29*dd52495fSSaurabh Misra 30*dd52495fSSaurabh Misra #ifndef _BFE_HW_H 31*dd52495fSSaurabh Misra #define _BFE_HW_H 32*dd52495fSSaurabh Misra 33*dd52495fSSaurabh Misra /* PCI registers */ 34*dd52495fSSaurabh Misra #define BFE_PCI_MEMLO 0x10 35*dd52495fSSaurabh Misra #define BFE_PCI_MEMHIGH 0x14 36*dd52495fSSaurabh Misra #define BFE_PCI_INTLINE 0x3C 37*dd52495fSSaurabh Misra 38*dd52495fSSaurabh Misra /* Register layout. */ 39*dd52495fSSaurabh Misra #define BFE_DEVCTRL 0x00000000 /* Device Control */ 40*dd52495fSSaurabh Misra #define BFE_PFE 0x00000080 /* Pattern Filtering Enable */ 41*dd52495fSSaurabh Misra #define BFE_IPP 0x00000400 /* Internal EPHY Present */ 42*dd52495fSSaurabh Misra #define BFE_EPR 0x00008000 /* EPHY Reset */ 43*dd52495fSSaurabh Misra #define BFE_PME 0x00001000 /* PHY Mode Enable */ 44*dd52495fSSaurabh Misra #define BFE_PMCE 0x00002000 /* PHY Mode Clocks Enable */ 45*dd52495fSSaurabh Misra #define BFE_PADDR 0x0007c000 /* PHY Address */ 46*dd52495fSSaurabh Misra #define BFE_PADDR_SHIFT 18 47*dd52495fSSaurabh Misra 48*dd52495fSSaurabh Misra #define BFE_BIST_STAT 0x0000000C /* Built-In Self-Test Status */ 49*dd52495fSSaurabh Misra #define BFE_WKUP_LEN 0x00000010 /* Wakeup Length */ 50*dd52495fSSaurabh Misra 51*dd52495fSSaurabh Misra #define BFE_INTR_STAT 0x00000020 /* Interrupt Status */ 52*dd52495fSSaurabh Misra #define BFE_ISTAT_PME 0x00000040 /* Power Management Event */ 53*dd52495fSSaurabh Misra #define BFE_ISTAT_TO 0x00000080 /* General Purpose Timeout */ 54*dd52495fSSaurabh Misra #define BFE_ISTAT_DSCE 0x00000400 /* Descriptor Error */ 55*dd52495fSSaurabh Misra #define BFE_ISTAT_DATAE 0x00000800 /* Data Error */ 56*dd52495fSSaurabh Misra #define BFE_ISTAT_DPE 0x00001000 /* Descr. Protocol Error */ 57*dd52495fSSaurabh Misra #define BFE_ISTAT_RDU 0x00002000 /* Receive Descr. Underflow */ 58*dd52495fSSaurabh Misra #define BFE_ISTAT_RFO 0x00004000 /* Receive FIFO Overflow */ 59*dd52495fSSaurabh Misra #define BFE_ISTAT_TFU 0x00008000 /* Transmit FIFO Underflow */ 60*dd52495fSSaurabh Misra #define BFE_ISTAT_RX 0x00010000 /* RX Interrupt */ 61*dd52495fSSaurabh Misra #define BFE_ISTAT_TX 0x01000000 /* TX Interrupt */ 62*dd52495fSSaurabh Misra #define BFE_ISTAT_EMAC 0x04000000 /* EMAC Interrupt */ 63*dd52495fSSaurabh Misra #define BFE_ISTAT_MII_WRITE 0x08000000 /* MII Write Interrupt */ 64*dd52495fSSaurabh Misra #define BFE_ISTAT_MII_READ 0x10000000 /* MII Read Interrupt */ 65*dd52495fSSaurabh Misra #define BFE_ISTAT_ERRORS (BFE_ISTAT_DSCE | BFE_ISTAT_DATAE | \ 66*dd52495fSSaurabh Misra BFE_ISTAT_DPE | BFE_ISTAT_RDU | BFE_ISTAT_RFO | BFE_ISTAT_TFU) 67*dd52495fSSaurabh Misra 68*dd52495fSSaurabh Misra #define BFE_INTR_MASK 0x00000024 /* Interrupt Mask */ 69*dd52495fSSaurabh Misra #define BFE_IMASK_DEF (BFE_ISTAT_ERRORS | BFE_ISTAT_TO | \ 70*dd52495fSSaurabh Misra BFE_ISTAT_RX | BFE_ISTAT_TX) 71*dd52495fSSaurabh Misra 72*dd52495fSSaurabh Misra #define BFE_MAC_CTRL 0x000000A8 /* MAC Control */ 73*dd52495fSSaurabh Misra #define BFE_CTRL_CRC32_ENAB 0x00000001 /* CRC32 Generation Enable */ 74*dd52495fSSaurabh Misra #define BFE_CTRL_PDOWN 0x00000004 /* Onchip EPHY Powerdown */ 75*dd52495fSSaurabh Misra #define BFE_CTRL_EDET 0x00000008 /* Onchip EPHY Energy Detected */ 76*dd52495fSSaurabh Misra #define BFE_CTRL_LED 0x000000e0 /* Onchip EPHY LED Control */ 77*dd52495fSSaurabh Misra #define BFE_CTRL_LED_SHIFT 5 78*dd52495fSSaurabh Misra 79*dd52495fSSaurabh Misra #define BFE_MAC_FLOW 0x000000AC /* MAC Flow Control */ 80*dd52495fSSaurabh Misra #define BFE_FLOW_RX_HIWAT 0x000000ff /* Onchip FIFO HI Water Mark */ 81*dd52495fSSaurabh Misra #define BFE_FLOW_PAUSE_ENAB 0x00008000 /* Enable Pause Frame Generation */ 82*dd52495fSSaurabh Misra 83*dd52495fSSaurabh Misra #define BFE_RCV_LAZY 0x00000100 /* Lazy Interrupt Control */ 84*dd52495fSSaurabh Misra #define BFE_LAZY_TO_MASK 0x00ffffff /* Timeout */ 85*dd52495fSSaurabh Misra #define BFE_LAZY_FC_MASK 0xff000000 /* Frame Count */ 86*dd52495fSSaurabh Misra #define BFE_LAZY_FC_SHIFT 24 87*dd52495fSSaurabh Misra 88*dd52495fSSaurabh Misra #define BFE_DMATX_CTRL 0x00000200 /* DMA TX Control */ 89*dd52495fSSaurabh Misra #define BFE_TX_CTRL_ENABLE 0x00000001 /* Enable */ 90*dd52495fSSaurabh Misra #define BFE_TX_CTRL_SUSPEND 0x00000002 /* Suepend Request */ 91*dd52495fSSaurabh Misra #define BFE_TX_CTRL_LPBACK 0x00000004 /* Loopback Enable */ 92*dd52495fSSaurabh Misra #define BFE_TX_CTRL_FAIRPRI 0x00000008 /* Fair Priority */ 93*dd52495fSSaurabh Misra #define BFE_TX_CTRL_FLUSH 0x00000010 /* Flush Request */ 94*dd52495fSSaurabh Misra 95*dd52495fSSaurabh Misra #define BFE_DMATX_ADDR 0x00000204 /* TX Descriptor Ring Address */ 96*dd52495fSSaurabh Misra #define BFE_DMATX_PTR 0x00000208 /* TX Last Posted Descriptor */ 97*dd52495fSSaurabh Misra #define BFE_DMATX_STAT 0x0000020C /* TX Curr Active Desc + Status */ 98*dd52495fSSaurabh Misra #define BFE_STAT_CDMASK 0x00000fff /* Current Descriptor Mask */ 99*dd52495fSSaurabh Misra #define BFE_STAT_SMASK 0x0000f000 /* State Mask */ 100*dd52495fSSaurabh Misra #define BFE_STAT_DISABLE 0x00000000 /* State Disabled */ 101*dd52495fSSaurabh Misra #define BFE_STAT_SACTIVE 0x00001000 /* State Active */ 102*dd52495fSSaurabh Misra #define BFE_STAT_SIDLE 0x00002000 /* State Idle Wait */ 103*dd52495fSSaurabh Misra #define BFE_STAT_STOPPED 0x00003000 /* State Stopped */ 104*dd52495fSSaurabh Misra #define BFE_STAT_SSUSP 0x00004000 /* State Suspend Pending */ 105*dd52495fSSaurabh Misra #define BFE_STAT_EMASK 0x000f0000 /* Error Mask */ 106*dd52495fSSaurabh Misra #define BFE_STAT_ENONE 0x00000000 /* Error None */ 107*dd52495fSSaurabh Misra #define BFE_STAT_EDPE 0x00010000 /* Error Desc. Protocol Error */ 108*dd52495fSSaurabh Misra #define BFE_STAT_EDFU 0x00020000 /* Error Data FIFO Underrun */ 109*dd52495fSSaurabh Misra #define BFE_STAT_EBEBR 0x00030000 /* Error Bus Error on Buffer Read */ 110*dd52495fSSaurabh Misra #define BFE_STAT_EBEDA 0x00040000 /* Error Bus Error on Desc. Access */ 111*dd52495fSSaurabh Misra #define BFE_STAT_FLUSHED 0x00100000 /* Flushed */ 112*dd52495fSSaurabh Misra 113*dd52495fSSaurabh Misra #define BFE_DMARX_CTRL 0x00000210 /* DMA RX Control */ 114*dd52495fSSaurabh Misra #define BFE_RX_CTRL_ENABLE 0x00000001 /* Enable */ 115*dd52495fSSaurabh Misra #define BFE_RX_CTRL_ROMASK 0x000000fe /* Receive Offset Mask */ 116*dd52495fSSaurabh Misra #define BFE_RX_CTRL_ROSHIFT 1 /* Receive Offset Shift */ 117*dd52495fSSaurabh Misra 118*dd52495fSSaurabh Misra #define BFE_DMARX_ADDR 0x00000214 /* DMA RX Descriptor Ring Address */ 119*dd52495fSSaurabh Misra #define BFE_DMARX_PTR 0x00000218 /* DMA RX Last Posted Descriptor */ 120*dd52495fSSaurabh Misra #define BFE_DMARX_STAT 0x0000021C /* DMA RX Current Active Desc. + Status */ 121*dd52495fSSaurabh Misra 122*dd52495fSSaurabh Misra #define BFE_RXCONF 0x00000400 /* EMAC RX Config */ 123*dd52495fSSaurabh Misra #define BFE_RXCONF_DBCAST 0x00000001 /* Disable Broadcast */ 124*dd52495fSSaurabh Misra #define BFE_RXCONF_ALLMULTI 0x00000002 /* Accept All Multicast */ 125*dd52495fSSaurabh Misra #define BFE_RXCONF_NORXTX 0x00000004 /* rev. Disable While Transmitting */ 126*dd52495fSSaurabh Misra #define BFE_RXCONF_PROMISC 0x00000008 /* Promiscuous Enable */ 127*dd52495fSSaurabh Misra #define BFE_RXCONF_LPBACK 0x00000010 /* Loopback Enable */ 128*dd52495fSSaurabh Misra #define BFE_RXCONF_FLOW 0x00000020 /* Flow Control Enable */ 129*dd52495fSSaurabh Misra #define BFE_RXCONF_ACCEPT 0x00000040 /* Accept Unicst Flow Ctrl Frame */ 130*dd52495fSSaurabh Misra #define BFE_RXCONF_RFILT 0x00000080 /* Reject Filter */ 131*dd52495fSSaurabh Misra 132*dd52495fSSaurabh Misra #define BFE_RXMAXLEN 0x00000404 /* EMAC RX Max Packet Length */ 133*dd52495fSSaurabh Misra #define BFE_TXMAXLEN 0x00000408 /* EMAC TX Max Packet Length */ 134*dd52495fSSaurabh Misra 135*dd52495fSSaurabh Misra #define BFE_MDIO_CTRL 0x00000410 /* EMAC MDIO Control */ 136*dd52495fSSaurabh Misra #define BFE_MDIO_MAXF_MASK 0x0000007f /* MDC Frequency */ 137*dd52495fSSaurabh Misra #define BFE_MDIO_PREAMBLE 0x00000080 /* MII Preamble Enable */ 138*dd52495fSSaurabh Misra 139*dd52495fSSaurabh Misra #define BFE_MDIO_DATA 0x00000414 /* EMAC MDIO Data */ 140*dd52495fSSaurabh Misra #define BFE_MDIO_DATA_DATA 0x0000ffff /* R/W Data */ 141*dd52495fSSaurabh Misra #define BFE_MDIO_TA_MASK 0x00030000 /* Turnaround Value */ 142*dd52495fSSaurabh Misra #define BFE_MDIO_TA_SHIFT 16 143*dd52495fSSaurabh Misra #define BFE_MDIO_TA_VALID 2 144*dd52495fSSaurabh Misra 145*dd52495fSSaurabh Misra #define BFE_MDIO_RA_MASK 0x007c0000 /* Register Address */ 146*dd52495fSSaurabh Misra #define BFE_MDIO_PMD_MASK 0x0f800000 /* Physical Media Device */ 147*dd52495fSSaurabh Misra #define BFE_MDIO_OP_MASK 0x30000000 /* Opcode */ 148*dd52495fSSaurabh Misra #define BFE_MDIO_SB_MASK 0xc0000000 /* Start Bits */ 149*dd52495fSSaurabh Misra #define BFE_MDIO_SB_START 0x40000000 /* Start Of Frame */ 150*dd52495fSSaurabh Misra #define BFE_MDIO_RA_SHIFT 18 151*dd52495fSSaurabh Misra #define BFE_MDIO_PMD_SHIFT 23 152*dd52495fSSaurabh Misra #define BFE_MDIO_OP_SHIFT 28 153*dd52495fSSaurabh Misra #define BFE_MDIO_OP_WRITE 1 154*dd52495fSSaurabh Misra #define BFE_MDIO_OP_READ 2 155*dd52495fSSaurabh Misra #define BFE_MDIO_SB_SHIFT 30 156*dd52495fSSaurabh Misra 157*dd52495fSSaurabh Misra #define BFE_EMAC_IMASK 0x00000418 /* EMAC Interrupt Mask */ 158*dd52495fSSaurabh Misra #define BFE_EMAC_ISTAT 0x0000041C /* EMAC Interrupt Status */ 159*dd52495fSSaurabh Misra #define BFE_EMAC_INT_MII 0x00000001 /* MII MDIO Interrupt */ 160*dd52495fSSaurabh Misra #define BFE_EMAC_INT_MIB 0x00000002 /* MIB Interrupt */ 161*dd52495fSSaurabh Misra #define BFE_EMAC_INT_FLOW 0x00000003 /* Flow Control Interrupt */ 162*dd52495fSSaurabh Misra 163*dd52495fSSaurabh Misra #define BFE_CAM_DATA_LO 0x00000420 /* EMAC CAM Data Low */ 164*dd52495fSSaurabh Misra #define BFE_CAM_DATA_HI 0x00000424 /* EMAC CAM Data High */ 165*dd52495fSSaurabh Misra #define BFE_CAM_HI_VALID 0x00010000 /* Valid Bit */ 166*dd52495fSSaurabh Misra 167*dd52495fSSaurabh Misra #define BFE_CAM_CTRL 0x00000428 /* EMAC CAM Control */ 168*dd52495fSSaurabh Misra #define BFE_CAM_ENABLE 0x00000001 /* CAM Enable */ 169*dd52495fSSaurabh Misra #define BFE_CAM_MSEL 0x00000002 /* Mask Select */ 170*dd52495fSSaurabh Misra #define BFE_CAM_READ 0x00000004 /* Read */ 171*dd52495fSSaurabh Misra #define BFE_CAM_WRITE 0x00000008 /* Read */ 172*dd52495fSSaurabh Misra #define BFE_CAM_INDEX_MASK 0x003f0000 /* Index Mask */ 173*dd52495fSSaurabh Misra #define BFE_CAM_BUSY 0x80000000 /* CAM Busy */ 174*dd52495fSSaurabh Misra #define BFE_CAM_INDEX_SHIFT 16 175*dd52495fSSaurabh Misra 176*dd52495fSSaurabh Misra #define BFE_ENET_CTRL 0x0000042C /* EMAC ENET Control */ 177*dd52495fSSaurabh Misra #define BFE_ENET_ENABLE 0x00000001 /* EMAC Enable */ 178*dd52495fSSaurabh Misra #define BFE_ENET_DISABLE 0x00000002 /* EMAC Disable */ 179*dd52495fSSaurabh Misra #define BFE_ENET_SRST 0x00000004 /* EMAC Soft Reset */ 180*dd52495fSSaurabh Misra #define BFE_ENET_EPSEL 0x00000008 /* External PHY Select */ 181*dd52495fSSaurabh Misra 182*dd52495fSSaurabh Misra #define BFE_TX_CTRL 0x00000430 /* EMAC TX Control */ 183*dd52495fSSaurabh Misra #define BFE_TX_DUPLEX 0x00000001 /* Full Duplex */ 184*dd52495fSSaurabh Misra #define BFE_TX_FMODE 0x00000002 /* Flow Mode */ 185*dd52495fSSaurabh Misra #define BFE_TX_SBENAB 0x00000004 /* Single Backoff Enable */ 186*dd52495fSSaurabh Misra #define BFE_TX_SMALL_SLOT 0x00000008 /* Small Slottime */ 187*dd52495fSSaurabh Misra 188*dd52495fSSaurabh Misra #define BFE_TX_WMARK 0x00000434 /* EMAC TX Watermark */ 189*dd52495fSSaurabh Misra 190*dd52495fSSaurabh Misra #define BFE_MIB_CTRL 0x00000438 /* EMAC MIB Control */ 191*dd52495fSSaurabh Misra #define BFE_MIB_CLR_ON_READ 0x00000001 /* Autoclear on Read */ 192*dd52495fSSaurabh Misra 193*dd52495fSSaurabh Misra /* Status registers */ 194*dd52495fSSaurabh Misra #define BFE_TX_GOOD_O 0x00000500 /* MIB TX Good Octets */ 195*dd52495fSSaurabh Misra #define BFE_TX_GOOD_P 0x00000504 /* MIB TX Good Packets */ 196*dd52495fSSaurabh Misra #define BFE_TX_O 0x00000508 /* MIB TX Octets */ 197*dd52495fSSaurabh Misra #define BFE_TX_P 0x0000050C /* MIB TX Packets */ 198*dd52495fSSaurabh Misra #define BFE_TX_BCAST 0x00000510 /* MIB TX Broadcast Packets */ 199*dd52495fSSaurabh Misra #define BFE_TX_MCAST 0x00000514 /* MIB TX Multicast Packets */ 200*dd52495fSSaurabh Misra #define BFE_TX_64 0x00000518 /* MIB TX <= 64 byte Packets */ 201*dd52495fSSaurabh Misra #define BFE_TX_65_127 0x0000051C /* MIB TX 65 to 127 byte Packets */ 202*dd52495fSSaurabh Misra #define BFE_TX_128_255 0x00000520 /* MIB TX 128 to 255 byte Packets */ 203*dd52495fSSaurabh Misra #define BFE_TX_256_511 0x00000524 /* MIB TX 256 to 511 byte Packets */ 204*dd52495fSSaurabh Misra #define BFE_TX_512_1023 0x00000528 /* MIB TX 512 to 1023 byte Packets */ 205*dd52495fSSaurabh Misra #define BFE_TX_1024_MAX 0x0000052C /* MIB TX 1024 to max byte Packets */ 206*dd52495fSSaurabh Misra #define BFE_TX_JABBER 0x00000530 /* MIB TX Jabber Packets */ 207*dd52495fSSaurabh Misra #define BFE_TX_OSIZE 0x00000534 /* MIB TX Oversize Packets */ 208*dd52495fSSaurabh Misra #define BFE_TX_FRAG 0x00000538 /* MIB TX Fragment Packets */ 209*dd52495fSSaurabh Misra #define BFE_TX_URUNS 0x0000053C /* MIB TX Underruns */ 210*dd52495fSSaurabh Misra #define BFE_TX_TCOLS 0x00000540 /* MIB TX Total Collisions */ 211*dd52495fSSaurabh Misra #define BFE_TX_SCOLS 0x00000544 /* MIB TX Single Collisions */ 212*dd52495fSSaurabh Misra #define BFE_TX_MCOLS 0x00000548 /* MIB TX Multiple Collisions */ 213*dd52495fSSaurabh Misra #define BFE_TX_ECOLS 0x0000054C /* MIB TX Excessive Collisions */ 214*dd52495fSSaurabh Misra #define BFE_TX_LCOLS 0x00000550 /* MIB TX Late Collisions */ 215*dd52495fSSaurabh Misra #define BFE_TX_DEFERED 0x00000554 /* MIB TX Defered Packets */ 216*dd52495fSSaurabh Misra #define BFE_TX_CLOST 0x00000558 /* MIB TX Carrier Lost */ 217*dd52495fSSaurabh Misra #define BFE_TX_PAUSE 0x0000055C /* MIB TX Pause Packets */ 218*dd52495fSSaurabh Misra #define BFE_RX_GOOD_O 0x00000580 /* MIB RX Good Octets */ 219*dd52495fSSaurabh Misra #define BFE_RX_GOOD_P 0x00000584 /* MIB RX Good Packets */ 220*dd52495fSSaurabh Misra #define BFE_RX_O 0x00000588 /* MIB RX Octets */ 221*dd52495fSSaurabh Misra #define BFE_RX_P 0x0000058C /* MIB RX Packets */ 222*dd52495fSSaurabh Misra #define BFE_RX_BCAST 0x00000590 /* MIB RX Broadcast Packets */ 223*dd52495fSSaurabh Misra #define BFE_RX_MCAST 0x00000594 /* MIB RX Multicast Packets */ 224*dd52495fSSaurabh Misra #define BFE_RX_64 0x00000598 /* MIB RX <= 64 byte Packets */ 225*dd52495fSSaurabh Misra #define BFE_RX_65_127 0x0000059C /* MIB RX 65 to 127 byte Packets */ 226*dd52495fSSaurabh Misra #define BFE_RX_128_255 0x000005A0 /* MIB RX 128 to 255 byte Packets */ 227*dd52495fSSaurabh Misra #define BFE_RX_256_511 0x000005A4 /* MIB RX 256 to 511 byte Packets */ 228*dd52495fSSaurabh Misra #define BFE_RX_512_1023 0x000005A8 /* MIB RX 512 to 1023 byte Packets */ 229*dd52495fSSaurabh Misra #define BFE_RX_1024_MAX 0x000005AC /* MIB RX 1024 to max byte Packets */ 230*dd52495fSSaurabh Misra #define BFE_RX_JABBER 0x000005B0 /* MIB RX Jabber Packets */ 231*dd52495fSSaurabh Misra #define BFE_RX_OSIZE 0x000005B4 /* MIB RX Oversize Packets */ 232*dd52495fSSaurabh Misra #define BFE_RX_FRAG 0x000005B8 /* MIB RX Fragment Packets */ 233*dd52495fSSaurabh Misra #define BFE_RX_MISS 0x000005BC /* MIB RX Missed Packets */ 234*dd52495fSSaurabh Misra #define BFE_RX_CRCA 0x000005C0 /* MIB RX CRC Align Errors */ 235*dd52495fSSaurabh Misra #define BFE_RX_USIZE 0x000005C4 /* MIB RX Undersize Packets */ 236*dd52495fSSaurabh Misra #define BFE_RX_CRC 0x000005C8 /* MIB RX CRC Errors */ 237*dd52495fSSaurabh Misra #define BFE_RX_ALIGN 0x000005CC /* MIB RX Align Errors */ 238*dd52495fSSaurabh Misra #define BFE_RX_SYM 0x000005D0 /* MIB RX Symbol Errors */ 239*dd52495fSSaurabh Misra #define BFE_RX_PAUSE 0x000005D4 /* MIB RX Pause Packets */ 240*dd52495fSSaurabh Misra #define BFE_RX_NPAUSE 0x000005D8 /* MIB RX Non-Pause Packets */ 241*dd52495fSSaurabh Misra 242*dd52495fSSaurabh Misra #define BFE_SBIMSTATE 0x00000F90 /* BFE_SB Initiator Agent State */ 243*dd52495fSSaurabh Misra #define BFE_PC 0x0000000f /* Pipe Count */ 244*dd52495fSSaurabh Misra #define BFE_AP_MASK 0x00000030 /* Arbitration Priority */ 245*dd52495fSSaurabh Misra #define BFE_AP_BOTH 0x00000000 /* Use both timeslices and token */ 246*dd52495fSSaurabh Misra #define BFE_AP_TS 0x00000010 /* Use timeslices only */ 247*dd52495fSSaurabh Misra #define BFE_AP_TK 0x00000020 /* Use token only */ 248*dd52495fSSaurabh Misra #define BFE_AP_RSV 0x00000030 /* Reserved */ 249*dd52495fSSaurabh Misra #define BFE_IBE 0x00020000 /* In Band Error */ 250*dd52495fSSaurabh Misra #define BFE_TO 0x00040000 /* Timeout */ 251*dd52495fSSaurabh Misra 252*dd52495fSSaurabh Misra 253*dd52495fSSaurabh Misra /* 254*dd52495fSSaurabh Misra * Seems the bcm440x has a fairly generic core, we only need be concerned with 255*dd52495fSSaurabh Misra * a couple of these 256*dd52495fSSaurabh Misra */ 257*dd52495fSSaurabh Misra #define BFE_SBINTVEC 0x00000F94 /* BFE_SB Interrupt Mask */ 258*dd52495fSSaurabh Misra #define BFE_INTVEC_PCI 0x00000001 /* Enable interrupts for PCI */ 259*dd52495fSSaurabh Misra #define BFE_INTVEC_ENET0 0x00000002 /* Enable interrupts for enet 0 */ 260*dd52495fSSaurabh Misra #define BFE_INTVEC_ILINE20 0x00000004 /* Enable interrupts for iline20 */ 261*dd52495fSSaurabh Misra #define BFE_INTVEC_CODEC 0x00000008 /* Enable interrupts for v90 codec */ 262*dd52495fSSaurabh Misra #define BFE_INTVEC_USB 0x00000010 /* Enable interrupts for usb */ 263*dd52495fSSaurabh Misra #define BFE_INTVEC_EXTIF 0x00000020 /* Enable intrs for external i/f */ 264*dd52495fSSaurabh Misra #define BFE_INTVEC_ENET1 0x00000040 /* Enable interrupts for enet 1 */ 265*dd52495fSSaurabh Misra 266*dd52495fSSaurabh Misra #define BFE_SBTMSLOW 0x00000F98 /* BFE_SB Target State Low */ 267*dd52495fSSaurabh Misra #define BFE_RESET 0x00000001 /* Reset */ 268*dd52495fSSaurabh Misra #define BFE_REJECT 0x00000002 /* Reject */ 269*dd52495fSSaurabh Misra #define BFE_CLOCK 0x00010000 /* Clock Enable */ 270*dd52495fSSaurabh Misra #define BFE_FGC 0x00020000 /* Force Gated Clocks On */ 271*dd52495fSSaurabh Misra #define BFE_PE 0x40000000 /* Power Management Enable */ 272*dd52495fSSaurabh Misra #define BFE_BE 0x80000000 /* BIST Enable */ 273*dd52495fSSaurabh Misra 274*dd52495fSSaurabh Misra #define BFE_SBTMSHIGH 0x00000F9C /* BFE_SB Target State High */ 275*dd52495fSSaurabh Misra #define BFE_SERR 0x00000001 /* S-error */ 276*dd52495fSSaurabh Misra #define BFE_INT 0x00000002 /* Interrupt */ 277*dd52495fSSaurabh Misra #define BFE_BUSY 0x00000004 /* Busy */ 278*dd52495fSSaurabh Misra #define BFE_GCR 0x20000000 /* Gated Clock Request */ 279*dd52495fSSaurabh Misra #define BFE_BISTF 0x40000000 /* BIST Failed */ 280*dd52495fSSaurabh Misra #define BFE_BISTD 0x80000000 /* BIST Done */ 281*dd52495fSSaurabh Misra 282*dd52495fSSaurabh Misra #define BFE_SBBWA0 0x00000FA0 /* BFE_SB Bandwidth Allocation Table 0 */ 283*dd52495fSSaurabh Misra #define BFE_TAB0_MASK 0x0000ffff /* Lookup Table 0 */ 284*dd52495fSSaurabh Misra #define BFE_TAB1_MASK 0xffff0000 /* Lookup Table 0 */ 285*dd52495fSSaurabh Misra #define BFE_TAB0_SHIFT 0 286*dd52495fSSaurabh Misra #define BFE_TAB1_SHIFT 16 287*dd52495fSSaurabh Misra 288*dd52495fSSaurabh Misra #define BFE_SBIMCFGLOW 0x00000FA8 /* BFE_SB Initiator Configuration Low */ 289*dd52495fSSaurabh Misra #define BFE_STO_MASK 0x00000003 /* Service Timeout */ 290*dd52495fSSaurabh Misra #define BFE_RTO_MASK 0x00000030 /* Request Timeout */ 291*dd52495fSSaurabh Misra #define BFE_CID_MASK 0x00ff0000 /* Connection ID */ 292*dd52495fSSaurabh Misra #define BFE_RTO_SHIFT 4 293*dd52495fSSaurabh Misra #define BFE_CID_SHIFT 16 294*dd52495fSSaurabh Misra 295*dd52495fSSaurabh Misra #define BFE_SBIMCFGHIGH 0x00000FAC /* BFE_SB Initiator Configuration High */ 296*dd52495fSSaurabh Misra #define BFE_IEM_MASK 0x0000000c /* Inband Error Mode */ 297*dd52495fSSaurabh Misra #define BFE_TEM_MASK 0x00000030 /* Timeout Error Mode */ 298*dd52495fSSaurabh Misra #define BFE_BEM_MASK 0x000000c0 /* Bus Error Mode */ 299*dd52495fSSaurabh Misra #define BFE_TEM_SHIFT 4 300*dd52495fSSaurabh Misra #define BFE_BEM_SHIFT 6 301*dd52495fSSaurabh Misra 302*dd52495fSSaurabh Misra #define BFE_SBTMCFGLOW 0x00000FB8 /* BFE_SB Target Configuration Low */ 303*dd52495fSSaurabh Misra #define BFE_LOW_CD_MASK 0x000000ff /* Clock Divide Mask */ 304*dd52495fSSaurabh Misra #define BFE_LOW_CO_MASK 0x0000f800 /* Clock Offset Mask */ 305*dd52495fSSaurabh Misra #define BFE_LOW_IF_MASK 0x00fc0000 /* Interrupt Flags Mask */ 306*dd52495fSSaurabh Misra #define BFE_LOW_IM_MASK 0x03000000 /* Interrupt Mode Mask */ 307*dd52495fSSaurabh Misra #define BFE_LOW_CO_SHIFT 11 308*dd52495fSSaurabh Misra #define BFE_LOW_IF_SHIFT 18 309*dd52495fSSaurabh Misra #define BFE_LOW_IM_SHIFT 24 310*dd52495fSSaurabh Misra 311*dd52495fSSaurabh Misra #define BFE_SBTMCFGHIGH 0x00000FBC /* BFE_SB Target Configuration High */ 312*dd52495fSSaurabh Misra #define BFE_HIGH_BM_MASK 0x00000003 /* Busy Mode */ 313*dd52495fSSaurabh Misra #define BFE_HIGH_RM_MASK 0x0000000C /* Retry Mode */ 314*dd52495fSSaurabh Misra #define BFE_HIGH_SM_MASK 0x00000030 /* Stop Mode */ 315*dd52495fSSaurabh Misra #define BFE_HIGH_EM_MASK 0x00000300 /* Error Mode */ 316*dd52495fSSaurabh Misra #define BFE_HIGH_IM_MASK 0x00000c00 /* Interrupt Mode */ 317*dd52495fSSaurabh Misra #define BFE_HIGH_RM_SHIFT 2 318*dd52495fSSaurabh Misra #define BFE_HIGH_SM_SHIFT 4 319*dd52495fSSaurabh Misra #define BFE_HIGH_EM_SHIFT 8 320*dd52495fSSaurabh Misra #define BFE_HIGH_IM_SHIFT 10 321*dd52495fSSaurabh Misra 322*dd52495fSSaurabh Misra #define BFE_SBBCFG 0x00000FC0 /* BFE_SB Broadcast Configuration */ 323*dd52495fSSaurabh Misra #define BFE_LAT_MASK 0x00000003 /* BFE_SB Latency */ 324*dd52495fSSaurabh Misra #define BFE_MAX0_MASK 0x000f0000 /* MAX Counter 0 */ 325*dd52495fSSaurabh Misra #define BFE_MAX1_MASK 0x00f00000 /* MAX Counter 1 */ 326*dd52495fSSaurabh Misra #define BFE_MAX0_SHIFT 16 327*dd52495fSSaurabh Misra #define BFE_MAX1_SHIFT 20 328*dd52495fSSaurabh Misra 329*dd52495fSSaurabh Misra #define BFE_SBBSTATE 0x00000FC8 /* BFE_SB Broadcast State */ 330*dd52495fSSaurabh Misra #define BFE_SBBSTATE_SRD 0x00000001 /* ST Reg Disable */ 331*dd52495fSSaurabh Misra #define BFE_SBBSTATE_HRD 0x00000002 /* Hold Reg Disable */ 332*dd52495fSSaurabh Misra 333*dd52495fSSaurabh Misra #define BFE_SBACTCNFG 0x00000FD8 /* BFE_SB Activate Configuration */ 334*dd52495fSSaurabh Misra #define BFE_SBFLAGST 0x00000FE8 /* BFE_SB Current BFE_SBFLAGS */ 335*dd52495fSSaurabh Misra 336*dd52495fSSaurabh Misra #define BFE_SBIDLOW 0x00000FF8 /* BFE_SB Identification Low */ 337*dd52495fSSaurabh Misra #define BFE_CS_MASK 0x00000003 /* Config Space Mask */ 338*dd52495fSSaurabh Misra #define BFE_AR_MASK 0x00000038 /* Num Address Ranges Supported */ 339*dd52495fSSaurabh Misra #define BFE_SYNCH 0x00000040 /* Sync */ 340*dd52495fSSaurabh Misra #define BFE_INIT 0x00000080 /* Initiator */ 341*dd52495fSSaurabh Misra #define BFE_MINLAT_MASK 0x00000f00 /* Minimum Backplane Latency */ 342*dd52495fSSaurabh Misra #define BFE_MAXLAT_MASK 0x0000f000 /* Maximum Backplane Latency */ 343*dd52495fSSaurabh Misra #define BFE_FIRST 0x00010000 /* This Initiator is First */ 344*dd52495fSSaurabh Misra #define BFE_CW_MASK 0x000c0000 /* Cycle Counter Width */ 345*dd52495fSSaurabh Misra #define BFE_TP_MASK 0x00f00000 /* Target Ports */ 346*dd52495fSSaurabh Misra #define BFE_IP_MASK 0x0f000000 /* Initiator Ports */ 347*dd52495fSSaurabh Misra #define BFE_AR_SHIFT 3 348*dd52495fSSaurabh Misra #define BFE_MINLAT_SHIFT 8 349*dd52495fSSaurabh Misra #define BFE_MAXLAT_SHIFT 12 350*dd52495fSSaurabh Misra #define BFE_CW_SHIFT 18 351*dd52495fSSaurabh Misra #define BFE_TP_SHIFT 20 352*dd52495fSSaurabh Misra #define BFE_IP_SHIFT 24 353*dd52495fSSaurabh Misra 354*dd52495fSSaurabh Misra #define BFE_SBIDHIGH 0x00000FFC /* BFE_SB Identification High */ 355*dd52495fSSaurabh Misra #define BFE_RC_MASK 0x0000000f /* Revision Code */ 356*dd52495fSSaurabh Misra #define BFE_CC_MASK 0x0000fff0 /* Core Code */ 357*dd52495fSSaurabh Misra #define BFE_VC_MASK 0xffff0000 /* Vendor Code */ 358*dd52495fSSaurabh Misra #define BFE_CC_SHIFT 4 359*dd52495fSSaurabh Misra #define BFE_VC_SHIFT 16 360*dd52495fSSaurabh Misra 361*dd52495fSSaurabh Misra #define BFE_CORE_ILINE20 0x801 362*dd52495fSSaurabh Misra #define BFE_CORE_SDRAM 0x803 363*dd52495fSSaurabh Misra #define BFE_CORE_PCI 0x804 364*dd52495fSSaurabh Misra #define BFE_CORE_MIPS 0x805 365*dd52495fSSaurabh Misra #define BFE_CORE_ENET 0x806 366*dd52495fSSaurabh Misra #define BFE_CORE_CODEC 0x807 367*dd52495fSSaurabh Misra #define BFE_CORE_USB 0x808 368*dd52495fSSaurabh Misra #define BFE_CORE_ILINE100 0x80a 369*dd52495fSSaurabh Misra #define BFE_CORE_EXTIF 0x811 370*dd52495fSSaurabh Misra #define BFE_CORE_PCI_SHIFT 4 371*dd52495fSSaurabh Misra #define BFE_IDH_CORE 0x0000FFF0 372*dd52495fSSaurabh Misra 373*dd52495fSSaurabh Misra 374*dd52495fSSaurabh Misra /* SSB PCI config space registers. */ 375*dd52495fSSaurabh Misra #define BFE_BAR0_WIN 0x80 376*dd52495fSSaurabh Misra #define BFE_BAR1_WIN 0x84 377*dd52495fSSaurabh Misra #define BFE_SPROM_CONTROL 0x88 378*dd52495fSSaurabh Misra #define BFE_BAR1_CONTROL 0x8c 379*dd52495fSSaurabh Misra 380*dd52495fSSaurabh Misra /* SSB core and hsot control registers. */ 381*dd52495fSSaurabh Misra #define BFE_SSB_CONTROL 0x00000000 382*dd52495fSSaurabh Misra #define BFE_SSB_ARBCONTROL 0x00000010 383*dd52495fSSaurabh Misra #define BFE_SSB_ISTAT 0x00000020 384*dd52495fSSaurabh Misra #define BFE_SSB_IMASK 0x00000024 385*dd52495fSSaurabh Misra #define BFE_SSB_MBOX 0x00000028 386*dd52495fSSaurabh Misra #define BFE_SSB_BCAST_ADDR 0x00000050 387*dd52495fSSaurabh Misra #define BFE_SSB_BCAST_DATA 0x00000054 388*dd52495fSSaurabh Misra #define BFE_SSB_PCI_TRANS_0 0x00000100 389*dd52495fSSaurabh Misra #define BFE_SSB_PCI_TRANS_1 0x00000104 390*dd52495fSSaurabh Misra #define BFE_SSB_PCI_TRANS_2 0x00000108 391*dd52495fSSaurabh Misra #define BFE_SSB_SPROM 0x00000800 392*dd52495fSSaurabh Misra 393*dd52495fSSaurabh Misra #define BFE_SSB_PCI_MEM 0x00000000 394*dd52495fSSaurabh Misra #define BFE_SSB_PCI_IO 0x00000001 395*dd52495fSSaurabh Misra #define BFE_SSB_PCI_CFG0 0x00000002 396*dd52495fSSaurabh Misra #define BFE_SSB_PCI_CFG1 0x00000003 397*dd52495fSSaurabh Misra #define BFE_SSB_PCI_PREF 0x00000004 398*dd52495fSSaurabh Misra #define BFE_SSB_PCI_BURST 0x00000008 399*dd52495fSSaurabh Misra #define BFE_SSB_PCI_MASK0 0xfc000000 400*dd52495fSSaurabh Misra #define BFE_SSB_PCI_MASK1 0xfc000000 401*dd52495fSSaurabh Misra #define BFE_SSB_PCI_MASK2 0xc0000000 402*dd52495fSSaurabh Misra 403*dd52495fSSaurabh Misra #define BFE_DESC_LEN 0x00001fff 404*dd52495fSSaurabh Misra #define BFE_DESC_CMASK 0x0ff00000 /* Core specific bits */ 405*dd52495fSSaurabh Misra #define BFE_DESC_EOT 0x10000000 /* End of Table */ 406*dd52495fSSaurabh Misra #define BFE_DESC_IOC 0x20000000 /* Interrupt On Completion */ 407*dd52495fSSaurabh Misra #define BFE_DESC_EOF 0x40000000 /* End of Frame */ 408*dd52495fSSaurabh Misra #define BFE_DESC_SOF 0x80000000 /* Start of Frame */ 409*dd52495fSSaurabh Misra 410*dd52495fSSaurabh Misra #define BFE_RX_CP_THRESHOLD 256 411*dd52495fSSaurabh Misra #define BFE_RX_HEADER_LEN 28 412*dd52495fSSaurabh Misra #define RX_HEAD_ROOM (BFE_RX_HEADER_LEN + 2) 413*dd52495fSSaurabh Misra 414*dd52495fSSaurabh Misra #define BFE_RX_FLAG_OFIFO 0x00000001 /* FIFO Overflow */ 415*dd52495fSSaurabh Misra #define BFE_RX_FLAG_CRCERR 0x00000002 /* CRC Error */ 416*dd52495fSSaurabh Misra #define BFE_RX_FLAG_SERR 0x00000004 /* Receive Symbol Error */ 417*dd52495fSSaurabh Misra #define BFE_RX_FLAG_ODD 0x00000008 /* Frame has odd number of nibbles */ 418*dd52495fSSaurabh Misra #define BFE_RX_FLAG_LARGE 0x00000010 /* Frame is > RX MAX Length */ 419*dd52495fSSaurabh Misra #define BFE_RX_FLAG_MCAST 0x00000020 /* Dest is Multicast Address */ 420*dd52495fSSaurabh Misra #define BFE_RX_FLAG_BCAST 0x00000040 /* Dest is Broadcast Address */ 421*dd52495fSSaurabh Misra #define BFE_RX_FLAG_MISS 0x00000080 /* Received due to promisc mode */ 422*dd52495fSSaurabh Misra #define BFE_RX_FLAG_LAST 0x00000800 /* Last buffer in frame */ 423*dd52495fSSaurabh Misra #define BFE_RX_FLAG_ERRORS (BFE_RX_FLAG_ODD | BFE_RX_FLAG_SERR | \ 424*dd52495fSSaurabh Misra BFE_RX_FLAG_CRCERR | BFE_RX_FLAG_OFIFO) 425*dd52495fSSaurabh Misra 426*dd52495fSSaurabh Misra #define BFE_MCAST_TBL_SIZE 32 427*dd52495fSSaurabh Misra #define BFE_PCI_DMA 0x40000000 428*dd52495fSSaurabh Misra #define BFE_REG_PCI 0x18002000 429*dd52495fSSaurabh Misra 430*dd52495fSSaurabh Misra #define BCOM_VENDORID 0x14E4 431*dd52495fSSaurabh Misra #define BCOM_DEVICEID_BCM4401 0x4401 432*dd52495fSSaurabh Misra #define BCOM_DEVICEID_BCM4401B0 0x170c 433*dd52495fSSaurabh Misra 434*dd52495fSSaurabh Misra #define BFE_TX_LIST_CNT 128 435*dd52495fSSaurabh Misra #define BFE_RX_LIST_CNT 128 436*dd52495fSSaurabh Misra #define BFE_TX_LIST_SIZE BFE_TX_LIST_CNT * sizeof (struct bfe_desc) 437*dd52495fSSaurabh Misra #define BFE_RX_OFFSET 30 438*dd52495fSSaurabh Misra #define BFE_TX_QLEN 256 439*dd52495fSSaurabh Misra 440*dd52495fSSaurabh Misra #define BFE_DESC_ALIGN 0x1000 441*dd52495fSSaurabh Misra #define BFE_RX_RING_ALIGN 4096 442*dd52495fSSaurabh Misra #define BFE_TX_RING_ALIGN 4096 443*dd52495fSSaurabh Misra #define BFE_MAXTXSEGS 16 444*dd52495fSSaurabh Misra #define BFE_DMA_MAXADDR 0x3FFFFFFF /* 1GB DMA address limit. */ 445*dd52495fSSaurabh Misra #define BFE_ADDR_LO(x) ((uint64_t)(x) & 0xFFFFFFFF) 446*dd52495fSSaurabh Misra 447*dd52495fSSaurabh Misra /* Card's EEPROM */ 448*dd52495fSSaurabh Misra #define BFE_EEPROM_BASE 0x1000 449*dd52495fSSaurabh Misra #define BFE_EEPROM_SIZE 32 450*dd52495fSSaurabh Misra #define BFE_EEPROM_NODEADDR 78 451*dd52495fSSaurabh Misra #define BFE_EEPROM_PHYADDR 90 452*dd52495fSSaurabh Misra #define BFE_EEPROM_MAGIC 126 453*dd52495fSSaurabh Misra 454*dd52495fSSaurabh Misra typedef struct bfe_hw_stats { 455*dd52495fSSaurabh Misra /* TX Side */ 456*dd52495fSSaurabh Misra uint32_t tx_good_octets; 457*dd52495fSSaurabh Misra uint32_t tx_good_pkts; 458*dd52495fSSaurabh Misra uint32_t tx_octets; 459*dd52495fSSaurabh Misra uint32_t tx_pkts; 460*dd52495fSSaurabh Misra uint32_t tx_broadcast_pkts; 461*dd52495fSSaurabh Misra uint32_t tx_multicast_pkts; 462*dd52495fSSaurabh Misra uint32_t tx_len_64; 463*dd52495fSSaurabh Misra uint32_t tx_len_65_to_127; 464*dd52495fSSaurabh Misra uint32_t tx_len_128_to_255; 465*dd52495fSSaurabh Misra uint32_t tx_len_256_to_511; 466*dd52495fSSaurabh Misra uint32_t tx_len_512_to_1023; 467*dd52495fSSaurabh Misra uint32_t tx_len_1024_to_max; 468*dd52495fSSaurabh Misra uint32_t tx_jabber_pkts; 469*dd52495fSSaurabh Misra uint32_t tx_oversize_pkts; 470*dd52495fSSaurabh Misra uint32_t tx_fragment_pkts; 471*dd52495fSSaurabh Misra uint32_t tx_underruns; 472*dd52495fSSaurabh Misra uint32_t tx_total_cols; 473*dd52495fSSaurabh Misra uint32_t tx_single_cols; 474*dd52495fSSaurabh Misra uint32_t tx_multiple_cols; 475*dd52495fSSaurabh Misra uint32_t tx_excessive_cols; 476*dd52495fSSaurabh Misra uint32_t tx_late_cols; 477*dd52495fSSaurabh Misra uint32_t tx_defered; 478*dd52495fSSaurabh Misra uint32_t tx_carrier_lost; 479*dd52495fSSaurabh Misra uint32_t tx_pause_pkts; 480*dd52495fSSaurabh Misra uint32_t pad1[8]; 481*dd52495fSSaurabh Misra 482*dd52495fSSaurabh Misra /* RX Side */ 483*dd52495fSSaurabh Misra uint32_t rx_good_octets; 484*dd52495fSSaurabh Misra uint32_t rx_good_pkts; 485*dd52495fSSaurabh Misra uint32_t rx_octets; 486*dd52495fSSaurabh Misra uint32_t rx_pkts; 487*dd52495fSSaurabh Misra uint32_t rx_broadcast_pkts; 488*dd52495fSSaurabh Misra uint32_t rx_multicast_pkts; 489*dd52495fSSaurabh Misra uint32_t rx_len_64; 490*dd52495fSSaurabh Misra uint32_t rx_len_65_to_127; 491*dd52495fSSaurabh Misra uint32_t rx_len_128_to_255; 492*dd52495fSSaurabh Misra uint32_t rx_len_256_to_511; 493*dd52495fSSaurabh Misra uint32_t rx_len_512_to_1023; 494*dd52495fSSaurabh Misra uint32_t rx_len_1024_to_max; 495*dd52495fSSaurabh Misra uint32_t rx_jabber_pkts; 496*dd52495fSSaurabh Misra uint32_t rx_oversize_pkts; 497*dd52495fSSaurabh Misra uint32_t rx_fragment_pkts; 498*dd52495fSSaurabh Misra uint32_t rx_missed_pkts; 499*dd52495fSSaurabh Misra uint32_t rx_crc_align_errs; 500*dd52495fSSaurabh Misra uint32_t rx_undersize; 501*dd52495fSSaurabh Misra uint32_t rx_crc_errs; 502*dd52495fSSaurabh Misra uint32_t rx_align_errs; 503*dd52495fSSaurabh Misra uint32_t rx_symbol_errs; 504*dd52495fSSaurabh Misra uint32_t rx_pause_pkts; 505*dd52495fSSaurabh Misra uint32_t rx_nonpause_pkts; 506*dd52495fSSaurabh Misra } bfe_hw_stats_t; 507*dd52495fSSaurabh Misra 508*dd52495fSSaurabh Misra #endif /* _BFE_HW_H */ 509