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

Go to the source code of this file.

Data Structures

struct  sonic_local
 

Macros

#define SONIC_CMD   0x00
 
#define SONIC_DCR   0x01
 
#define SONIC_RCR   0x02
 
#define SONIC_TCR   0x03
 
#define SONIC_IMR   0x04
 
#define SONIC_ISR   0x05
 
#define SONIC_UTDA   0x06
 
#define SONIC_CTDA   0x07
 
#define SONIC_URDA   0x0d
 
#define SONIC_CRDA   0x0e
 
#define SONIC_EOBC   0x13
 
#define SONIC_URRA   0x14
 
#define SONIC_RSA   0x15
 
#define SONIC_REA   0x16
 
#define SONIC_RRP   0x17
 
#define SONIC_RWP   0x18
 
#define SONIC_RSC   0x2b
 
#define SONIC_CEP   0x21
 
#define SONIC_CAP2   0x22
 
#define SONIC_CAP1   0x23
 
#define SONIC_CAP0   0x24
 
#define SONIC_CE   0x25
 
#define SONIC_CDP   0x26
 
#define SONIC_CDC   0x27
 
#define SONIC_WT0   0x29
 
#define SONIC_WT1   0x2a
 
#define SONIC_SR   0x28
 
#define SONIC_TPS   0x08
 
#define SONIC_TFC   0x09
 
#define SONIC_TSA0   0x0a
 
#define SONIC_TSA1   0x0b
 
#define SONIC_TFS   0x0c
 
#define SONIC_CRBA0   0x0f
 
#define SONIC_CRBA1   0x10
 
#define SONIC_RBWC0   0x11
 
#define SONIC_RBWC1   0x12
 
#define SONIC_TTDA   0x20
 
#define SONIC_MDT   0x2f
 
#define SONIC_TRBA0   0x19
 
#define SONIC_TRBA1   0x1a
 
#define SONIC_TBWC0   0x1b
 
#define SONIC_TBWC1   0x1c
 
#define SONIC_LLFA   0x1f
 
#define SONIC_ADDR0   0x1d
 
#define SONIC_ADDR1   0x1e
 
#define SONIC_CRCT   0x2c
 
#define SONIC_FAET   0x2d
 
#define SONIC_MPT   0x2e
 
#define SONIC_DCR2   0x3f
 
#define SONIC_CR_LCAM   0x0200
 
#define SONIC_CR_RRRA   0x0100
 
#define SONIC_CR_RST   0x0080
 
#define SONIC_CR_ST   0x0020
 
#define SONIC_CR_STP   0x0010
 
#define SONIC_CR_RXEN   0x0008
 
#define SONIC_CR_RXDIS   0x0004
 
#define SONIC_CR_TXP   0x0002
 
#define SONIC_CR_HTX   0x0001
 
#define SONIC_DCR_EXBUS   0x8000
 
#define SONIC_DCR_LBR   0x2000
 
#define SONIC_DCR_PO1   0x1000
 
#define SONIC_DCR_PO0   0x0800
 
#define SONIC_DCR_SBUS   0x0400
 
#define SONIC_DCR_USR1   0x0200
 
#define SONIC_DCR_USR0   0x0100
 
#define SONIC_DCR_WC1   0x0080
 
#define SONIC_DCR_WC0   0x0040
 
#define SONIC_DCR_DW   0x0020
 
#define SONIC_DCR_BMS   0x0010
 
#define SONIC_DCR_RFT1   0x0008
 
#define SONIC_DCR_RFT0   0x0004
 
#define SONIC_DCR_TFT1   0x0002
 
#define SONIC_DCR_TFT0   0x0001
 
#define SONIC_RCR_ERR   0x8000
 
#define SONIC_RCR_RNT   0x4000
 
#define SONIC_RCR_BRD   0x2000
 
#define SONIC_RCR_PRO   0x1000
 
#define SONIC_RCR_AMC   0x0800
 
#define SONIC_RCR_LB1   0x0400
 
#define SONIC_RCR_LB0   0x0200
 
#define SONIC_RCR_MC   0x0100
 
#define SONIC_RCR_BC   0x0080
 
#define SONIC_RCR_LPKT   0x0040
 
#define SONIC_RCR_CRS   0x0020
 
#define SONIC_RCR_COL   0x0010
 
#define SONIC_RCR_CRCR   0x0008
 
#define SONIC_RCR_FAER   0x0004
 
#define SONIC_RCR_LBK   0x0002
 
#define SONIC_RCR_PRX   0x0001
 
#define SONIC_RCR_LB_OFF   0
 
#define SONIC_RCR_LB_MAC   SONIC_RCR_LB0
 
#define SONIC_RCR_LB_ENDEC   SONIC_RCR_LB1
 
#define SONIC_RCR_LB_TRANS   (SONIC_RCR_LB0 | SONIC_RCR_LB1)
 
#define SONIC_RCR_DEFAULT   (SONIC_RCR_BRD)
 
#define SONIC_TCR_PINTR   0x8000
 
#define SONIC_TCR_POWC   0x4000
 
#define SONIC_TCR_CRCI   0x2000
 
#define SONIC_TCR_EXDIS   0x1000
 
#define SONIC_TCR_EXD   0x0400
 
#define SONIC_TCR_DEF   0x0200
 
#define SONIC_TCR_NCRS   0x0100
 
#define SONIC_TCR_CRLS   0x0080
 
#define SONIC_TCR_EXC   0x0040
 
#define SONIC_TCR_PMB   0x0008
 
#define SONIC_TCR_FU   0x0004
 
#define SONIC_TCR_BCM   0x0002
 
#define SONIC_TCR_PTX   0x0001
 
#define SONIC_TCR_DEFAULT   0x0000
 
#define SONIC_INT_BR   0x4000
 
#define SONIC_INT_HBL   0x2000
 
#define SONIC_INT_LCD   0x1000
 
#define SONIC_INT_PINT   0x0800
 
#define SONIC_INT_PKTRX   0x0400
 
#define SONIC_INT_TXDN   0x0200
 
#define SONIC_INT_TXER   0x0100
 
#define SONIC_INT_TC   0x0080
 
#define SONIC_INT_RDE   0x0040
 
#define SONIC_INT_RBE   0x0020
 
#define SONIC_INT_RBAE   0x0010
 
#define SONIC_INT_CRC   0x0008
 
#define SONIC_INT_FAE   0x0004
 
#define SONIC_INT_MP   0x0002
 
#define SONIC_INT_RFO   0x0001
 
#define SONIC_IMR_DEFAULT
 
#define SONIC_EOL   0x0001
 
#define CAM_DESCRIPTORS   16
 
#define SONIC_BITMODE16   0
 
#define SONIC_BITMODE32   1
 
#define SONIC_BUS_SCALE(bitmode)   ((bitmode) ? 4 : 2)
 
#define SIZEOF_SONIC_RR   4
 
#define SONIC_RR_BUFADR_L   0
 
#define SONIC_RR_BUFADR_H   1
 
#define SONIC_RR_BUFSIZE_L   2
 
#define SONIC_RR_BUFSIZE_H   3
 
#define SIZEOF_SONIC_RD   7
 
#define SONIC_RD_STATUS   0
 
#define SONIC_RD_PKTLEN   1
 
#define SONIC_RD_PKTPTR_L   2
 
#define SONIC_RD_PKTPTR_H   3
 
#define SONIC_RD_SEQNO   4
 
#define SONIC_RD_LINK   5
 
#define SONIC_RD_IN_USE   6
 
#define SIZEOF_SONIC_TD   8
 
#define SONIC_TD_STATUS   0
 
#define SONIC_TD_CONFIG   1
 
#define SONIC_TD_PKTSIZE   2
 
#define SONIC_TD_FRAG_COUNT   3
 
#define SONIC_TD_FRAG_PTR_L   4
 
#define SONIC_TD_FRAG_PTR_H   5
 
#define SONIC_TD_FRAG_SIZE   6
 
#define SONIC_TD_LINK   7
 
#define SIZEOF_SONIC_CD   4
 
#define SONIC_CD_ENTRY_POINTER   0
 
#define SONIC_CD_CAP0   1
 
#define SONIC_CD_CAP1   2
 
#define SONIC_CD_CAP2   3
 
#define SIZEOF_SONIC_CDA   ((CAM_DESCRIPTORS * SIZEOF_SONIC_CD) + 1)
 
#define SONIC_CDA_CAM_ENABLE   (CAM_DESCRIPTORS * SIZEOF_SONIC_CD)
 
#define SONIC_NUM_RRS   16 /* number of receive resources */
 
#define SONIC_NUM_RDS   SONIC_NUM_RRS /* number of receive descriptors */
 
#define SONIC_NUM_TDS   16 /* number of transmit descriptors */
 
#define SONIC_RDS_MASK   (SONIC_NUM_RDS-1)
 
#define SONIC_TDS_MASK   (SONIC_NUM_TDS-1)
 
#define SONIC_RBSIZE   1520 /* size of one resource buffer */
 
#define SIZEOF_SONIC_DESC
 
#define TX_TIMEOUT   (3 * HZ)
 

Macro Definition Documentation

#define CAM_DESCRIPTORS   16

Definition at line 224 of file sonic.h.

#define SIZEOF_SONIC_CD   4

Definition at line 257 of file sonic.h.

#define SIZEOF_SONIC_CDA   ((CAM_DESCRIPTORS * SIZEOF_SONIC_CD) + 1)

Definition at line 263 of file sonic.h.

#define SIZEOF_SONIC_DESC
#define SIZEOF_SONIC_RD   7

Definition at line 238 of file sonic.h.

#define SIZEOF_SONIC_RR   4

Definition at line 232 of file sonic.h.

#define SIZEOF_SONIC_TD   8

Definition at line 247 of file sonic.h.

#define SONIC_ADDR0   0x1d

Definition at line 85 of file sonic.h.

#define SONIC_ADDR1   0x1e

Definition at line 86 of file sonic.h.

#define SONIC_BITMODE16   0

Definition at line 228 of file sonic.h.

#define SONIC_BITMODE32   1

Definition at line 229 of file sonic.h.

#define SONIC_BUS_SCALE (   bitmode)    ((bitmode) ? 4 : 2)

Definition at line 230 of file sonic.h.

#define SONIC_CAP0   0x24

Definition at line 53 of file sonic.h.

#define SONIC_CAP1   0x23

Definition at line 52 of file sonic.h.

#define SONIC_CAP2   0x22

Definition at line 51 of file sonic.h.

#define SONIC_CD_CAP0   1

Definition at line 259 of file sonic.h.

#define SONIC_CD_CAP1   2

Definition at line 260 of file sonic.h.

#define SONIC_CD_CAP2   3

Definition at line 261 of file sonic.h.

#define SONIC_CD_ENTRY_POINTER   0

Definition at line 258 of file sonic.h.

#define SONIC_CDA_CAM_ENABLE   (CAM_DESCRIPTORS * SIZEOF_SONIC_CD)

Definition at line 264 of file sonic.h.

#define SONIC_CDC   0x27

Definition at line 56 of file sonic.h.

#define SONIC_CDP   0x26

Definition at line 55 of file sonic.h.

#define SONIC_CE   0x25

Definition at line 54 of file sonic.h.

#define SONIC_CEP   0x21

Definition at line 50 of file sonic.h.

#define SONIC_CMD   0x00

Definition at line 30 of file sonic.h.

#define SONIC_CR_HTX   0x0001

Definition at line 110 of file sonic.h.

#define SONIC_CR_LCAM   0x0200

Definition at line 102 of file sonic.h.

#define SONIC_CR_RRRA   0x0100

Definition at line 103 of file sonic.h.

#define SONIC_CR_RST   0x0080

Definition at line 104 of file sonic.h.

#define SONIC_CR_RXDIS   0x0004

Definition at line 108 of file sonic.h.

#define SONIC_CR_RXEN   0x0008

Definition at line 107 of file sonic.h.

#define SONIC_CR_ST   0x0020

Definition at line 105 of file sonic.h.

#define SONIC_CR_STP   0x0010

Definition at line 106 of file sonic.h.

#define SONIC_CR_TXP   0x0002

Definition at line 109 of file sonic.h.

#define SONIC_CRBA0   0x0f

Definition at line 72 of file sonic.h.

#define SONIC_CRBA1   0x10

Definition at line 73 of file sonic.h.

#define SONIC_CRCT   0x2c

Definition at line 92 of file sonic.h.

#define SONIC_CRDA   0x0e

Definition at line 41 of file sonic.h.

#define SONIC_CTDA   0x07

Definition at line 38 of file sonic.h.

#define SONIC_DCR   0x01

Definition at line 31 of file sonic.h.

#define SONIC_DCR2   0x3f

Definition at line 96 of file sonic.h.

#define SONIC_DCR_BMS   0x0010

Definition at line 126 of file sonic.h.

#define SONIC_DCR_DW   0x0020

Definition at line 125 of file sonic.h.

#define SONIC_DCR_EXBUS   0x8000

Definition at line 116 of file sonic.h.

#define SONIC_DCR_LBR   0x2000

Definition at line 117 of file sonic.h.

#define SONIC_DCR_PO0   0x0800

Definition at line 119 of file sonic.h.

#define SONIC_DCR_PO1   0x1000

Definition at line 118 of file sonic.h.

#define SONIC_DCR_RFT0   0x0004

Definition at line 128 of file sonic.h.

#define SONIC_DCR_RFT1   0x0008

Definition at line 127 of file sonic.h.

#define SONIC_DCR_SBUS   0x0400

Definition at line 120 of file sonic.h.

#define SONIC_DCR_TFT0   0x0001

Definition at line 130 of file sonic.h.

#define SONIC_DCR_TFT1   0x0002

Definition at line 129 of file sonic.h.

#define SONIC_DCR_USR0   0x0100

Definition at line 122 of file sonic.h.

#define SONIC_DCR_USR1   0x0200

Definition at line 121 of file sonic.h.

#define SONIC_DCR_WC0   0x0040

Definition at line 124 of file sonic.h.

#define SONIC_DCR_WC1   0x0080

Definition at line 123 of file sonic.h.

#define SONIC_EOBC   0x13

Definition at line 42 of file sonic.h.

#define SONIC_EOL   0x0001

Definition at line 223 of file sonic.h.

#define SONIC_FAET   0x2d

Definition at line 93 of file sonic.h.

#define SONIC_IMR   0x04

Definition at line 34 of file sonic.h.

#define SONIC_IMR_DEFAULT
Value:
SONIC_INT_LCD | \
SONIC_INT_RFO | \
SONIC_INT_PKTRX | \
SONIC_INT_TXDN | \
SONIC_INT_TXER | \
SONIC_INT_RDE | \
SONIC_INT_RBAE | \
SONIC_INT_CRC | \
SONIC_INT_FAE | \
SONIC_INT_MP)

Definition at line 210 of file sonic.h.

#define SONIC_INT_BR   0x4000

Definition at line 189 of file sonic.h.

#define SONIC_INT_CRC   0x0008

Definition at line 200 of file sonic.h.

#define SONIC_INT_FAE   0x0004

Definition at line 201 of file sonic.h.

#define SONIC_INT_HBL   0x2000

Definition at line 190 of file sonic.h.

#define SONIC_INT_LCD   0x1000

Definition at line 191 of file sonic.h.

#define SONIC_INT_MP   0x0002

Definition at line 202 of file sonic.h.

#define SONIC_INT_PINT   0x0800

Definition at line 192 of file sonic.h.

#define SONIC_INT_PKTRX   0x0400

Definition at line 193 of file sonic.h.

#define SONIC_INT_RBAE   0x0010

Definition at line 199 of file sonic.h.

#define SONIC_INT_RBE   0x0020

Definition at line 198 of file sonic.h.

#define SONIC_INT_RDE   0x0040

Definition at line 197 of file sonic.h.

#define SONIC_INT_RFO   0x0001

Definition at line 203 of file sonic.h.

#define SONIC_INT_TC   0x0080

Definition at line 196 of file sonic.h.

#define SONIC_INT_TXDN   0x0200

Definition at line 194 of file sonic.h.

#define SONIC_INT_TXER   0x0100

Definition at line 195 of file sonic.h.

#define SONIC_ISR   0x05

Definition at line 35 of file sonic.h.

#define SONIC_LLFA   0x1f

Definition at line 83 of file sonic.h.

#define SONIC_MDT   0x2f

Definition at line 77 of file sonic.h.

#define SONIC_MPT   0x2e

Definition at line 94 of file sonic.h.

#define SONIC_NUM_RDS   SONIC_NUM_RRS /* number of receive descriptors */

Definition at line 273 of file sonic.h.

#define SONIC_NUM_RRS   16 /* number of receive resources */

Definition at line 272 of file sonic.h.

#define SONIC_NUM_TDS   16 /* number of transmit descriptors */

Definition at line 274 of file sonic.h.

#define SONIC_RBSIZE   1520 /* size of one resource buffer */

Definition at line 279 of file sonic.h.

#define SONIC_RBWC0   0x11

Definition at line 74 of file sonic.h.

#define SONIC_RBWC1   0x12

Definition at line 75 of file sonic.h.

#define SONIC_RCR   0x02

Definition at line 32 of file sonic.h.

#define SONIC_RCR_AMC   0x0800

Definition at line 140 of file sonic.h.

#define SONIC_RCR_BC   0x0080

Definition at line 145 of file sonic.h.

#define SONIC_RCR_BRD   0x2000

Definition at line 138 of file sonic.h.

#define SONIC_RCR_COL   0x0010

Definition at line 148 of file sonic.h.

#define SONIC_RCR_CRCR   0x0008

Definition at line 149 of file sonic.h.

#define SONIC_RCR_CRS   0x0020

Definition at line 147 of file sonic.h.

#define SONIC_RCR_DEFAULT   (SONIC_RCR_BRD)

Definition at line 161 of file sonic.h.

#define SONIC_RCR_ERR   0x8000

Definition at line 136 of file sonic.h.

#define SONIC_RCR_FAER   0x0004

Definition at line 150 of file sonic.h.

#define SONIC_RCR_LB0   0x0200

Definition at line 142 of file sonic.h.

#define SONIC_RCR_LB1   0x0400

Definition at line 141 of file sonic.h.

#define SONIC_RCR_LB_ENDEC   SONIC_RCR_LB1

Definition at line 156 of file sonic.h.

#define SONIC_RCR_LB_MAC   SONIC_RCR_LB0

Definition at line 155 of file sonic.h.

#define SONIC_RCR_LB_OFF   0

Definition at line 154 of file sonic.h.

#define SONIC_RCR_LB_TRANS   (SONIC_RCR_LB0 | SONIC_RCR_LB1)

Definition at line 157 of file sonic.h.

#define SONIC_RCR_LBK   0x0002

Definition at line 151 of file sonic.h.

#define SONIC_RCR_LPKT   0x0040

Definition at line 146 of file sonic.h.

#define SONIC_RCR_MC   0x0100

Definition at line 144 of file sonic.h.

#define SONIC_RCR_PRO   0x1000

Definition at line 139 of file sonic.h.

#define SONIC_RCR_PRX   0x0001

Definition at line 152 of file sonic.h.

#define SONIC_RCR_RNT   0x4000

Definition at line 137 of file sonic.h.

#define SONIC_RD_IN_USE   6

Definition at line 245 of file sonic.h.

#define SONIC_RD_LINK   5

Definition at line 244 of file sonic.h.

#define SONIC_RD_PKTLEN   1

Definition at line 240 of file sonic.h.

#define SONIC_RD_PKTPTR_H   3

Definition at line 242 of file sonic.h.

#define SONIC_RD_PKTPTR_L   2

Definition at line 241 of file sonic.h.

#define SONIC_RD_SEQNO   4

Definition at line 243 of file sonic.h.

#define SONIC_RD_STATUS   0

Definition at line 239 of file sonic.h.

#define SONIC_RDS_MASK   (SONIC_NUM_RDS-1)

Definition at line 276 of file sonic.h.

#define SONIC_REA   0x16

Definition at line 45 of file sonic.h.

#define SONIC_RR_BUFADR_H   1

Definition at line 234 of file sonic.h.

#define SONIC_RR_BUFADR_L   0

Definition at line 233 of file sonic.h.

#define SONIC_RR_BUFSIZE_H   3

Definition at line 236 of file sonic.h.

#define SONIC_RR_BUFSIZE_L   2

Definition at line 235 of file sonic.h.

#define SONIC_RRP   0x17

Definition at line 46 of file sonic.h.

#define SONIC_RSA   0x15

Definition at line 44 of file sonic.h.

#define SONIC_RSC   0x2b

Definition at line 48 of file sonic.h.

#define SONIC_RWP   0x18

Definition at line 47 of file sonic.h.

#define SONIC_SR   0x28

Definition at line 61 of file sonic.h.

#define SONIC_TBWC0   0x1b

Definition at line 81 of file sonic.h.

#define SONIC_TBWC1   0x1c

Definition at line 82 of file sonic.h.

#define SONIC_TCR   0x03

Definition at line 33 of file sonic.h.

#define SONIC_TCR_BCM   0x0002

Definition at line 179 of file sonic.h.

#define SONIC_TCR_CRCI   0x2000

Definition at line 170 of file sonic.h.

#define SONIC_TCR_CRLS   0x0080

Definition at line 175 of file sonic.h.

#define SONIC_TCR_DEF   0x0200

Definition at line 173 of file sonic.h.

#define SONIC_TCR_DEFAULT   0x0000

Definition at line 182 of file sonic.h.

#define SONIC_TCR_EXC   0x0040

Definition at line 176 of file sonic.h.

#define SONIC_TCR_EXD   0x0400

Definition at line 172 of file sonic.h.

#define SONIC_TCR_EXDIS   0x1000

Definition at line 171 of file sonic.h.

#define SONIC_TCR_FU   0x0004

Definition at line 178 of file sonic.h.

#define SONIC_TCR_NCRS   0x0100

Definition at line 174 of file sonic.h.

#define SONIC_TCR_PINTR   0x8000

Definition at line 168 of file sonic.h.

#define SONIC_TCR_PMB   0x0008

Definition at line 177 of file sonic.h.

#define SONIC_TCR_POWC   0x4000

Definition at line 169 of file sonic.h.

#define SONIC_TCR_PTX   0x0001

Definition at line 180 of file sonic.h.

#define SONIC_TD_CONFIG   1

Definition at line 249 of file sonic.h.

#define SONIC_TD_FRAG_COUNT   3

Definition at line 251 of file sonic.h.

#define SONIC_TD_FRAG_PTR_H   5

Definition at line 253 of file sonic.h.

#define SONIC_TD_FRAG_PTR_L   4

Definition at line 252 of file sonic.h.

#define SONIC_TD_FRAG_SIZE   6

Definition at line 254 of file sonic.h.

#define SONIC_TD_LINK   7

Definition at line 255 of file sonic.h.

#define SONIC_TD_PKTSIZE   2

Definition at line 250 of file sonic.h.

#define SONIC_TD_STATUS   0

Definition at line 248 of file sonic.h.

#define SONIC_TDS_MASK   (SONIC_NUM_TDS-1)

Definition at line 277 of file sonic.h.

#define SONIC_TFC   0x09

Definition at line 67 of file sonic.h.

#define SONIC_TFS   0x0c

Definition at line 70 of file sonic.h.

#define SONIC_TPS   0x08

Definition at line 66 of file sonic.h.

#define SONIC_TRBA0   0x19

Definition at line 79 of file sonic.h.

#define SONIC_TRBA1   0x1a

Definition at line 80 of file sonic.h.

#define SONIC_TSA0   0x0a

Definition at line 68 of file sonic.h.

#define SONIC_TSA1   0x0b

Definition at line 69 of file sonic.h.

#define SONIC_TTDA   0x20

Definition at line 76 of file sonic.h.

#define SONIC_URDA   0x0d

Definition at line 40 of file sonic.h.

#define SONIC_URRA   0x14

Definition at line 43 of file sonic.h.

#define SONIC_UTDA   0x06

Definition at line 37 of file sonic.h.

#define SONIC_WT0   0x29

Definition at line 58 of file sonic.h.

#define SONIC_WT1   0x2a

Definition at line 59 of file sonic.h.

#define TX_TIMEOUT   (3 * HZ)

Definition at line 325 of file sonic.h.