Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
spider_net.h File Reference
#include <linux/sungem_phy.h>

Go to the source code of this file.

Data Structures

struct  spider_net_hw_descr
 
struct  spider_net_descr
 
struct  spider_net_descr_chain
 
struct  spider_net_extra_stats
 
struct  spider_net_card
 

Macros

#define VERSION   "2.0 B"
 
#define SPIDER_NET_MAX_FRAME   2312
 
#define SPIDER_NET_MAX_MTU   2294
 
#define SPIDER_NET_MIN_MTU   64
 
#define SPIDER_NET_RXBUF_ALIGN   128
 
#define SPIDER_NET_RX_DESCRIPTORS_DEFAULT   256
 
#define SPIDER_NET_RX_DESCRIPTORS_MIN   16
 
#define SPIDER_NET_RX_DESCRIPTORS_MAX   512
 
#define SPIDER_NET_TX_DESCRIPTORS_DEFAULT   256
 
#define SPIDER_NET_TX_DESCRIPTORS_MIN   16
 
#define SPIDER_NET_TX_DESCRIPTORS_MAX   512
 
#define SPIDER_NET_TX_TIMER   (HZ/5)
 
#define SPIDER_NET_ANEG_TIMER   (HZ)
 
#define SPIDER_NET_ANEG_TIMEOUT   5
 
#define SPIDER_NET_RX_CSUM_DEFAULT   1
 
#define SPIDER_NET_WATCHDOG_TIMEOUT   50*HZ
 
#define SPIDER_NET_NAPI_WEIGHT   64
 
#define SPIDER_NET_FIRMWARE_SEQS   6
 
#define SPIDER_NET_FIRMWARE_SEQWORDS   1024
 
#define SPIDER_NET_FIRMWARE_LEN
 
#define SPIDER_NET_FIRMWARE_NAME   "spider_fw.bin"
 
#define SPIDER_NET_GHIINT0STS   0x00000000
 
#define SPIDER_NET_GHIINT1STS   0x00000004
 
#define SPIDER_NET_GHIINT2STS   0x00000008
 
#define SPIDER_NET_GHIINT0MSK   0x00000010
 
#define SPIDER_NET_GHIINT1MSK   0x00000014
 
#define SPIDER_NET_GHIINT2MSK   0x00000018
 
#define SPIDER_NET_GRESUMINTNUM   0x00000020
 
#define SPIDER_NET_GREINTNUM   0x00000024
 
#define SPIDER_NET_GFFRMNUM   0x00000028
 
#define SPIDER_NET_GFAFRMNUM   0x0000002c
 
#define SPIDER_NET_GFBFRMNUM   0x00000030
 
#define SPIDER_NET_GFCFRMNUM   0x00000034
 
#define SPIDER_NET_GFDFRMNUM   0x00000038
 
#define SPIDER_NET_GFREECNNUM   0x0000003c
 
#define SPIDER_NET_GONETIMENUM   0x00000040
 
#define SPIDER_NET_GTOUTFRMNUM   0x00000044
 
#define SPIDER_NET_GTXMDSET   0x00000050
 
#define SPIDER_NET_GPCCTRL   0x00000054
 
#define SPIDER_NET_GRXMDSET   0x00000058
 
#define SPIDER_NET_GIPSECINIT   0x0000005c
 
#define SPIDER_NET_GFTRESTRT   0x00000060
 
#define SPIDER_NET_GRXDMAEN   0x00000064
 
#define SPIDER_NET_GMRWOLCTRL   0x00000068
 
#define SPIDER_NET_GPCWOPCMD   0x0000006c
 
#define SPIDER_NET_GPCROPCMD   0x00000070
 
#define SPIDER_NET_GTTFRMCNT   0x00000078
 
#define SPIDER_NET_GTESTMD   0x0000007c
 
#define SPIDER_NET_GSINIT   0x00000080
 
#define SPIDER_NET_GSnPRGADR   0x00000084
 
#define SPIDER_NET_GSnPRGDAT   0x00000088
 
#define SPIDER_NET_GMACOPEMD   0x00000100
 
#define SPIDER_NET_GMACLENLMT   0x00000108
 
#define SPIDER_NET_GMACST   0x00000110
 
#define SPIDER_NET_GMACINTEN   0x00000118
 
#define SPIDER_NET_GMACPHYCTRL   0x00000120
 
#define SPIDER_NET_GMACAPAUSE   0x00000154
 
#define SPIDER_NET_GMACTXPAUSE   0x00000164
 
#define SPIDER_NET_GMACMODE   0x000001b0
 
#define SPIDER_NET_GMACBSTLMT   0x000001b4
 
#define SPIDER_NET_GMACUNIMACU   0x000001c0
 
#define SPIDER_NET_GMACUNIMACL   0x000001c8
 
#define SPIDER_NET_GMRMHFILnR   0x00000400
 
#define SPIDER_NET_MULTICAST_HASHES   256
 
#define SPIDER_NET_GMRUAFILnR   0x00000500
 
#define SPIDER_NET_GMRUA0FIL15R   0x00000578
 
#define SPIDER_NET_GTTQMSK   0x00000934
 
#define SPIDER_NET_GDADCHA   0x00000a00
 
#define SPIDER_NET_GDADMACCNTR   0x00000a04
 
#define SPIDER_NET_GDACTDPA   0x00000a08
 
#define SPIDER_NET_GDACTDCNT   0x00000a0c
 
#define SPIDER_NET_GDACDBADDR   0x00000a20
 
#define SPIDER_NET_GDACDBSIZE   0x00000a24
 
#define SPIDER_NET_GDACNEXTDA   0x00000a28
 
#define SPIDER_NET_GDACCOMST   0x00000a2c
 
#define SPIDER_NET_GDAWBCOMST   0x00000a30
 
#define SPIDER_NET_GDAWBRSIZE   0x00000a34
 
#define SPIDER_NET_GDAWBVSIZE   0x00000a38
 
#define SPIDER_NET_GDAWBTRST   0x00000a3c
 
#define SPIDER_NET_GDAWBTRERR   0x00000a40
 
#define SPIDER_NET_GDTDCHA   0x00000e00
 
#define SPIDER_NET_GDTDMACCNTR   0x00000e04
 
#define SPIDER_NET_GDTCDPA   0x00000e08
 
#define SPIDER_NET_GDTDMASEL   0x00000e14
 
#define SPIDER_NET_ECMODE   0x00000f00
 
#define SPIDER_NET_CKRCTRL   0x00000ff0
 
#define SPIDER_NET_SCONFIG_IOACTE   0x00002810
 
#define SPIDER_NET_INT0_MASK_VALUE   0x3f7fe2c7
 
#define SPIDER_NET_INT1_MASK_VALUE   0x0000fff2
 
#define SPIDER_NET_INT2_MASK_VALUE   0x000003f1
 
#define SPIDER_NET_FRAMENUM_VALUE   0x00000000
 
#define SPIDER_NET_GFXFRAMES_VALUE   0x00000000
 
#define SPIDER_NET_STOP_SEQ_VALUE   0x00000000
 
#define SPIDER_NET_RUN_SEQ_VALUE   0x0000007e
 
#define SPIDER_NET_PHY_CTRL_VALUE   0x00040040
 
#define SPIDER_NET_RXMODE_VALUE   0x00000011
 
#define SPIDER_NET_TXMODE_VALUE   0x00010000
 
#define SPIDER_NET_RESTART_VALUE   0x00000000
 
#define SPIDER_NET_WOL_VALUE   0x00001111
 
#define SPIDER_NET_IPSECINIT_VALUE   0x6f716f71
 
#define SPIDER_NET_OPMODE_VALUE   0x00000067
 
#define SPIDER_NET_LENLMT_VALUE   0x00000908
 
#define SPIDER_NET_MACAPAUSE_VALUE   0x00000800 /* about 1 ms */
 
#define SPIDER_NET_TXPAUSE_VALUE   0x00000000
 
#define SPIDER_NET_MACMODE_VALUE   0x00000001
 
#define SPIDER_NET_BURSTLMT_VALUE   0x00000200 /* about 16 us */
 
#define SPIDER_NET_DMA_RX_VALUE   0x80000000
 
#define SPIDER_NET_DMA_RX_FEND_VALUE   0x00030003
 
#define SPIDER_NET_TX_DMA_EN   0x80000000
 
#define SPIDER_NET_GDTBSTA   0x00000300
 
#define SPIDER_NET_GDTDCEIDIS   0x00000002
 
#define SPIDER_NET_DMA_TX_VALUE
 
#define SPIDER_NET_DMA_TX_FEND_VALUE   0x00030003
 
#define SPIDER_NET_UA_DESCR_VALUE   0x00080000
 
#define SPIDER_NET_PROMISC_VALUE   0x00080000
 
#define SPIDER_NET_NONPROMISC_VALUE   0x00000000
 
#define SPIDER_NET_DMASEL_VALUE   0x00000001
 
#define SPIDER_NET_ECMODE_VALUE   0x00000000
 
#define SPIDER_NET_CKRCTRL_RUN_VALUE   0x1fff010f
 
#define SPIDER_NET_CKRCTRL_STOP_VALUE   0x0000010f
 
#define SPIDER_NET_SBIMSTATE_VALUE   0x00000000
 
#define SPIDER_NET_SBTMSTATE_VALUE   0x00000000
 
#define SPIDER_NET_TXINT   (1 << SPIDER_NET_GDTFDCINT)
 
#define SPIDER_NET_RXINT   ( (1 << SPIDER_NET_GDAFDCINT) )
 
#define SPIDER_NET_LINKINT   ( 1 << SPIDER_NET_GMAC2INT )
 
#define SPIDER_NET_ERRINT
 
#define SPIDER_NET_GPREXEC   0x80000000
 
#define SPIDER_NET_GPRDAT_MASK   0x0000ffff
 
#define SPIDER_NET_DMAC_NOINTR_COMPLETE   0x00800000
 
#define SPIDER_NET_DMAC_TXFRMTL   0x00040000
 
#define SPIDER_NET_DMAC_TCP   0x00020000
 
#define SPIDER_NET_DMAC_UDP   0x00030000
 
#define SPIDER_NET_TXDCEST   0x08000000
 
#define SPIDER_NET_DESCR_RXFDIS   0x00000001
 
#define SPIDER_NET_DESCR_RXDCEIS   0x00000002
 
#define SPIDER_NET_DESCR_RXDEN0IS   0x00000004
 
#define SPIDER_NET_DESCR_RXINVDIS   0x00000008
 
#define SPIDER_NET_DESCR_RXRERRIS   0x00000010
 
#define SPIDER_NET_DESCR_RXFDCIMS   0x00000100
 
#define SPIDER_NET_DESCR_RXDCEIMS   0x00000200
 
#define SPIDER_NET_DESCR_RXDEN0IMS   0x00000400
 
#define SPIDER_NET_DESCR_RXINVDIMS   0x00000800
 
#define SPIDER_NET_DESCR_RXRERRMIS   0x00001000
 
#define SPIDER_NET_DESCR_UNUSED   0x077fe0e0
 
#define SPIDER_NET_DESCR_IND_PROC_MASK   0xF0000000
 
#define SPIDER_NET_DESCR_COMPLETE   0x00000000 /* used in rx and tx */
 
#define SPIDER_NET_DESCR_RESPONSE_ERROR   0x10000000 /* used in rx and tx */
 
#define SPIDER_NET_DESCR_PROTECTION_ERROR   0x20000000 /* used in rx and tx */
 
#define SPIDER_NET_DESCR_FRAME_END   0x40000000 /* used in rx */
 
#define SPIDER_NET_DESCR_FORCE_END   0x50000000 /* used in rx and tx */
 
#define SPIDER_NET_DESCR_CARDOWNED   0xA0000000 /* used in rx and tx */
 
#define SPIDER_NET_DESCR_NOT_IN_USE   0xF0000000
 
#define SPIDER_NET_DESCR_TXDESFLG   0x00800000
 
#define SPIDER_NET_DESCR_BAD_STATUS
 
#define SPIDER_NET_RX_IPCHK   29
 
#define SPIDER_NET_RX_TCPCHK   28
 
#define SPIDER_NET_VLAN_PACKET   21
 
#define SPIDER_NET_DATA_STATUS_CKSUM_MASK
 
#define SPIDER_NET_RX_IPCHKERR   27
 
#define SPIDER_NET_RX_RXTCPCHKERR   28
 
#define SPIDER_NET_DATA_ERR_CKSUM_MASK   (1 << SPIDER_NET_RX_IPCHKERR)
 
#define SPIDER_NET_DESTROY_RX_FLAGS   0x700b8000
 
#define SPIDER_NET_DEFAULT_MSG
 

Enumerations

enum  spider_net_int0_status {
  SPIDER_NET_GPHYINT = 0, SPIDER_NET_GMAC2INT, SPIDER_NET_GMAC1INT, SPIDER_NET_GIPSINT,
  SPIDER_NET_GFIFOINT, SPIDER_NET_GDMACINT, SPIDER_NET_GSYSINT, SPIDER_NET_GPWOPCMPINT,
  SPIDER_NET_GPROPCMPINT, SPIDER_NET_GPWFFINT, SPIDER_NET_GRMDADRINT, SPIDER_NET_GRMARPINT,
  SPIDER_NET_GRMMPINT, SPIDER_NET_GDTDEN0INT, SPIDER_NET_GDDDEN0INT, SPIDER_NET_GDCDEN0INT,
  SPIDER_NET_GDBDEN0INT, SPIDER_NET_GDADEN0INT, SPIDER_NET_GDTFDCINT, SPIDER_NET_GDDFDCINT,
  SPIDER_NET_GDCFDCINT, SPIDER_NET_GDBFDCINT, SPIDER_NET_GDAFDCINT, SPIDER_NET_GTTEDINT,
  SPIDER_NET_GDTDCEINT, SPIDER_NET_GRFDNMINT, SPIDER_NET_GRFCNMINT, SPIDER_NET_GRFBNMINT,
  SPIDER_NET_GRFANMINT, SPIDER_NET_GRFNMINT, SPIDER_NET_G1TMCNTINT, SPIDER_NET_GFREECNTINT
}
 
enum  spider_net_int1_status {
  SPIDER_NET_GTMFLLINT = 0, SPIDER_NET_GRMFLLINT, SPIDER_NET_GTMSHTINT, SPIDER_NET_GDTINVDINT,
  SPIDER_NET_GRFDFLLINT, SPIDER_NET_GDDDCEINT, SPIDER_NET_GDDINVDINT, SPIDER_NET_GRFCFLLINT,
  SPIDER_NET_GDCDCEINT, SPIDER_NET_GDCINVDINT, SPIDER_NET_GRFBFLLINT, SPIDER_NET_GDBDCEINT,
  SPIDER_NET_GDBINVDINT, SPIDER_NET_GRFAFLLINT, SPIDER_NET_GDADCEINT, SPIDER_NET_GDAINVDINT,
  SPIDER_NET_GDTRSERINT, SPIDER_NET_GDDRSERINT, SPIDER_NET_GDCRSERINT, SPIDER_NET_GDBRSERINT,
  SPIDER_NET_GDARSERINT, SPIDER_NET_GDSERINT, SPIDER_NET_GDTPTERINT, SPIDER_NET_GDDPTERINT,
  SPIDER_NET_GDCPTERINT, SPIDER_NET_GDBPTERINT, SPIDER_NET_GDAPTERINT
}
 
enum  spider_net_int2_status {
  SPIDER_NET_GPROPERINT = 0, SPIDER_NET_GMCTCRSNGINT, SPIDER_NET_GMCTLCOLINT, SPIDER_NET_GMCTTMOTINT,
  SPIDER_NET_GMCRCAERINT, SPIDER_NET_GMCRCALERINT, SPIDER_NET_GMCRALNERINT, SPIDER_NET_GMCROVRINT,
  SPIDER_NET_GMCRRNTINT, SPIDER_NET_GMCRRXERINT, SPIDER_NET_GTITCSERINT, SPIDER_NET_GTIFMTERINT,
  SPIDER_NET_GTIPKTRVKINT, SPIDER_NET_GTISPINGINT, SPIDER_NET_GTISADNGINT, SPIDER_NET_GTISPDNGINT,
  SPIDER_NET_GRIFMTERINT, SPIDER_NET_GRIPKTRVKINT, SPIDER_NET_GRISPINGINT, SPIDER_NET_GRISADNGINT,
  SPIDER_NET_GRISPDNGINT
}
 

Functions

int spider_net_stop (struct net_device *netdev)
 
int spider_net_open (struct net_device *netdev)
 
struct spider_net_hw_descr __attribute__ ((aligned(32)))
 

Variables

struct ethtool_ops spider_net_ethtool_ops
 
char spider_net_driver_name []
 
u32 buf_addr
 
u32 buf_size
 
u32 next_descr_addr
 
u32 dmac_cmd_status
 
u32 result_size
 
u32 valid_size
 
u32 data_status
 
u32 data_error
 
struct spider_net_descr __attribute__
 

Macro Definition Documentation

#define SPIDER_NET_ANEG_TIMEOUT   5

Definition at line 55 of file spider_net.h.

#define SPIDER_NET_ANEG_TIMER   (HZ)

Definition at line 54 of file spider_net.h.

#define SPIDER_NET_BURSTLMT_VALUE   0x00000200 /* about 16 us */

Definition at line 196 of file spider_net.h.

#define SPIDER_NET_CKRCTRL   0x00000ff0

Definition at line 155 of file spider_net.h.

#define SPIDER_NET_CKRCTRL_RUN_VALUE   0x1fff010f

Definition at line 238 of file spider_net.h.

#define SPIDER_NET_CKRCTRL_STOP_VALUE   0x0000010f

Definition at line 239 of file spider_net.h.

#define SPIDER_NET_DATA_ERR_CKSUM_MASK   (1 << SPIDER_NET_RX_IPCHKERR)

Definition at line 426 of file spider_net.h.

#define SPIDER_NET_DATA_STATUS_CKSUM_MASK
Value:

Definition at line 419 of file spider_net.h.

#define SPIDER_NET_DEFAULT_MSG
Value:
NETIF_MSG_PROBE | \
NETIF_MSG_LINK | \
NETIF_MSG_TIMER | \
NETIF_MSG_IFDOWN | \
NETIF_MSG_IFUP | \
NETIF_MSG_RX_ERR | \
NETIF_MSG_TX_ERR | \
NETIF_MSG_TX_QUEUED | \
NETIF_MSG_INTR | \
NETIF_MSG_TX_DONE | \
NETIF_MSG_RX_STATUS | \
NETIF_MSG_PKTDATA | \
NETIF_MSG_HW | \
NETIF_MSG_WOL )

Definition at line 432 of file spider_net.h.

#define SPIDER_NET_DESCR_BAD_STATUS
Value:
SPIDER_NET_DESCR_RXRERRIS | \
SPIDER_NET_DESCR_RXDEN0IMS | \
SPIDER_NET_DESCR_RXINVDIMS | \
SPIDER_NET_DESCR_RXRERRMIS | \
SPIDER_NET_DESCR_UNUSED)

Definition at line 378 of file spider_net.h.

#define SPIDER_NET_DESCR_CARDOWNED   0xA0000000 /* used in rx and tx */

Definition at line 374 of file spider_net.h.

#define SPIDER_NET_DESCR_COMPLETE   0x00000000 /* used in rx and tx */

Definition at line 369 of file spider_net.h.

#define SPIDER_NET_DESCR_FORCE_END   0x50000000 /* used in rx and tx */

Definition at line 373 of file spider_net.h.

#define SPIDER_NET_DESCR_FRAME_END   0x40000000 /* used in rx */

Definition at line 372 of file spider_net.h.

#define SPIDER_NET_DESCR_IND_PROC_MASK   0xF0000000

Definition at line 368 of file spider_net.h.

#define SPIDER_NET_DESCR_NOT_IN_USE   0xF0000000

Definition at line 375 of file spider_net.h.

#define SPIDER_NET_DESCR_PROTECTION_ERROR   0x20000000 /* used in rx and tx */

Definition at line 371 of file spider_net.h.

#define SPIDER_NET_DESCR_RESPONSE_ERROR   0x10000000 /* used in rx and tx */

Definition at line 370 of file spider_net.h.

#define SPIDER_NET_DESCR_RXDCEIMS   0x00000200

Definition at line 362 of file spider_net.h.

#define SPIDER_NET_DESCR_RXDCEIS   0x00000002

Definition at line 357 of file spider_net.h.

#define SPIDER_NET_DESCR_RXDEN0IMS   0x00000400

Definition at line 363 of file spider_net.h.

#define SPIDER_NET_DESCR_RXDEN0IS   0x00000004

Definition at line 358 of file spider_net.h.

#define SPIDER_NET_DESCR_RXFDCIMS   0x00000100

Definition at line 361 of file spider_net.h.

#define SPIDER_NET_DESCR_RXFDIS   0x00000001

Definition at line 356 of file spider_net.h.

#define SPIDER_NET_DESCR_RXINVDIMS   0x00000800

Definition at line 364 of file spider_net.h.

#define SPIDER_NET_DESCR_RXINVDIS   0x00000008

Definition at line 359 of file spider_net.h.

#define SPIDER_NET_DESCR_RXRERRIS   0x00000010

Definition at line 360 of file spider_net.h.

#define SPIDER_NET_DESCR_RXRERRMIS   0x00001000

Definition at line 365 of file spider_net.h.

#define SPIDER_NET_DESCR_TXDESFLG   0x00800000

Definition at line 376 of file spider_net.h.

#define SPIDER_NET_DESCR_UNUSED   0x077fe0e0

Definition at line 366 of file spider_net.h.

#define SPIDER_NET_DESTROY_RX_FLAGS   0x700b8000

Definition at line 430 of file spider_net.h.

#define SPIDER_NET_DMA_RX_FEND_VALUE   0x00030003

Definition at line 218 of file spider_net.h.

#define SPIDER_NET_DMA_RX_VALUE   0x80000000

Definition at line 217 of file spider_net.h.

#define SPIDER_NET_DMA_TX_FEND_VALUE   0x00030003

Definition at line 227 of file spider_net.h.

#define SPIDER_NET_DMA_TX_VALUE
Value:
SPIDER_NET_GDTDCEIDIS | \
SPIDER_NET_GDTBSTA

Definition at line 223 of file spider_net.h.

#define SPIDER_NET_DMAC_NOINTR_COMPLETE   0x00800000

Definition at line 350 of file spider_net.h.

#define SPIDER_NET_DMAC_TCP   0x00020000

Definition at line 352 of file spider_net.h.

#define SPIDER_NET_DMAC_TXFRMTL   0x00040000

Definition at line 351 of file spider_net.h.

#define SPIDER_NET_DMAC_UDP   0x00030000

Definition at line 353 of file spider_net.h.

#define SPIDER_NET_DMASEL_VALUE   0x00000001

Definition at line 234 of file spider_net.h.

#define SPIDER_NET_ECMODE   0x00000f00

Definition at line 153 of file spider_net.h.

#define SPIDER_NET_ECMODE_VALUE   0x00000000

Definition at line 236 of file spider_net.h.

#define SPIDER_NET_ERRINT
Value:
( 0xffffffff & \

Definition at line 342 of file spider_net.h.

#define SPIDER_NET_FIRMWARE_LEN
Value:
SPIDER_NET_FIRMWARE_SEQWORDS * \
sizeof(u32))

Definition at line 64 of file spider_net.h.

#define SPIDER_NET_FIRMWARE_NAME   "spider_fw.bin"

Definition at line 67 of file spider_net.h.

#define SPIDER_NET_FIRMWARE_SEQS   6

Definition at line 62 of file spider_net.h.

#define SPIDER_NET_FIRMWARE_SEQWORDS   1024

Definition at line 63 of file spider_net.h.

#define SPIDER_NET_FRAMENUM_VALUE   0x00000000

Definition at line 166 of file spider_net.h.

#define SPIDER_NET_GDACCOMST   0x00000a2c

Definition at line 140 of file spider_net.h.

#define SPIDER_NET_GDACDBADDR   0x00000a20

Definition at line 137 of file spider_net.h.

#define SPIDER_NET_GDACDBSIZE   0x00000a24

Definition at line 138 of file spider_net.h.

#define SPIDER_NET_GDACNEXTDA   0x00000a28

Definition at line 139 of file spider_net.h.

#define SPIDER_NET_GDACTDCNT   0x00000a0c

Definition at line 136 of file spider_net.h.

#define SPIDER_NET_GDACTDPA   0x00000a08

Definition at line 135 of file spider_net.h.

#define SPIDER_NET_GDADCHA   0x00000a00

Definition at line 133 of file spider_net.h.

#define SPIDER_NET_GDADMACCNTR   0x00000a04

Definition at line 134 of file spider_net.h.

#define SPIDER_NET_GDAWBCOMST   0x00000a30

Definition at line 141 of file spider_net.h.

#define SPIDER_NET_GDAWBRSIZE   0x00000a34

Definition at line 142 of file spider_net.h.

#define SPIDER_NET_GDAWBTRERR   0x00000a40

Definition at line 145 of file spider_net.h.

#define SPIDER_NET_GDAWBTRST   0x00000a3c

Definition at line 144 of file spider_net.h.

#define SPIDER_NET_GDAWBVSIZE   0x00000a38

Definition at line 143 of file spider_net.h.

#define SPIDER_NET_GDTBSTA   0x00000300

Definition at line 221 of file spider_net.h.

#define SPIDER_NET_GDTCDPA   0x00000e08

Definition at line 150 of file spider_net.h.

#define SPIDER_NET_GDTDCEIDIS   0x00000002

Definition at line 222 of file spider_net.h.

#define SPIDER_NET_GDTDCHA   0x00000e00

Definition at line 148 of file spider_net.h.

#define SPIDER_NET_GDTDMACCNTR   0x00000e04

Definition at line 149 of file spider_net.h.

#define SPIDER_NET_GDTDMASEL   0x00000e14

Definition at line 151 of file spider_net.h.

#define SPIDER_NET_GFAFRMNUM   0x0000002c

Definition at line 81 of file spider_net.h.

#define SPIDER_NET_GFBFRMNUM   0x00000030

Definition at line 82 of file spider_net.h.

#define SPIDER_NET_GFCFRMNUM   0x00000034

Definition at line 83 of file spider_net.h.

#define SPIDER_NET_GFDFRMNUM   0x00000038

Definition at line 84 of file spider_net.h.

#define SPIDER_NET_GFFRMNUM   0x00000028

Definition at line 80 of file spider_net.h.

#define SPIDER_NET_GFREECNNUM   0x0000003c

Definition at line 87 of file spider_net.h.

#define SPIDER_NET_GFTRESTRT   0x00000060

Definition at line 96 of file spider_net.h.

#define SPIDER_NET_GFXFRAMES_VALUE   0x00000000

Definition at line 168 of file spider_net.h.

#define SPIDER_NET_GHIINT0MSK   0x00000010

Definition at line 73 of file spider_net.h.

#define SPIDER_NET_GHIINT0STS   0x00000000

spider_net SMMIO registers

Definition at line 70 of file spider_net.h.

#define SPIDER_NET_GHIINT1MSK   0x00000014

Definition at line 74 of file spider_net.h.

#define SPIDER_NET_GHIINT1STS   0x00000004

Definition at line 71 of file spider_net.h.

#define SPIDER_NET_GHIINT2MSK   0x00000018

Definition at line 75 of file spider_net.h.

#define SPIDER_NET_GHIINT2STS   0x00000008

Definition at line 72 of file spider_net.h.

#define SPIDER_NET_GIPSECINIT   0x0000005c

Definition at line 95 of file spider_net.h.

#define SPIDER_NET_GMACAPAUSE   0x00000154

Definition at line 114 of file spider_net.h.

#define SPIDER_NET_GMACBSTLMT   0x000001b4

Definition at line 118 of file spider_net.h.

#define SPIDER_NET_GMACINTEN   0x00000118

Definition at line 111 of file spider_net.h.

#define SPIDER_NET_GMACLENLMT   0x00000108

Definition at line 109 of file spider_net.h.

#define SPIDER_NET_GMACMODE   0x000001b0

Definition at line 117 of file spider_net.h.

#define SPIDER_NET_GMACOPEMD   0x00000100

Definition at line 108 of file spider_net.h.

#define SPIDER_NET_GMACPHYCTRL   0x00000120

Definition at line 112 of file spider_net.h.

#define SPIDER_NET_GMACST   0x00000110

Definition at line 110 of file spider_net.h.

#define SPIDER_NET_GMACTXPAUSE   0x00000164

Definition at line 115 of file spider_net.h.

#define SPIDER_NET_GMACUNIMACL   0x000001c8

Definition at line 121 of file spider_net.h.

#define SPIDER_NET_GMACUNIMACU   0x000001c0

Definition at line 120 of file spider_net.h.

#define SPIDER_NET_GMRMHFILnR   0x00000400

Definition at line 123 of file spider_net.h.

#define SPIDER_NET_GMRUA0FIL15R   0x00000578

Definition at line 127 of file spider_net.h.

#define SPIDER_NET_GMRUAFILnR   0x00000500

Definition at line 126 of file spider_net.h.

#define SPIDER_NET_GMRWOLCTRL   0x00000068

Definition at line 98 of file spider_net.h.

#define SPIDER_NET_GONETIMENUM   0x00000040

Definition at line 88 of file spider_net.h.

#define SPIDER_NET_GPCCTRL   0x00000054

Definition at line 93 of file spider_net.h.

#define SPIDER_NET_GPCROPCMD   0x00000070

Definition at line 100 of file spider_net.h.

#define SPIDER_NET_GPCWOPCMD   0x0000006c

Definition at line 99 of file spider_net.h.

#define SPIDER_NET_GPRDAT_MASK   0x0000ffff

Definition at line 348 of file spider_net.h.

#define SPIDER_NET_GPREXEC   0x80000000

Definition at line 347 of file spider_net.h.

#define SPIDER_NET_GREINTNUM   0x00000024

Definition at line 78 of file spider_net.h.

#define SPIDER_NET_GRESUMINTNUM   0x00000020

Definition at line 77 of file spider_net.h.

#define SPIDER_NET_GRXDMAEN   0x00000064

Definition at line 97 of file spider_net.h.

#define SPIDER_NET_GRXMDSET   0x00000058

Definition at line 94 of file spider_net.h.

#define SPIDER_NET_GSINIT   0x00000080

Definition at line 104 of file spider_net.h.

#define SPIDER_NET_GSnPRGADR   0x00000084

Definition at line 105 of file spider_net.h.

#define SPIDER_NET_GSnPRGDAT   0x00000088

Definition at line 106 of file spider_net.h.

#define SPIDER_NET_GTESTMD   0x0000007c

Definition at line 102 of file spider_net.h.

#define SPIDER_NET_GTOUTFRMNUM   0x00000044

Definition at line 90 of file spider_net.h.

#define SPIDER_NET_GTTFRMCNT   0x00000078

Definition at line 101 of file spider_net.h.

#define SPIDER_NET_GTTQMSK   0x00000934

Definition at line 129 of file spider_net.h.

#define SPIDER_NET_GTXMDSET   0x00000050

Definition at line 92 of file spider_net.h.

#define SPIDER_NET_INT0_MASK_VALUE   0x3f7fe2c7

interrupt mask registers

Definition at line 161 of file spider_net.h.

#define SPIDER_NET_INT1_MASK_VALUE   0x0000fff2

Definition at line 162 of file spider_net.h.

#define SPIDER_NET_INT2_MASK_VALUE   0x000003f1

Definition at line 163 of file spider_net.h.

#define SPIDER_NET_IPSECINIT_VALUE   0x6f716f71

Definition at line 183 of file spider_net.h.

#define SPIDER_NET_LENLMT_VALUE   0x00000908

Definition at line 190 of file spider_net.h.

#define SPIDER_NET_LINKINT   ( 1 << SPIDER_NET_GMAC2INT )

Definition at line 340 of file spider_net.h.

#define SPIDER_NET_MACAPAUSE_VALUE   0x00000800 /* about 1 ms */

Definition at line 192 of file spider_net.h.

#define SPIDER_NET_MACMODE_VALUE   0x00000001

Definition at line 195 of file spider_net.h.

#define SPIDER_NET_MAX_FRAME   2312

Definition at line 39 of file spider_net.h.

#define SPIDER_NET_MAX_MTU   2294

Definition at line 40 of file spider_net.h.

#define SPIDER_NET_MIN_MTU   64

Definition at line 41 of file spider_net.h.

#define SPIDER_NET_MULTICAST_HASHES   256

Definition at line 124 of file spider_net.h.

#define SPIDER_NET_NAPI_WEIGHT   64

Definition at line 60 of file spider_net.h.

#define SPIDER_NET_NONPROMISC_VALUE   0x00000000

Definition at line 232 of file spider_net.h.

#define SPIDER_NET_OPMODE_VALUE   0x00000067

Definition at line 188 of file spider_net.h.

#define SPIDER_NET_PHY_CTRL_VALUE   0x00040040

Definition at line 173 of file spider_net.h.

#define SPIDER_NET_PROMISC_VALUE   0x00080000

Definition at line 231 of file spider_net.h.

#define SPIDER_NET_RESTART_VALUE   0x00000000

Definition at line 178 of file spider_net.h.

#define SPIDER_NET_RUN_SEQ_VALUE   0x0000007e

Definition at line 171 of file spider_net.h.

#define SPIDER_NET_RX_CSUM_DEFAULT   1

Definition at line 57 of file spider_net.h.

#define SPIDER_NET_RX_DESCRIPTORS_DEFAULT   256

Definition at line 45 of file spider_net.h.

#define SPIDER_NET_RX_DESCRIPTORS_MAX   512

Definition at line 47 of file spider_net.h.

#define SPIDER_NET_RX_DESCRIPTORS_MIN   16

Definition at line 46 of file spider_net.h.

#define SPIDER_NET_RX_IPCHK   29

Definition at line 416 of file spider_net.h.

#define SPIDER_NET_RX_IPCHKERR   27

Definition at line 423 of file spider_net.h.

#define SPIDER_NET_RX_RXTCPCHKERR   28

Definition at line 424 of file spider_net.h.

#define SPIDER_NET_RX_TCPCHK   28

Definition at line 417 of file spider_net.h.

#define SPIDER_NET_RXBUF_ALIGN   128

Definition at line 43 of file spider_net.h.

#define SPIDER_NET_RXINT   ( (1 << SPIDER_NET_GDAFDCINT) )

Definition at line 338 of file spider_net.h.

#define SPIDER_NET_RXMODE_VALUE   0x00000011

Definition at line 175 of file spider_net.h.

#define SPIDER_NET_SBIMSTATE_VALUE   0x00000000

Definition at line 241 of file spider_net.h.

#define SPIDER_NET_SBTMSTATE_VALUE   0x00000000

Definition at line 242 of file spider_net.h.

#define SPIDER_NET_SCONFIG_IOACTE   0x00002810

SCONFIG registers

Definition at line 158 of file spider_net.h.

#define SPIDER_NET_STOP_SEQ_VALUE   0x00000000

Definition at line 170 of file spider_net.h.

#define SPIDER_NET_TX_DESCRIPTORS_DEFAULT   256

Definition at line 49 of file spider_net.h.

#define SPIDER_NET_TX_DESCRIPTORS_MAX   512

Definition at line 51 of file spider_net.h.

#define SPIDER_NET_TX_DESCRIPTORS_MIN   16

Definition at line 50 of file spider_net.h.

#define SPIDER_NET_TX_DMA_EN   0x80000000

Definition at line 220 of file spider_net.h.

#define SPIDER_NET_TX_TIMER   (HZ/5)

Definition at line 53 of file spider_net.h.

#define SPIDER_NET_TXDCEST   0x08000000

Definition at line 354 of file spider_net.h.

#define SPIDER_NET_TXINT   (1 << SPIDER_NET_GDTFDCINT)

Definition at line 335 of file spider_net.h.

#define SPIDER_NET_TXMODE_VALUE   0x00010000

Definition at line 177 of file spider_net.h.

#define SPIDER_NET_TXPAUSE_VALUE   0x00000000

Definition at line 193 of file spider_net.h.

#define SPIDER_NET_UA_DESCR_VALUE   0x00080000

Definition at line 230 of file spider_net.h.

#define SPIDER_NET_VLAN_PACKET   21

Definition at line 418 of file spider_net.h.

#define SPIDER_NET_WATCHDOG_TIMEOUT   50*HZ

Definition at line 59 of file spider_net.h.

#define SPIDER_NET_WOL_VALUE   0x00001111

Definition at line 179 of file spider_net.h.

#define VERSION   "2.0 B"

Definition at line 28 of file spider_net.h.

Enumeration Type Documentation

Enumerator:
SPIDER_NET_GPHYINT 
SPIDER_NET_GMAC2INT 
SPIDER_NET_GMAC1INT 
SPIDER_NET_GIPSINT 
SPIDER_NET_GFIFOINT 
SPIDER_NET_GDMACINT 
SPIDER_NET_GSYSINT 
SPIDER_NET_GPWOPCMPINT 
SPIDER_NET_GPROPCMPINT 
SPIDER_NET_GPWFFINT 
SPIDER_NET_GRMDADRINT 
SPIDER_NET_GRMARPINT 
SPIDER_NET_GRMMPINT 
SPIDER_NET_GDTDEN0INT 
SPIDER_NET_GDDDEN0INT 
SPIDER_NET_GDCDEN0INT 
SPIDER_NET_GDBDEN0INT 
SPIDER_NET_GDADEN0INT 
SPIDER_NET_GDTFDCINT 
SPIDER_NET_GDDFDCINT 
SPIDER_NET_GDCFDCINT 
SPIDER_NET_GDBFDCINT 
SPIDER_NET_GDAFDCINT 
SPIDER_NET_GTTEDINT 
SPIDER_NET_GDTDCEINT 
SPIDER_NET_GRFDNMINT 
SPIDER_NET_GRFCNMINT 
SPIDER_NET_GRFBNMINT 
SPIDER_NET_GRFANMINT 
SPIDER_NET_GRFNMINT 
SPIDER_NET_G1TMCNTINT 
SPIDER_NET_GFREECNTINT 

Definition at line 246 of file spider_net.h.

Enumerator:
SPIDER_NET_GTMFLLINT 
SPIDER_NET_GRMFLLINT 
SPIDER_NET_GTMSHTINT 
SPIDER_NET_GDTINVDINT 
SPIDER_NET_GRFDFLLINT 
SPIDER_NET_GDDDCEINT 
SPIDER_NET_GDDINVDINT 
SPIDER_NET_GRFCFLLINT 
SPIDER_NET_GDCDCEINT 
SPIDER_NET_GDCINVDINT 
SPIDER_NET_GRFBFLLINT 
SPIDER_NET_GDBDCEINT 
SPIDER_NET_GDBINVDINT 
SPIDER_NET_GRFAFLLINT 
SPIDER_NET_GDADCEINT 
SPIDER_NET_GDAINVDINT 
SPIDER_NET_GDTRSERINT 
SPIDER_NET_GDDRSERINT 
SPIDER_NET_GDCRSERINT 
SPIDER_NET_GDBRSERINT 
SPIDER_NET_GDARSERINT 
SPIDER_NET_GDSERINT 
SPIDER_NET_GDTPTERINT 
SPIDER_NET_GDDPTERINT 
SPIDER_NET_GDCPTERINT 
SPIDER_NET_GDBPTERINT 
SPIDER_NET_GDAPTERINT 

Definition at line 281 of file spider_net.h.

Enumerator:
SPIDER_NET_GPROPERINT 
SPIDER_NET_GMCTCRSNGINT 
SPIDER_NET_GMCTLCOLINT 
SPIDER_NET_GMCTTMOTINT 
SPIDER_NET_GMCRCAERINT 
SPIDER_NET_GMCRCALERINT 
SPIDER_NET_GMCRALNERINT 
SPIDER_NET_GMCROVRINT 
SPIDER_NET_GMCRRNTINT 
SPIDER_NET_GMCRRXERINT 
SPIDER_NET_GTITCSERINT 
SPIDER_NET_GTIFMTERINT 
SPIDER_NET_GTIPKTRVKINT 
SPIDER_NET_GTISPINGINT 
SPIDER_NET_GTISADNGINT 
SPIDER_NET_GTISPDNGINT 
SPIDER_NET_GRIFMTERINT 
SPIDER_NET_GRIPKTRVKINT 
SPIDER_NET_GRISPINGINT 
SPIDER_NET_GRISADNGINT 
SPIDER_NET_GRISPDNGINT 

Definition at line 311 of file spider_net.h.

Function Documentation

int spider_net_open ( struct net_device netdev)

spider_net_open - called upon ifonfig up : interface device structure

returns 0 on success, <0 on failure

spider_net_open allocates all the descriptors and memory needed for operation, sets up multicast list and enables interrupts

Definition at line 1968 of file spider_net.c.

int spider_net_stop ( struct net_device netdev)

spider_net_stop - called upon ifconfig down : interface device structure

always returns 0

Definition at line 2176 of file spider_net.c.

Variable Documentation

u32 buf_addr

Definition at line 396 of file spider_net.h.

u32 buf_size

Definition at line 397 of file spider_net.h.

u32 data_error

Definition at line 403 of file spider_net.h.

u32 data_status

Definition at line 402 of file spider_net.h.

u32 dmac_cmd_status

Definition at line 399 of file spider_net.h.

u32 next_descr_addr

Definition at line 398 of file spider_net.h.

u32 result_size

Definition at line 400 of file spider_net.h.

char spider_net_driver_name[]

Definition at line 74 of file spider_net.c.

struct ethtool_ops spider_net_ethtool_ops

Definition at line 166 of file spider_net_ethtool.c.

u32 valid_size

Definition at line 401 of file spider_net.h.