Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
pasemi_mac.h File Reference
#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/spinlock.h>
#include <linux/phy.h>

Go to the source code of this file.

Data Structures

struct  pasemi_mac_txring
 
struct  pasemi_mac_rxring
 
struct  pasemi_mac_csring
 
struct  pasemi_mac
 
struct  pasemi_mac_buffer
 

Macros

#define RX_RING_SIZE   2048
 
#define TX_RING_SIZE   4096
 
#define CS_RING_SIZE   (TX_RING_SIZE*2)
 
#define MAX_LRO_DESCRIPTORS   8
 
#define MAX_CS   2
 
#define MAC_TYPE_GMAC   1
 
#define MAC_TYPE_XAUI   2
 
#define TX_DESC(tx, num)   ((tx)->chan.ring_virt[(num) & (TX_RING_SIZE-1)])
 
#define TX_DESC_INFO(tx, num)   ((tx)->ring_info[(num) & (TX_RING_SIZE-1)])
 
#define RX_DESC(rx, num)   ((rx)->chan.ring_virt[(num) & (RX_RING_SIZE-1)])
 
#define RX_DESC_INFO(rx, num)   ((rx)->ring_info[(num) & (RX_RING_SIZE-1)])
 
#define RX_BUFF(rx, num)   ((rx)->buffers[(num) & (RX_RING_SIZE-1)])
 
#define CS_DESC(cs, num)   ((cs)->chan.ring_virt[(num) & (CS_RING_SIZE-1)])
 
#define RING_USED(ring)
 
#define RING_AVAIL(ring)   ((ring->size) - RING_USED(ring))
 
#define PAS_MAC_CFG_PCFG_PE   0x80000000
 
#define PAS_MAC_CFG_PCFG_CE   0x40000000
 
#define PAS_MAC_CFG_PCFG_BU   0x20000000
 
#define PAS_MAC_CFG_PCFG_TT   0x10000000
 
#define PAS_MAC_CFG_PCFG_TSR_M   0x0c000000
 
#define PAS_MAC_CFG_PCFG_TSR_10M   0x00000000
 
#define PAS_MAC_CFG_PCFG_TSR_100M   0x04000000
 
#define PAS_MAC_CFG_PCFG_TSR_1G   0x08000000
 
#define PAS_MAC_CFG_PCFG_TSR_10G   0x0c000000
 
#define PAS_MAC_CFG_PCFG_T24   0x02000000
 
#define PAS_MAC_CFG_PCFG_PR   0x01000000
 
#define PAS_MAC_CFG_PCFG_CRO_M   0x00ff0000
 
#define PAS_MAC_CFG_PCFG_CRO_S   16
 
#define PAS_MAC_CFG_PCFG_IPO_M   0x0000ff00
 
#define PAS_MAC_CFG_PCFG_IPO_S   8
 
#define PAS_MAC_CFG_PCFG_S1   0x00000080
 
#define PAS_MAC_CFG_PCFG_IO_M   0x00000060
 
#define PAS_MAC_CFG_PCFG_IO_MAC   0x00000000
 
#define PAS_MAC_CFG_PCFG_IO_OFF   0x00000020
 
#define PAS_MAC_CFG_PCFG_IO_IND_ETH   0x00000040
 
#define PAS_MAC_CFG_PCFG_IO_IND_IP   0x00000060
 
#define PAS_MAC_CFG_PCFG_LP   0x00000010
 
#define PAS_MAC_CFG_PCFG_TS   0x00000008
 
#define PAS_MAC_CFG_PCFG_HD   0x00000004
 
#define PAS_MAC_CFG_PCFG_SPD_M   0x00000003
 
#define PAS_MAC_CFG_PCFG_SPD_10M   0x00000000
 
#define PAS_MAC_CFG_PCFG_SPD_100M   0x00000001
 
#define PAS_MAC_CFG_PCFG_SPD_1G   0x00000002
 
#define PAS_MAC_CFG_PCFG_SPD_10G   0x00000003
 
#define PAS_MAC_CFG_MACCFG_TXT_M   0x70000000
 
#define PAS_MAC_CFG_MACCFG_TXT_S   28
 
#define PAS_MAC_CFG_MACCFG_PRES_M   0x0f000000
 
#define PAS_MAC_CFG_MACCFG_PRES_S   24
 
#define PAS_MAC_CFG_MACCFG_MAXF_M   0x00ffff00
 
#define PAS_MAC_CFG_MACCFG_MAXF_S   8
 
#define PAS_MAC_CFG_MACCFG_MAXF(x)
 
#define PAS_MAC_CFG_MACCFG_MINF_M   0x000000ff
 
#define PAS_MAC_CFG_MACCFG_MINF_S   0
 
#define PAS_MAC_CFG_TXP_FCF   0x01000000
 
#define PAS_MAC_CFG_TXP_FCE   0x00800000
 
#define PAS_MAC_CFG_TXP_FC   0x00400000
 
#define PAS_MAC_CFG_TXP_FPC_M   0x00300000
 
#define PAS_MAC_CFG_TXP_FPC_S   20
 
#define PAS_MAC_CFG_TXP_FPC(x)
 
#define PAS_MAC_CFG_TXP_RT   0x00080000
 
#define PAS_MAC_CFG_TXP_BL   0x00040000
 
#define PAS_MAC_CFG_TXP_SL_M   0x00030000
 
#define PAS_MAC_CFG_TXP_SL_S   16
 
#define PAS_MAC_CFG_TXP_SL(x)
 
#define PAS_MAC_CFG_TXP_COB_M   0x0000f000
 
#define PAS_MAC_CFG_TXP_COB_S   12
 
#define PAS_MAC_CFG_TXP_COB(x)
 
#define PAS_MAC_CFG_TXP_TIFT_M   0x00000f00
 
#define PAS_MAC_CFG_TXP_TIFT_S   8
 
#define PAS_MAC_CFG_TXP_TIFT(x)
 
#define PAS_MAC_CFG_TXP_TIFG_M   0x000000ff
 
#define PAS_MAC_CFG_TXP_TIFG_S   0
 
#define PAS_MAC_CFG_TXP_TIFG(x)
 
#define PAS_MAC_RMON(r)   (0x100+(r)*4)
 
#define PAS_MAC_IPC_CHNL_DCHNO_M   0x003f0000
 
#define PAS_MAC_IPC_CHNL_DCHNO_S   16
 
#define PAS_MAC_IPC_CHNL_DCHNO(x)
 
#define PAS_MAC_IPC_CHNL_BCH_M   0x0000003f
 
#define PAS_MAC_IPC_CHNL_BCH_S   0
 
#define PAS_MAC_IPC_CHNL_BCH(x)
 

Enumerations

enum  {
  PAS_MAC_CFG_PCFG = 0x80, PAS_MAC_CFG_MACCFG = 0x84, PAS_MAC_CFG_ADR0 = 0x8c, PAS_MAC_CFG_ADR1 = 0x90,
  PAS_MAC_CFG_TXP = 0x98, PAS_MAC_CFG_RMON = 0x100, PAS_MAC_IPC_CHNL = 0x208
}
 

Macro Definition Documentation

#define CS_DESC (   cs,
  num 
)    ((cs)->chan.ring_virt[(num) & (CS_RING_SIZE-1)])

Definition at line 116 of file pasemi_mac.h.

#define CS_RING_SIZE   (TX_RING_SIZE*2)

Definition at line 32 of file pasemi_mac.h.

#define MAC_TYPE_GMAC   1

Definition at line 83 of file pasemi_mac.h.

#define MAC_TYPE_XAUI   2

Definition at line 84 of file pasemi_mac.h.

#define MAX_CS   2

Definition at line 36 of file pasemi_mac.h.

#define MAX_LRO_DESCRIPTORS   8

Definition at line 35 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_MAXF (   x)
Value:
PAS_MAC_CFG_MACCFG_MAXF_M)

Definition at line 173 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_MAXF_M   0x00ffff00

Definition at line 171 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_MAXF_S   8

Definition at line 172 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_MINF_M   0x000000ff

Definition at line 175 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_MINF_S   0

Definition at line 176 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_PRES_M   0x0f000000

Definition at line 169 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_PRES_S   24

Definition at line 170 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_TXT_M   0x70000000

Definition at line 167 of file pasemi_mac.h.

#define PAS_MAC_CFG_MACCFG_TXT_S   28

Definition at line 168 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_BU   0x20000000

Definition at line 139 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_CE   0x40000000

Definition at line 138 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_CRO_M   0x00ff0000

Definition at line 148 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_CRO_S   16

Definition at line 149 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_HD   0x00000004

Definition at line 160 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_IO_IND_ETH   0x00000040

Definition at line 156 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_IO_IND_IP   0x00000060

Definition at line 157 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_IO_M   0x00000060

Definition at line 153 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_IO_MAC   0x00000000

Definition at line 154 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_IO_OFF   0x00000020

Definition at line 155 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_IPO_M   0x0000ff00

Definition at line 150 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_IPO_S   8

Definition at line 151 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_LP   0x00000010

Definition at line 158 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_PE   0x80000000

Definition at line 137 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_PR   0x01000000

Definition at line 147 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_S1   0x00000080

Definition at line 152 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_SPD_100M   0x00000001

Definition at line 163 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_SPD_10G   0x00000003

Definition at line 165 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_SPD_10M   0x00000000

Definition at line 162 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_SPD_1G   0x00000002

Definition at line 164 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_SPD_M   0x00000003

Definition at line 161 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_T24   0x02000000

Definition at line 146 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_TS   0x00000008

Definition at line 159 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_TSR_100M   0x04000000

Definition at line 143 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_TSR_10G   0x0c000000

Definition at line 145 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_TSR_10M   0x00000000

Definition at line 142 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_TSR_1G   0x08000000

Definition at line 144 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_TSR_M   0x0c000000

Definition at line 141 of file pasemi_mac.h.

#define PAS_MAC_CFG_PCFG_TT   0x10000000

Definition at line 140 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_BL   0x00040000

Definition at line 186 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_COB (   x)
Value:
PAS_MAC_CFG_TXP_COB_M)

Definition at line 193 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_COB_M   0x0000f000

Definition at line 191 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_COB_S   12

Definition at line 192 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_FC   0x00400000

Definition at line 180 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_FCE   0x00800000

Definition at line 179 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_FCF   0x01000000

Definition at line 178 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_FPC (   x)
Value:
PAS_MAC_CFG_TXP_FPC_M)

Definition at line 183 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_FPC_M   0x00300000

Definition at line 181 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_FPC_S   20

Definition at line 182 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_RT   0x00080000

Definition at line 185 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_SL (   x)
Value:
PAS_MAC_CFG_TXP_SL_M)

Definition at line 189 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_SL_M   0x00030000

Definition at line 187 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_SL_S   16

Definition at line 188 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_TIFG (   x)
Value:
PAS_MAC_CFG_TXP_TIFG_M)

Definition at line 201 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_TIFG_M   0x000000ff

Definition at line 199 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_TIFG_S   0

Definition at line 200 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_TIFT (   x)
Value:
PAS_MAC_CFG_TXP_TIFT_M)

Definition at line 197 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_TIFT_M   0x00000f00

Definition at line 195 of file pasemi_mac.h.

#define PAS_MAC_CFG_TXP_TIFT_S   8

Definition at line 196 of file pasemi_mac.h.

#define PAS_MAC_IPC_CHNL_BCH (   x)
Value:
PAS_MAC_IPC_CHNL_BCH_M)

Definition at line 212 of file pasemi_mac.h.

#define PAS_MAC_IPC_CHNL_BCH_M   0x0000003f

Definition at line 210 of file pasemi_mac.h.

#define PAS_MAC_IPC_CHNL_BCH_S   0

Definition at line 211 of file pasemi_mac.h.

#define PAS_MAC_IPC_CHNL_DCHNO (   x)
Value:
PAS_MAC_IPC_CHNL_DCHNO_M)

Definition at line 208 of file pasemi_mac.h.

#define PAS_MAC_IPC_CHNL_DCHNO_M   0x003f0000

Definition at line 206 of file pasemi_mac.h.

#define PAS_MAC_IPC_CHNL_DCHNO_S   16

Definition at line 207 of file pasemi_mac.h.

#define PAS_MAC_RMON (   r)    (0x100+(r)*4)

Definition at line 204 of file pasemi_mac.h.

#define RING_AVAIL (   ring)    ((ring->size) - RING_USED(ring))

Definition at line 120 of file pasemi_mac.h.

#define RING_USED (   ring)
Value:
(((ring)->next_to_fill - (ring)->next_to_clean) \
& ((ring)->size - 1))

Definition at line 118 of file pasemi_mac.h.

#define RX_BUFF (   rx,
  num 
)    ((rx)->buffers[(num) & (RX_RING_SIZE-1)])

Definition at line 115 of file pasemi_mac.h.

#define RX_DESC (   rx,
  num 
)    ((rx)->chan.ring_virt[(num) & (RX_RING_SIZE-1)])

Definition at line 113 of file pasemi_mac.h.

#define RX_DESC_INFO (   rx,
  num 
)    ((rx)->ring_info[(num) & (RX_RING_SIZE-1)])

Definition at line 114 of file pasemi_mac.h.

#define RX_RING_SIZE   2048

Definition at line 30 of file pasemi_mac.h.

#define TX_DESC (   tx,
  num 
)    ((tx)->chan.ring_virt[(num) & (TX_RING_SIZE-1)])

Definition at line 111 of file pasemi_mac.h.

#define TX_DESC_INFO (   tx,
  num 
)    ((tx)->ring_info[(num) & (TX_RING_SIZE-1)])

Definition at line 112 of file pasemi_mac.h.

#define TX_RING_SIZE   4096

Definition at line 31 of file pasemi_mac.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
PAS_MAC_CFG_PCFG 
PAS_MAC_CFG_MACCFG 
PAS_MAC_CFG_ADR0 
PAS_MAC_CFG_ADR1 
PAS_MAC_CFG_TXP 
PAS_MAC_CFG_RMON 
PAS_MAC_IPC_CHNL 

Definition at line 126 of file pasemi_mac.h.