Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
sb1250-mac.c File Reference
#include <linux/bug.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/prefetch.h>
#include <asm/cache.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/sibyte/board.h>
#include <asm/sibyte/sb1250.h>
#include <asm/sibyte/sb1250_scd.h>
#include <asm/sibyte/sb1250_mac.h>
#include <asm/sibyte/sb1250_dma.h>

Go to the source code of this file.

Data Structures

struct  sbdmadscr
 
struct  sbmacdma
 
struct  sbmac_softc
 

Macros

#define CONFIG_SBMAC_COALESCE
 
#define TX_TIMEOUT   (2*HZ)
 
#define SBMAC_PHY_INT   PHY_POLL
 
#define SBDMA_NEXTBUF(d, f)
 
#define NUMCACHEBLKS(x)   (((x)+SMP_CACHE_BYTES-1)/SMP_CACHE_BYTES)
 
#define SBMAC_MAX_TXDESCR   256
 
#define SBMAC_MAX_RXDESCR   256
 
#define ENET_PACKET_SIZE   1518
 
#define MII_COMMAND_START   0x01
 
#define MII_COMMAND_READ   0x02
 
#define MII_COMMAND_WRITE   0x01
 
#define MII_COMMAND_ACK   0x02
 
#define M_MAC_MDIO_DIR_OUTPUT   0 /* for clarity */
 
#define ENABLE   1
 
#define DISABLE   0
 

Enumerations

enum  sbmac_speed { sbmac_speed_none = 0, sbmac_speed_10 = SPEED_10, sbmac_speed_100 = SPEED_100, sbmac_speed_1000 = SPEED_1000 }
 
enum  sbmac_duplex { sbmac_duplex_none = -1, sbmac_duplex_half = DUPLEX_HALF, sbmac_duplex_full = DUPLEX_FULL }
 
enum  sbmac_fc {
  sbmac_fc_none, sbmac_fc_disabled, sbmac_fc_frame, sbmac_fc_collision,
  sbmac_fc_carrier
}
 
enum  sbmac_state { sbmac_state_uninit, sbmac_state_off, sbmac_state_on, sbmac_state_broken }
 

Functions

 MODULE_AUTHOR ("Mitch Lichtenberg (Broadcom Corp.)")
 
 MODULE_DESCRIPTION ("Broadcom SiByte SOC GB Ethernet driver")
 
 module_param (debug, int, S_IRUGO)
 
 MODULE_PARM_DESC (debug,"Debug messages")
 
 module_param (int_pktcnt_tx, int, S_IRUGO)
 
 MODULE_PARM_DESC (int_pktcnt_tx,"TX packet count")
 
 module_param (int_timeout_tx, int, S_IRUGO)
 
 MODULE_PARM_DESC (int_timeout_tx,"TX timeout value")
 
 module_param (int_pktcnt_rx, int, S_IRUGO)
 
 MODULE_PARM_DESC (int_pktcnt_rx,"RX packet count")
 
 module_param (int_timeout_rx, int, S_IRUGO)
 
 MODULE_PARM_DESC (int_timeout_rx,"RX timeout value")
 
 module_platform_driver (sbmac_driver)
 

Macro Definition Documentation

#define CONFIG_SBMAC_COALESCE

Definition at line 54 of file sb1250-mac.c.

#define DISABLE   0

Definition at line 351 of file sb1250-mac.c.

#define ENABLE   1

Definition at line 350 of file sb1250-mac.c.

#define ENET_PACKET_SIZE   1518

Definition at line 166 of file sb1250-mac.c.

#define M_MAC_MDIO_DIR_OUTPUT   0 /* for clarity */

Definition at line 348 of file sb1250-mac.c.

#define MII_COMMAND_ACK   0x02

Definition at line 346 of file sb1250-mac.c.

#define MII_COMMAND_READ   0x02

Definition at line 344 of file sb1250-mac.c.

#define MII_COMMAND_START   0x01

Definition at line 343 of file sb1250-mac.c.

#define MII_COMMAND_WRITE   0x01

Definition at line 345 of file sb1250-mac.c.

#define NUMCACHEBLKS (   x)    (((x)+SMP_CACHE_BYTES-1)/SMP_CACHE_BYTES)

Definition at line 161 of file sb1250-mac.c.

#define SBDMA_NEXTBUF (   d,
  f 
)
Value:
((((d)->f+1) == (d)->sbdma_dscrtable_end) ? \
(d)->sbdma_dscrtable : (d)->f+1)

Definition at line 157 of file sb1250-mac.c.

#define SBMAC_MAX_RXDESCR   256

Definition at line 164 of file sb1250-mac.c.

#define SBMAC_MAX_TXDESCR   256

Definition at line 163 of file sb1250-mac.c.

#define SBMAC_PHY_INT   PHY_POLL

Definition at line 116 of file sb1250-mac.c.

#define TX_TIMEOUT   (2*HZ)

Definition at line 57 of file sb1250-mac.c.

Enumeration Type Documentation

Enumerator:
sbmac_duplex_none 
sbmac_duplex_half 
sbmac_duplex_full 

Definition at line 130 of file sb1250-mac.c.

enum sbmac_fc
Enumerator:
sbmac_fc_none 
sbmac_fc_disabled 
sbmac_fc_frame 
sbmac_fc_collision 
sbmac_fc_carrier 

Definition at line 136 of file sb1250-mac.c.

Enumerator:
sbmac_speed_none 
sbmac_speed_10 
sbmac_speed_100 
sbmac_speed_1000 

Definition at line 123 of file sb1250-mac.c.

Enumerator:
sbmac_state_uninit 
sbmac_state_off 
sbmac_state_on 
sbmac_state_broken 

Definition at line 144 of file sb1250-mac.c.

Function Documentation

MODULE_AUTHOR ( "Mitch Lichtenberg (Broadcom Corp.)"  )
MODULE_DESCRIPTION ( "Broadcom SiByte SOC GB Ethernet driver )
module_param ( debug  ,
int  ,
S_IRUGO   
)
module_param ( int_pktcnt_tx  ,
int  ,
S_IRUGO   
)
module_param ( int_timeout_tx  ,
int  ,
S_IRUGO   
)
module_param ( int_pktcnt_rx  ,
int  ,
S_IRUGO   
)
module_param ( int_timeout_rx  ,
int  ,
S_IRUGO   
)
MODULE_PARM_DESC ( debug  ,
"Debug messages"   
)
MODULE_PARM_DESC ( int_pktcnt_tx  ,
"TX packet count  
)
MODULE_PARM_DESC ( int_timeout_tx  ,
"TX timeout value  
)
MODULE_PARM_DESC ( int_pktcnt_rx  ,
"RX packet count  
)
MODULE_PARM_DESC ( int_timeout_rx  ,
"RX timeout value  
)
module_platform_driver ( sbmac_driver  )