Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
sunbmac.h File Reference

Go to the source code of this file.

Data Structures

struct  be_rxd
 
struct  be_txd
 
struct  bmac_init_block
 
struct  bigmac
 

Macros

#define GLOB_CTRL   0x00UL /* Control */
 
#define GLOB_STAT   0x04UL /* Status */
 
#define GLOB_PSIZE   0x08UL /* Packet Size */
 
#define GLOB_MSIZE   0x0cUL /* Local-mem size (64K) */
 
#define GLOB_RSIZE   0x10UL /* Receive partition size */
 
#define GLOB_TSIZE   0x14UL /* Transmit partition size */
 
#define GLOB_REG_SIZE   0x18UL
 
#define GLOB_CTRL_MMODE   0x40000000 /* MACE qec mode */
 
#define GLOB_CTRL_BMODE   0x10000000 /* BigMAC qec mode */
 
#define GLOB_CTRL_EPAR   0x00000020 /* Enable parity */
 
#define GLOB_CTRL_ACNTRL   0x00000018 /* SBUS arbitration control */
 
#define GLOB_CTRL_B64   0x00000004 /* 64 byte dvma bursts */
 
#define GLOB_CTRL_B32   0x00000002 /* 32 byte dvma bursts */
 
#define GLOB_CTRL_B16   0x00000000 /* 16 byte dvma bursts */
 
#define GLOB_CTRL_RESET   0x00000001 /* Reset the QEC */
 
#define GLOB_STAT_TX   0x00000008 /* BigMAC Transmit IRQ */
 
#define GLOB_STAT_RX   0x00000004 /* BigMAC Receive IRQ */
 
#define GLOB_STAT_BM   0x00000002 /* BigMAC Global IRQ */
 
#define GLOB_STAT_ER   0x00000001 /* BigMAC Error IRQ */
 
#define GLOB_PSIZE_2048   0x00 /* 2k packet size */
 
#define GLOB_PSIZE_4096   0x01 /* 4k packet size */
 
#define GLOB_PSIZE_6144   0x10 /* 6k packet size */
 
#define GLOB_PSIZE_8192   0x11 /* 8k packet size */
 
#define CREG_CTRL   0x00UL /* Control */
 
#define CREG_STAT   0x04UL /* Status */
 
#define CREG_RXDS   0x08UL /* RX descriptor ring ptr */
 
#define CREG_TXDS   0x0cUL /* TX descriptor ring ptr */
 
#define CREG_RIMASK   0x10UL /* RX Interrupt Mask */
 
#define CREG_TIMASK   0x14UL /* TX Interrupt Mask */
 
#define CREG_QMASK   0x18UL /* QEC Error Interrupt Mask */
 
#define CREG_BMASK   0x1cUL /* BigMAC Error Interrupt Mask*/
 
#define CREG_RXWBUFPTR   0x20UL /* Local memory rx write ptr */
 
#define CREG_RXRBUFPTR   0x24UL /* Local memory rx read ptr */
 
#define CREG_TXWBUFPTR   0x28UL /* Local memory tx write ptr */
 
#define CREG_TXRBUFPTR   0x2cUL /* Local memory tx read ptr */
 
#define CREG_CCNT   0x30UL /* Collision Counter */
 
#define CREG_REG_SIZE   0x34UL
 
#define CREG_CTRL_TWAKEUP   0x00000001 /* Transmitter Wakeup, 'go'. */
 
#define CREG_STAT_BERROR   0x80000000 /* BigMAC error */
 
#define CREG_STAT_TXIRQ   0x00200000 /* Transmit Interrupt */
 
#define CREG_STAT_TXDERROR   0x00080000 /* TX Descriptor is bogus */
 
#define CREG_STAT_TXLERR   0x00040000 /* Late Transmit Error */
 
#define CREG_STAT_TXPERR   0x00020000 /* Transmit Parity Error */
 
#define CREG_STAT_TXSERR   0x00010000 /* Transmit SBUS error ack */
 
#define CREG_STAT_RXIRQ   0x00000020 /* Receive Interrupt */
 
#define CREG_STAT_RXDROP   0x00000010 /* Dropped a RX'd packet */
 
#define CREG_STAT_RXSMALL   0x00000008 /* Receive buffer too small */
 
#define CREG_STAT_RXLERR   0x00000004 /* Receive Late Error */
 
#define CREG_STAT_RXPERR   0x00000002 /* Receive Parity Error */
 
#define CREG_STAT_RXSERR   0x00000001 /* Receive SBUS Error ACK */
 
#define CREG_STAT_ERRORS
 
#define CREG_QMASK_TXDERROR   0x00080000 /* TXD error */
 
#define CREG_QMASK_TXLERR   0x00040000 /* TX late error */
 
#define CREG_QMASK_TXPERR   0x00020000 /* TX parity error */
 
#define CREG_QMASK_TXSERR   0x00010000 /* TX sbus error ack */
 
#define CREG_QMASK_RXDROP   0x00000010 /* RX drop */
 
#define CREG_QMASK_RXBERROR   0x00000008 /* RX buffer error */
 
#define CREG_QMASK_RXLEERR   0x00000004 /* RX late error */
 
#define CREG_QMASK_RXPERR   0x00000002 /* RX parity error */
 
#define CREG_QMASK_RXSERR   0x00000001 /* RX sbus error ack */
 
#define BMAC_XIFCFG   0x000UL /* XIF config register */
 
#define BMAC_STATUS   0x100UL /* Status register, clear on read */
 
#define BMAC_IMASK   0x104UL /* Interrupt mask register */
 
#define BMAC_TXSWRESET   0x208UL /* Transmitter software reset */
 
#define BMAC_TXCFG   0x20cUL /* Transmitter config register */
 
#define BMAC_IGAP1   0x210UL /* Inter-packet gap 1 */
 
#define BMAC_IGAP2   0x214UL /* Inter-packet gap 2 */
 
#define BMAC_ALIMIT   0x218UL /* Transmit attempt limit */
 
#define BMAC_STIME   0x21cUL /* Transmit slot time */
 
#define BMAC_PLEN   0x220UL /* Size of transmit preamble */
 
#define BMAC_PPAT   0x224UL /* Pattern for transmit preamble */
 
#define BMAC_TXDELIM   0x228UL /* Transmit delimiter */
 
#define BMAC_JSIZE   0x22cUL /* Toe jam... */
 
#define BMAC_TXPMAX   0x230UL /* Transmit max pkt size */
 
#define BMAC_TXPMIN   0x234UL /* Transmit min pkt size */
 
#define BMAC_PATTEMPT   0x238UL /* Count of transmit peak attempts */
 
#define BMAC_DTCTR   0x23cUL /* Transmit defer timer */
 
#define BMAC_NCCTR   0x240UL /* Transmit normal-collision counter */
 
#define BMAC_FCCTR   0x244UL /* Transmit first-collision counter */
 
#define BMAC_EXCTR   0x248UL /* Transmit excess-collision counter */
 
#define BMAC_LTCTR   0x24cUL /* Transmit late-collision counter */
 
#define BMAC_RSEED   0x250UL /* Transmit random number seed */
 
#define BMAC_TXSMACHINE   0x254UL /* Transmit state machine */
 
#define BMAC_RXSWRESET   0x308UL /* Receiver software reset */
 
#define BMAC_RXCFG   0x30cUL /* Receiver config register */
 
#define BMAC_RXPMAX   0x310UL /* Receive max pkt size */
 
#define BMAC_RXPMIN   0x314UL /* Receive min pkt size */
 
#define BMAC_MACADDR2   0x318UL /* Ether address register 2 */
 
#define BMAC_MACADDR1   0x31cUL /* Ether address register 1 */
 
#define BMAC_MACADDR0   0x320UL /* Ether address register 0 */
 
#define BMAC_FRCTR   0x324UL /* Receive frame receive counter */
 
#define BMAC_GLECTR   0x328UL /* Receive giant-length error counter */
 
#define BMAC_UNALECTR   0x32cUL /* Receive unaligned error counter */
 
#define BMAC_RCRCECTR   0x330UL /* Receive CRC error counter */
 
#define BMAC_RXSMACHINE   0x334UL /* Receiver state machine */
 
#define BMAC_RXCVALID   0x338UL /* Receiver code violation */
 
#define BMAC_HTABLE3   0x340UL /* Hash table 3 */
 
#define BMAC_HTABLE2   0x344UL /* Hash table 2 */
 
#define BMAC_HTABLE1   0x348UL /* Hash table 1 */
 
#define BMAC_HTABLE0   0x34cUL /* Hash table 0 */
 
#define BMAC_AFILTER2   0x350UL /* Address filter 2 */
 
#define BMAC_AFILTER1   0x354UL /* Address filter 1 */
 
#define BMAC_AFILTER0   0x358UL /* Address filter 0 */
 
#define BMAC_AFMASK   0x35cUL /* Address filter mask */
 
#define BMAC_REG_SIZE   0x360UL
 
#define BIGMAC_XCFG_ODENABLE   0x00000001 /* Output driver enable */
 
#define BIGMAC_XCFG_RESV   0x00000002 /* Reserved, write always as 1 */
 
#define BIGMAC_XCFG_MLBACK   0x00000004 /* Loopback-mode MII enable */
 
#define BIGMAC_XCFG_SMODE   0x00000008 /* Enable serial mode */
 
#define BIGMAC_STAT_GOTFRAME   0x00000001 /* Received a frame */
 
#define BIGMAC_STAT_RCNTEXP   0x00000002 /* Receive frame counter expired */
 
#define BIGMAC_STAT_ACNTEXP   0x00000004 /* Align-error counter expired */
 
#define BIGMAC_STAT_CCNTEXP   0x00000008 /* CRC-error counter expired */
 
#define BIGMAC_STAT_LCNTEXP   0x00000010 /* Length-error counter expired */
 
#define BIGMAC_STAT_RFIFOVF   0x00000020 /* Receive FIFO overflow */
 
#define BIGMAC_STAT_CVCNTEXP   0x00000040 /* Code-violation counter expired */
 
#define BIGMAC_STAT_SENTFRAME   0x00000100 /* Transmitted a frame */
 
#define BIGMAC_STAT_TFIFO_UND   0x00000200 /* Transmit FIFO underrun */
 
#define BIGMAC_STAT_MAXPKTERR   0x00000400 /* Max-packet size error */
 
#define BIGMAC_STAT_NCNTEXP   0x00000800 /* Normal-collision counter expired */
 
#define BIGMAC_STAT_ECNTEXP   0x00001000 /* Excess-collision counter expired */
 
#define BIGMAC_STAT_LCCNTEXP   0x00002000 /* Late-collision counter expired */
 
#define BIGMAC_STAT_FCNTEXP   0x00004000 /* First-collision counter expired */
 
#define BIGMAC_STAT_DTIMEXP   0x00008000 /* Defer-timer expired */
 
#define BIGMAC_IMASK_GOTFRAME   0x00000001 /* Received a frame */
 
#define BIGMAC_IMASK_RCNTEXP   0x00000002 /* Receive frame counter expired */
 
#define BIGMAC_IMASK_ACNTEXP   0x00000004 /* Align-error counter expired */
 
#define BIGMAC_IMASK_CCNTEXP   0x00000008 /* CRC-error counter expired */
 
#define BIGMAC_IMASK_LCNTEXP   0x00000010 /* Length-error counter expired */
 
#define BIGMAC_IMASK_RFIFOVF   0x00000020 /* Receive FIFO overflow */
 
#define BIGMAC_IMASK_CVCNTEXP   0x00000040 /* Code-violation counter expired */
 
#define BIGMAC_IMASK_SENTFRAME   0x00000100 /* Transmitted a frame */
 
#define BIGMAC_IMASK_TFIFO_UND   0x00000200 /* Transmit FIFO underrun */
 
#define BIGMAC_IMASK_MAXPKTERR   0x00000400 /* Max-packet size error */
 
#define BIGMAC_IMASK_NCNTEXP   0x00000800 /* Normal-collision counter expired */
 
#define BIGMAC_IMASK_ECNTEXP   0x00001000 /* Excess-collision counter expired */
 
#define BIGMAC_IMASK_LCCNTEXP   0x00002000 /* Late-collision counter expired */
 
#define BIGMAC_IMASK_FCNTEXP   0x00004000 /* First-collision counter expired */
 
#define BIGMAC_IMASK_DTIMEXP   0x00008000 /* Defer-timer expired */
 
#define BIGMAC_TXCFG_ENABLE   0x00000001 /* Enable the transmitter */
 
#define BIGMAC_TXCFG_FIFO   0x00000010 /* Default tx fthresh... */
 
#define BIGMAC_TXCFG_SMODE   0x00000020 /* Enable slow transmit mode */
 
#define BIGMAC_TXCFG_CIGN   0x00000040 /* Ignore transmit collisions */
 
#define BIGMAC_TXCFG_FCSOFF   0x00000080 /* Do not emit FCS */
 
#define BIGMAC_TXCFG_DBACKOFF   0x00000100 /* Disable backoff */
 
#define BIGMAC_TXCFG_FULLDPLX   0x00000200 /* Enable full-duplex */
 
#define BIGMAC_RXCFG_ENABLE   0x00000001 /* Enable the receiver */
 
#define BIGMAC_RXCFG_FIFO   0x0000000e /* Default rx fthresh... */
 
#define BIGMAC_RXCFG_PSTRIP   0x00000020 /* Pad byte strip enable */
 
#define BIGMAC_RXCFG_PMISC   0x00000040 /* Enable promiscuous mode */
 
#define BIGMAC_RXCFG_DERR   0x00000080 /* Disable error checking */
 
#define BIGMAC_RXCFG_DCRCS   0x00000100 /* Disable CRC stripping */
 
#define BIGMAC_RXCFG_ME   0x00000200 /* Receive packets addressed to me */
 
#define BIGMAC_RXCFG_PGRP   0x00000400 /* Enable promisc group mode */
 
#define BIGMAC_RXCFG_HENABLE   0x00000800 /* Enable the hash filter */
 
#define BIGMAC_RXCFG_AENABLE   0x00001000 /* Enable the address filter */
 
#define TCVR_TPAL   0x00UL
 
#define TCVR_MPAL   0x04UL
 
#define TCVR_REG_SIZE   0x08UL
 
#define FRAME_WRITE   0x50020000
 
#define FRAME_READ   0x60020000
 
#define TCVR_PAL_SERIAL   0x00000001 /* Enable serial mode */
 
#define TCVR_PAL_EXTLBACK   0x00000002 /* Enable external loopback */
 
#define TCVR_PAL_MSENSE   0x00000004 /* Media sense */
 
#define TCVR_PAL_LTENABLE   0x00000008 /* Link test enable */
 
#define TCVR_PAL_LTSTATUS   0x00000010 /* Link test status (P1 only) */
 
#define MGMT_PAL_DCLOCK   0x00000001 /* Data clock */
 
#define MGMT_PAL_OENAB   0x00000002 /* Output enabler */
 
#define MGMT_PAL_MDIO   0x00000004 /* MDIO Data/attached */
 
#define MGMT_PAL_TIMEO   0x00000008 /* Transmit enable timeout error */
 
#define MGMT_PAL_EXT_MDIO   MGMT_PAL_MDIO
 
#define MGMT_PAL_INT_MDIO   MGMT_PAL_TIMEO
 
#define BIGMAC_PHY_EXTERNAL   0 /* External transceiver */
 
#define BIGMAC_PHY_INTERNAL   1 /* Internal transceiver */
 
#define RXD_OWN   0x80000000 /* Ownership. */
 
#define RXD_UPDATE   0x10000000 /* Being Updated? */
 
#define RXD_LENGTH   0x000007ff /* Packet Length. */
 
#define TXD_OWN   0x80000000 /* Ownership. */
 
#define TXD_SOP   0x40000000 /* Start Of Packet */
 
#define TXD_EOP   0x20000000 /* End Of Packet */
 
#define TXD_UPDATE   0x10000000 /* Being Updated? */
 
#define TXD_LENGTH   0x000007ff /* Packet Length. */
 
#define TX_RING_MAXSIZE   256
 
#define RX_RING_MAXSIZE   256
 
#define TX_RING_SIZE   256
 
#define RX_RING_SIZE   256
 
#define NEXT_RX(num)   (((num) + 1) & (RX_RING_SIZE - 1))
 
#define NEXT_TX(num)   (((num) + 1) & (TX_RING_SIZE - 1))
 
#define PREV_RX(num)   (((num) - 1) & (RX_RING_SIZE - 1))
 
#define PREV_TX(num)   (((num) - 1) & (TX_RING_SIZE - 1))
 
#define TX_BUFFS_AVAIL(bp)
 
#define RX_COPY_THRESHOLD   256
 
#define RX_BUF_ALLOC_SIZE   (ETH_FRAME_LEN + (64 * 3))
 
#define bib_offset(mem, elem)   ((__u32)((unsigned long)(&(((struct bmac_init_block *)0)->mem[elem]))))
 
#define ALIGNED_RX_SKB_ADDR(addr)   ((((unsigned long)(addr) + (64 - 1)) & ~(64 - 1)) - (unsigned long)(addr))
 

Enumerations

enum  bigmac_transceiver { external = 0, internal = 1, none = 2 }
 
enum  bigmac_timer_state { ltrywait = 1, asleep = 2 }
 

Macro Definition Documentation

#define ALIGNED_RX_SKB_ADDR (   addr)    ((((unsigned long)(addr) + (64 - 1)) & ~(64 - 1)) - (unsigned long)(addr))

Definition at line 321 of file sunbmac.h.

#define bib_offset (   mem,
  elem 
)    ((__u32)((unsigned long)(&(((struct bmac_init_block *)0)->mem[elem]))))

Definition at line 272 of file sunbmac.h.

#define BIGMAC_IMASK_ACNTEXP   0x00000004 /* Align-error counter expired */

Definition at line 161 of file sunbmac.h.

#define BIGMAC_IMASK_CCNTEXP   0x00000008 /* CRC-error counter expired */

Definition at line 162 of file sunbmac.h.

#define BIGMAC_IMASK_CVCNTEXP   0x00000040 /* Code-violation counter expired */

Definition at line 165 of file sunbmac.h.

#define BIGMAC_IMASK_DTIMEXP   0x00008000 /* Defer-timer expired */

Definition at line 173 of file sunbmac.h.

#define BIGMAC_IMASK_ECNTEXP   0x00001000 /* Excess-collision counter expired */

Definition at line 170 of file sunbmac.h.

#define BIGMAC_IMASK_FCNTEXP   0x00004000 /* First-collision counter expired */

Definition at line 172 of file sunbmac.h.

#define BIGMAC_IMASK_GOTFRAME   0x00000001 /* Received a frame */

Definition at line 159 of file sunbmac.h.

#define BIGMAC_IMASK_LCCNTEXP   0x00002000 /* Late-collision counter expired */

Definition at line 171 of file sunbmac.h.

#define BIGMAC_IMASK_LCNTEXP   0x00000010 /* Length-error counter expired */

Definition at line 163 of file sunbmac.h.

#define BIGMAC_IMASK_MAXPKTERR   0x00000400 /* Max-packet size error */

Definition at line 168 of file sunbmac.h.

#define BIGMAC_IMASK_NCNTEXP   0x00000800 /* Normal-collision counter expired */

Definition at line 169 of file sunbmac.h.

#define BIGMAC_IMASK_RCNTEXP   0x00000002 /* Receive frame counter expired */

Definition at line 160 of file sunbmac.h.

#define BIGMAC_IMASK_RFIFOVF   0x00000020 /* Receive FIFO overflow */

Definition at line 164 of file sunbmac.h.

#define BIGMAC_IMASK_SENTFRAME   0x00000100 /* Transmitted a frame */

Definition at line 166 of file sunbmac.h.

#define BIGMAC_IMASK_TFIFO_UND   0x00000200 /* Transmit FIFO underrun */

Definition at line 167 of file sunbmac.h.

#define BIGMAC_PHY_EXTERNAL   0 /* External transceiver */

Definition at line 223 of file sunbmac.h.

#define BIGMAC_PHY_INTERNAL   1 /* Internal transceiver */

Definition at line 224 of file sunbmac.h.

#define BIGMAC_RXCFG_AENABLE   0x00001000 /* Enable the address filter */

Definition at line 194 of file sunbmac.h.

#define BIGMAC_RXCFG_DCRCS   0x00000100 /* Disable CRC stripping */

Definition at line 190 of file sunbmac.h.

#define BIGMAC_RXCFG_DERR   0x00000080 /* Disable error checking */

Definition at line 189 of file sunbmac.h.

#define BIGMAC_RXCFG_ENABLE   0x00000001 /* Enable the receiver */

Definition at line 185 of file sunbmac.h.

#define BIGMAC_RXCFG_FIFO   0x0000000e /* Default rx fthresh... */

Definition at line 186 of file sunbmac.h.

#define BIGMAC_RXCFG_HENABLE   0x00000800 /* Enable the hash filter */

Definition at line 193 of file sunbmac.h.

#define BIGMAC_RXCFG_ME   0x00000200 /* Receive packets addressed to me */

Definition at line 191 of file sunbmac.h.

#define BIGMAC_RXCFG_PGRP   0x00000400 /* Enable promisc group mode */

Definition at line 192 of file sunbmac.h.

#define BIGMAC_RXCFG_PMISC   0x00000040 /* Enable promiscuous mode */

Definition at line 188 of file sunbmac.h.

#define BIGMAC_RXCFG_PSTRIP   0x00000020 /* Pad byte strip enable */

Definition at line 187 of file sunbmac.h.

#define BIGMAC_STAT_ACNTEXP   0x00000004 /* Align-error counter expired */

Definition at line 144 of file sunbmac.h.

#define BIGMAC_STAT_CCNTEXP   0x00000008 /* CRC-error counter expired */

Definition at line 145 of file sunbmac.h.

#define BIGMAC_STAT_CVCNTEXP   0x00000040 /* Code-violation counter expired */

Definition at line 148 of file sunbmac.h.

#define BIGMAC_STAT_DTIMEXP   0x00008000 /* Defer-timer expired */

Definition at line 156 of file sunbmac.h.

#define BIGMAC_STAT_ECNTEXP   0x00001000 /* Excess-collision counter expired */

Definition at line 153 of file sunbmac.h.

#define BIGMAC_STAT_FCNTEXP   0x00004000 /* First-collision counter expired */

Definition at line 155 of file sunbmac.h.

#define BIGMAC_STAT_GOTFRAME   0x00000001 /* Received a frame */

Definition at line 142 of file sunbmac.h.

#define BIGMAC_STAT_LCCNTEXP   0x00002000 /* Late-collision counter expired */

Definition at line 154 of file sunbmac.h.

#define BIGMAC_STAT_LCNTEXP   0x00000010 /* Length-error counter expired */

Definition at line 146 of file sunbmac.h.

#define BIGMAC_STAT_MAXPKTERR   0x00000400 /* Max-packet size error */

Definition at line 151 of file sunbmac.h.

#define BIGMAC_STAT_NCNTEXP   0x00000800 /* Normal-collision counter expired */

Definition at line 152 of file sunbmac.h.

#define BIGMAC_STAT_RCNTEXP   0x00000002 /* Receive frame counter expired */

Definition at line 143 of file sunbmac.h.

#define BIGMAC_STAT_RFIFOVF   0x00000020 /* Receive FIFO overflow */

Definition at line 147 of file sunbmac.h.

#define BIGMAC_STAT_SENTFRAME   0x00000100 /* Transmitted a frame */

Definition at line 149 of file sunbmac.h.

#define BIGMAC_STAT_TFIFO_UND   0x00000200 /* Transmit FIFO underrun */

Definition at line 150 of file sunbmac.h.

#define BIGMAC_TXCFG_CIGN   0x00000040 /* Ignore transmit collisions */

Definition at line 179 of file sunbmac.h.

#define BIGMAC_TXCFG_DBACKOFF   0x00000100 /* Disable backoff */

Definition at line 181 of file sunbmac.h.

#define BIGMAC_TXCFG_ENABLE   0x00000001 /* Enable the transmitter */

Definition at line 176 of file sunbmac.h.

#define BIGMAC_TXCFG_FCSOFF   0x00000080 /* Do not emit FCS */

Definition at line 180 of file sunbmac.h.

#define BIGMAC_TXCFG_FIFO   0x00000010 /* Default tx fthresh... */

Definition at line 177 of file sunbmac.h.

#define BIGMAC_TXCFG_FULLDPLX   0x00000200 /* Enable full-duplex */

Definition at line 182 of file sunbmac.h.

#define BIGMAC_TXCFG_SMODE   0x00000020 /* Enable slow transmit mode */

Definition at line 178 of file sunbmac.h.

#define BIGMAC_XCFG_MLBACK   0x00000004 /* Loopback-mode MII enable */

Definition at line 138 of file sunbmac.h.

#define BIGMAC_XCFG_ODENABLE   0x00000001 /* Output driver enable */

Definition at line 136 of file sunbmac.h.

#define BIGMAC_XCFG_RESV   0x00000002 /* Reserved, write always as 1 */

Definition at line 137 of file sunbmac.h.

#define BIGMAC_XCFG_SMODE   0x00000008 /* Enable serial mode */

Definition at line 139 of file sunbmac.h.

#define BMAC_AFILTER0   0x358UL /* Address filter 0 */

Definition at line 131 of file sunbmac.h.

#define BMAC_AFILTER1   0x354UL /* Address filter 1 */

Definition at line 130 of file sunbmac.h.

#define BMAC_AFILTER2   0x350UL /* Address filter 2 */

Definition at line 129 of file sunbmac.h.

#define BMAC_AFMASK   0x35cUL /* Address filter mask */

Definition at line 132 of file sunbmac.h.

#define BMAC_ALIMIT   0x218UL /* Transmit attempt limit */

Definition at line 94 of file sunbmac.h.

#define BMAC_DTCTR   0x23cUL /* Transmit defer timer */

Definition at line 103 of file sunbmac.h.

#define BMAC_EXCTR   0x248UL /* Transmit excess-collision counter */

Definition at line 106 of file sunbmac.h.

#define BMAC_FCCTR   0x244UL /* Transmit first-collision counter */

Definition at line 105 of file sunbmac.h.

#define BMAC_FRCTR   0x324UL /* Receive frame receive counter */

Definition at line 118 of file sunbmac.h.

#define BMAC_GLECTR   0x328UL /* Receive giant-length error counter */

Definition at line 119 of file sunbmac.h.

#define BMAC_HTABLE0   0x34cUL /* Hash table 0 */

Definition at line 128 of file sunbmac.h.

#define BMAC_HTABLE1   0x348UL /* Hash table 1 */

Definition at line 127 of file sunbmac.h.

#define BMAC_HTABLE2   0x344UL /* Hash table 2 */

Definition at line 126 of file sunbmac.h.

#define BMAC_HTABLE3   0x340UL /* Hash table 3 */

Definition at line 125 of file sunbmac.h.

#define BMAC_IGAP1   0x210UL /* Inter-packet gap 1 */

Definition at line 92 of file sunbmac.h.

#define BMAC_IGAP2   0x214UL /* Inter-packet gap 2 */

Definition at line 93 of file sunbmac.h.

#define BMAC_IMASK   0x104UL /* Interrupt mask register */

Definition at line 88 of file sunbmac.h.

#define BMAC_JSIZE   0x22cUL /* Toe jam... */

Definition at line 99 of file sunbmac.h.

#define BMAC_LTCTR   0x24cUL /* Transmit late-collision counter */

Definition at line 107 of file sunbmac.h.

#define BMAC_MACADDR0   0x320UL /* Ether address register 0 */

Definition at line 117 of file sunbmac.h.

#define BMAC_MACADDR1   0x31cUL /* Ether address register 1 */

Definition at line 116 of file sunbmac.h.

#define BMAC_MACADDR2   0x318UL /* Ether address register 2 */

Definition at line 115 of file sunbmac.h.

#define BMAC_NCCTR   0x240UL /* Transmit normal-collision counter */

Definition at line 104 of file sunbmac.h.

#define BMAC_PATTEMPT   0x238UL /* Count of transmit peak attempts */

Definition at line 102 of file sunbmac.h.

#define BMAC_PLEN   0x220UL /* Size of transmit preamble */

Definition at line 96 of file sunbmac.h.

#define BMAC_PPAT   0x224UL /* Pattern for transmit preamble */

Definition at line 97 of file sunbmac.h.

#define BMAC_RCRCECTR   0x330UL /* Receive CRC error counter */

Definition at line 121 of file sunbmac.h.

#define BMAC_REG_SIZE   0x360UL

Definition at line 133 of file sunbmac.h.

#define BMAC_RSEED   0x250UL /* Transmit random number seed */

Definition at line 108 of file sunbmac.h.

#define BMAC_RXCFG   0x30cUL /* Receiver config register */

Definition at line 112 of file sunbmac.h.

#define BMAC_RXCVALID   0x338UL /* Receiver code violation */

Definition at line 123 of file sunbmac.h.

#define BMAC_RXPMAX   0x310UL /* Receive max pkt size */

Definition at line 113 of file sunbmac.h.

#define BMAC_RXPMIN   0x314UL /* Receive min pkt size */

Definition at line 114 of file sunbmac.h.

#define BMAC_RXSMACHINE   0x334UL /* Receiver state machine */

Definition at line 122 of file sunbmac.h.

#define BMAC_RXSWRESET   0x308UL /* Receiver software reset */

Definition at line 111 of file sunbmac.h.

#define BMAC_STATUS   0x100UL /* Status register, clear on read */

Definition at line 87 of file sunbmac.h.

#define BMAC_STIME   0x21cUL /* Transmit slot time */

Definition at line 95 of file sunbmac.h.

#define BMAC_TXCFG   0x20cUL /* Transmitter config register */

Definition at line 91 of file sunbmac.h.

#define BMAC_TXDELIM   0x228UL /* Transmit delimiter */

Definition at line 98 of file sunbmac.h.

#define BMAC_TXPMAX   0x230UL /* Transmit max pkt size */

Definition at line 100 of file sunbmac.h.

#define BMAC_TXPMIN   0x234UL /* Transmit min pkt size */

Definition at line 101 of file sunbmac.h.

#define BMAC_TXSMACHINE   0x254UL /* Transmit state machine */

Definition at line 109 of file sunbmac.h.

#define BMAC_TXSWRESET   0x208UL /* Transmitter software reset */

Definition at line 90 of file sunbmac.h.

#define BMAC_UNALECTR   0x32cUL /* Receive unaligned error counter */

Definition at line 120 of file sunbmac.h.

#define BMAC_XIFCFG   0x000UL /* XIF config register */

Definition at line 85 of file sunbmac.h.

#define CREG_BMASK   0x1cUL /* BigMAC Error Interrupt Mask*/

Definition at line 46 of file sunbmac.h.

#define CREG_CCNT   0x30UL /* Collision Counter */

Definition at line 51 of file sunbmac.h.

#define CREG_CTRL   0x00UL /* Control */

Definition at line 39 of file sunbmac.h.

#define CREG_CTRL_TWAKEUP   0x00000001 /* Transmitter Wakeup, 'go'. */

Definition at line 54 of file sunbmac.h.

#define CREG_QMASK   0x18UL /* QEC Error Interrupt Mask */

Definition at line 45 of file sunbmac.h.

#define CREG_QMASK_RXBERROR   0x00000008 /* RX buffer error */

Definition at line 79 of file sunbmac.h.

#define CREG_QMASK_RXDROP   0x00000010 /* RX drop */

Definition at line 78 of file sunbmac.h.

#define CREG_QMASK_RXLEERR   0x00000004 /* RX late error */

Definition at line 80 of file sunbmac.h.

#define CREG_QMASK_RXPERR   0x00000002 /* RX parity error */

Definition at line 81 of file sunbmac.h.

#define CREG_QMASK_RXSERR   0x00000001 /* RX sbus error ack */

Definition at line 82 of file sunbmac.h.

#define CREG_QMASK_TXDERROR   0x00080000 /* TXD error */

Definition at line 74 of file sunbmac.h.

#define CREG_QMASK_TXLERR   0x00040000 /* TX late error */

Definition at line 75 of file sunbmac.h.

#define CREG_QMASK_TXPERR   0x00020000 /* TX parity error */

Definition at line 76 of file sunbmac.h.

#define CREG_QMASK_TXSERR   0x00010000 /* TX sbus error ack */

Definition at line 77 of file sunbmac.h.

#define CREG_REG_SIZE   0x34UL

Definition at line 52 of file sunbmac.h.

#define CREG_RIMASK   0x10UL /* RX Interrupt Mask */

Definition at line 43 of file sunbmac.h.

#define CREG_RXDS   0x08UL /* RX descriptor ring ptr */

Definition at line 41 of file sunbmac.h.

#define CREG_RXRBUFPTR   0x24UL /* Local memory rx read ptr */

Definition at line 48 of file sunbmac.h.

#define CREG_RXWBUFPTR   0x20UL /* Local memory rx write ptr */

Definition at line 47 of file sunbmac.h.

#define CREG_STAT   0x04UL /* Status */

Definition at line 40 of file sunbmac.h.

#define CREG_STAT_BERROR   0x80000000 /* BigMAC error */

Definition at line 56 of file sunbmac.h.

#define CREG_STAT_ERRORS
Value:

Definition at line 69 of file sunbmac.h.

#define CREG_STAT_RXDROP   0x00000010 /* Dropped a RX'd packet */

Definition at line 63 of file sunbmac.h.

#define CREG_STAT_RXIRQ   0x00000020 /* Receive Interrupt */

Definition at line 62 of file sunbmac.h.

#define CREG_STAT_RXLERR   0x00000004 /* Receive Late Error */

Definition at line 65 of file sunbmac.h.

#define CREG_STAT_RXPERR   0x00000002 /* Receive Parity Error */

Definition at line 66 of file sunbmac.h.

#define CREG_STAT_RXSERR   0x00000001 /* Receive SBUS Error ACK */

Definition at line 67 of file sunbmac.h.

#define CREG_STAT_RXSMALL   0x00000008 /* Receive buffer too small */

Definition at line 64 of file sunbmac.h.

#define CREG_STAT_TXDERROR   0x00080000 /* TX Descriptor is bogus */

Definition at line 58 of file sunbmac.h.

#define CREG_STAT_TXIRQ   0x00200000 /* Transmit Interrupt */

Definition at line 57 of file sunbmac.h.

#define CREG_STAT_TXLERR   0x00040000 /* Late Transmit Error */

Definition at line 59 of file sunbmac.h.

#define CREG_STAT_TXPERR   0x00020000 /* Transmit Parity Error */

Definition at line 60 of file sunbmac.h.

#define CREG_STAT_TXSERR   0x00010000 /* Transmit SBUS error ack */

Definition at line 61 of file sunbmac.h.

#define CREG_TIMASK   0x14UL /* TX Interrupt Mask */

Definition at line 44 of file sunbmac.h.

#define CREG_TXDS   0x0cUL /* TX descriptor ring ptr */

Definition at line 42 of file sunbmac.h.

#define CREG_TXRBUFPTR   0x2cUL /* Local memory tx read ptr */

Definition at line 50 of file sunbmac.h.

#define CREG_TXWBUFPTR   0x28UL /* Local memory tx write ptr */

Definition at line 49 of file sunbmac.h.

#define FRAME_READ   0x60020000

Definition at line 205 of file sunbmac.h.

#define FRAME_WRITE   0x50020000

Definition at line 204 of file sunbmac.h.

#define GLOB_CTRL   0x00UL /* Control */

Definition at line 11 of file sunbmac.h.

#define GLOB_CTRL_ACNTRL   0x00000018 /* SBUS arbitration control */

Definition at line 22 of file sunbmac.h.

#define GLOB_CTRL_B16   0x00000000 /* 16 byte dvma bursts */

Definition at line 25 of file sunbmac.h.

#define GLOB_CTRL_B32   0x00000002 /* 32 byte dvma bursts */

Definition at line 24 of file sunbmac.h.

#define GLOB_CTRL_B64   0x00000004 /* 64 byte dvma bursts */

Definition at line 23 of file sunbmac.h.

#define GLOB_CTRL_BMODE   0x10000000 /* BigMAC qec mode */

Definition at line 20 of file sunbmac.h.

#define GLOB_CTRL_EPAR   0x00000020 /* Enable parity */

Definition at line 21 of file sunbmac.h.

#define GLOB_CTRL_MMODE   0x40000000 /* MACE qec mode */

Definition at line 19 of file sunbmac.h.

#define GLOB_CTRL_RESET   0x00000001 /* Reset the QEC */

Definition at line 26 of file sunbmac.h.

#define GLOB_MSIZE   0x0cUL /* Local-mem size (64K) */

Definition at line 14 of file sunbmac.h.

#define GLOB_PSIZE   0x08UL /* Packet Size */

Definition at line 13 of file sunbmac.h.

#define GLOB_PSIZE_2048   0x00 /* 2k packet size */

Definition at line 33 of file sunbmac.h.

#define GLOB_PSIZE_4096   0x01 /* 4k packet size */

Definition at line 34 of file sunbmac.h.

#define GLOB_PSIZE_6144   0x10 /* 6k packet size */

Definition at line 35 of file sunbmac.h.

#define GLOB_PSIZE_8192   0x11 /* 8k packet size */

Definition at line 36 of file sunbmac.h.

#define GLOB_REG_SIZE   0x18UL

Definition at line 17 of file sunbmac.h.

#define GLOB_RSIZE   0x10UL /* Receive partition size */

Definition at line 15 of file sunbmac.h.

#define GLOB_STAT   0x04UL /* Status */

Definition at line 12 of file sunbmac.h.

#define GLOB_STAT_BM   0x00000002 /* BigMAC Global IRQ */

Definition at line 30 of file sunbmac.h.

#define GLOB_STAT_ER   0x00000001 /* BigMAC Error IRQ */

Definition at line 31 of file sunbmac.h.

#define GLOB_STAT_RX   0x00000004 /* BigMAC Receive IRQ */

Definition at line 29 of file sunbmac.h.

#define GLOB_STAT_TX   0x00000008 /* BigMAC Transmit IRQ */

Definition at line 28 of file sunbmac.h.

#define GLOB_TSIZE   0x14UL /* Transmit partition size */

Definition at line 16 of file sunbmac.h.

#define MGMT_PAL_DCLOCK   0x00000001 /* Data clock */

Definition at line 215 of file sunbmac.h.

#define MGMT_PAL_EXT_MDIO   MGMT_PAL_MDIO

Definition at line 219 of file sunbmac.h.

#define MGMT_PAL_INT_MDIO   MGMT_PAL_TIMEO

Definition at line 220 of file sunbmac.h.

#define MGMT_PAL_MDIO   0x00000004 /* MDIO Data/attached */

Definition at line 217 of file sunbmac.h.

#define MGMT_PAL_OENAB   0x00000002 /* Output enabler */

Definition at line 216 of file sunbmac.h.

#define MGMT_PAL_TIMEO   0x00000008 /* Transmit enable timeout error */

Definition at line 218 of file sunbmac.h.

#define NEXT_RX (   num)    (((num) + 1) & (RX_RING_SIZE - 1))

Definition at line 253 of file sunbmac.h.

#define NEXT_TX (   num)    (((num) + 1) & (TX_RING_SIZE - 1))

Definition at line 254 of file sunbmac.h.

#define PREV_RX (   num)    (((num) - 1) & (RX_RING_SIZE - 1))

Definition at line 255 of file sunbmac.h.

#define PREV_TX (   num)    (((num) - 1) & (TX_RING_SIZE - 1))

Definition at line 256 of file sunbmac.h.

#define RX_BUF_ALLOC_SIZE   (ETH_FRAME_LEN + (64 * 3))

Definition at line 265 of file sunbmac.h.

#define RX_COPY_THRESHOLD   256

Definition at line 264 of file sunbmac.h.

#define RX_RING_MAXSIZE   256

Definition at line 248 of file sunbmac.h.

#define RX_RING_SIZE   256

Definition at line 251 of file sunbmac.h.

#define RXD_LENGTH   0x000007ff /* Packet Length. */

Definition at line 234 of file sunbmac.h.

#define RXD_OWN   0x80000000 /* Ownership. */

Definition at line 232 of file sunbmac.h.

#define RXD_UPDATE   0x10000000 /* Being Updated? */

Definition at line 233 of file sunbmac.h.

#define TCVR_MPAL   0x04UL

Definition at line 200 of file sunbmac.h.

#define TCVR_PAL_EXTLBACK   0x00000002 /* Enable external loopback */

Definition at line 209 of file sunbmac.h.

#define TCVR_PAL_LTENABLE   0x00000008 /* Link test enable */

Definition at line 211 of file sunbmac.h.

#define TCVR_PAL_LTSTATUS   0x00000010 /* Link test status (P1 only) */

Definition at line 212 of file sunbmac.h.

#define TCVR_PAL_MSENSE   0x00000004 /* Media sense */

Definition at line 210 of file sunbmac.h.

#define TCVR_PAL_SERIAL   0x00000001 /* Enable serial mode */

Definition at line 208 of file sunbmac.h.

#define TCVR_REG_SIZE   0x08UL

Definition at line 201 of file sunbmac.h.

#define TCVR_TPAL   0x00UL

Definition at line 199 of file sunbmac.h.

#define TX_BUFFS_AVAIL (   bp)
Value:
(((bp)->tx_old <= (bp)->tx_new) ? \
(bp)->tx_old + (TX_RING_SIZE - 1) - (bp)->tx_new : \
(bp)->tx_old - (bp)->tx_new - 1)

Definition at line 258 of file sunbmac.h.

#define TX_RING_MAXSIZE   256

Definition at line 247 of file sunbmac.h.

#define TX_RING_SIZE   256

Definition at line 250 of file sunbmac.h.

#define TXD_EOP   0x20000000 /* End Of Packet */

Definition at line 243 of file sunbmac.h.

#define TXD_LENGTH   0x000007ff /* Packet Length. */

Definition at line 245 of file sunbmac.h.

#define TXD_OWN   0x80000000 /* Ownership. */

Definition at line 241 of file sunbmac.h.

#define TXD_SOP   0x40000000 /* Start Of Packet */

Definition at line 242 of file sunbmac.h.

#define TXD_UPDATE   0x10000000 /* Being Updated? */

Definition at line 244 of file sunbmac.h.

Enumeration Type Documentation

Enumerator:
ltrywait 
asleep 

Definition at line 283 of file sunbmac.h.

Enumerator:
external 
internal 
none 

Definition at line 276 of file sunbmac.h.