Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
sge.c File Reference
#include "common.h"
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/ktime.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/if_vlan.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/tcp.h>
#include <linux/ip.h>
#include <linux/in.h>
#include <linux/if_arp.h>
#include <linux/slab.h>
#include <linux/prefetch.h>
#include "cpl5_cmd.h"
#include "sge.h"
#include "regs.h"
#include "espi.h"

Go to the source code of this file.

Data Structures

struct  cmdQ_ce
 
struct  freelQ_ce
 
struct  cmdQ
 
struct  freelQ
 
struct  respQ
 
struct  sched_port
 
struct  sched
 
struct  sge
 

Macros

#define ETH_P_CPL5   0xf
 
#define SGE_CMDQ_N   2
 
#define SGE_FREELQ_N   2
 
#define SGE_CMDQ0_E_N   1024
 
#define SGE_CMDQ1_E_N   128
 
#define SGE_FREEL_SIZE   4096
 
#define SGE_JUMBO_FREEL_SIZE   512
 
#define SGE_FREEL_REFILL_THRESH   16
 
#define SGE_RESPQ_E_N   1024
 
#define SGE_INTRTIMER_NRES   1000
 
#define SGE_RX_SM_BUF_SIZE   1536
 
#define SGE_TX_DESC_MAX_PLEN   16384
 
#define SGE_RESPQ_REPLENISH_THRES   (SGE_RESPQ_E_N / 4)
 
#define TX_RECLAIM_PERIOD   (HZ / 4)
 
#define M_CMD_LEN   0x7fffffff
 
#define V_CMD_LEN(v)   (v)
 
#define G_CMD_LEN(v)   ((v) & M_CMD_LEN)
 
#define V_CMD_GEN1(v)   ((v) << 31)
 
#define V_CMD_GEN2(v)   (v)
 
#define F_CMD_DATAVALID   (1 << 1)
 
#define F_CMD_SOP   (1 << 2)
 
#define V_CMD_EOP(v)   ((v) << 3)
 
#define SGE_PL_INTR_MASK   (F_PL_INTR_SGE_ERR | F_PL_INTR_SGE_DATA)
 
#define SGE_INT_FATAL   (F_RESPQ_OVERFLOW | F_PACKET_TOO_BIG | F_PACKET_MISMATCH)
 
#define SGE_INT_ENABLE
 
#define MK_ETH_TYPE_MSS(type, mss)   (((mss) & 0x3FFF) | ((type) << 14))
 

Enumerations

enum  { CMDQ_STAT_RUNNING = 1, CMDQ_STAT_LAST_PKT_DB = 2 }
 

Functions

unsigned int t1_sched_update_parms (struct sge *sge, unsigned int port, unsigned int mtu, unsigned int speed)
 
void t1_vlan_mode (struct adapter *adapter, netdev_features_t features)
 
void t1_sge_destroy (struct sge *sge)
 
void t1_sge_intr_disable (struct sge *sge)
 
void t1_sge_intr_enable (struct sge *sge)
 
void t1_sge_intr_clear (struct sge *sge)
 
int t1_sge_intr_error_handler (struct sge *sge)
 
struct sge_intr_countst1_sge_get_intr_counts (const struct sge *sge)
 
void t1_sge_get_port_stats (const struct sge *sge, int port, struct sge_port_stats *ss)
 
 module_param (copybreak, int, 0)
 
 MODULE_PARM_DESC (copybreak,"Receive copy threshold")
 
int t1_poll (struct napi_struct *napi, int budget)
 
irqreturn_t t1_interrupt (int irq, void *data)
 
netdev_tx_t t1_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
int t1_sge_set_coalesce_params (struct sge *sge, struct sge_params *p)
 
int t1_sge_configure (struct sge *sge, struct sge_params *p)
 
void t1_sge_stop (struct sge *sge)
 
void t1_sge_start (struct sge *sge)
 
struct sge *__devinit t1_sge_create (struct adapter *adapter, struct sge_params *p)
 

Macro Definition Documentation

#define ETH_P_CPL5   0xf

Definition at line 65 of file sge.c.

#define F_CMD_DATAVALID   (1 << 1)

Definition at line 92 of file sge.c.

#define F_CMD_SOP   (1 << 2)

Definition at line 93 of file sge.c.

#define G_CMD_LEN (   v)    ((v) & M_CMD_LEN)

Definition at line 89 of file sge.c.

#define M_CMD_LEN   0x7fffffff

Definition at line 87 of file sge.c.

#define MK_ETH_TYPE_MSS (   type,
  mss 
)    (((mss) & 0x3FFF) | ((type) << 14))

Definition at line 1768 of file sge.c.

#define SGE_CMDQ0_E_N   1024

Definition at line 69 of file sge.c.

#define SGE_CMDQ1_E_N   128

Definition at line 70 of file sge.c.

#define SGE_CMDQ_N   2

Definition at line 67 of file sge.c.

#define SGE_FREEL_REFILL_THRESH   16

Definition at line 73 of file sge.c.

#define SGE_FREEL_SIZE   4096

Definition at line 71 of file sge.c.

#define SGE_FREELQ_N   2

Definition at line 68 of file sge.c.

#define SGE_INT_ENABLE
Value:

Definition at line 912 of file sge.c.

#define SGE_INT_FATAL   (F_RESPQ_OVERFLOW | F_PACKET_TOO_BIG | F_PACKET_MISMATCH)

Definition at line 911 of file sge.c.

#define SGE_INTRTIMER_NRES   1000

Definition at line 75 of file sge.c.

#define SGE_JUMBO_FREEL_SIZE   512

Definition at line 72 of file sge.c.

#define SGE_PL_INTR_MASK   (F_PL_INTR_SGE_ERR | F_PL_INTR_SGE_DATA)

Definition at line 910 of file sge.c.

#define SGE_RESPQ_E_N   1024

Definition at line 74 of file sge.c.

#define SGE_RESPQ_REPLENISH_THRES   (SGE_RESPQ_E_N / 4)

Definition at line 79 of file sge.c.

#define SGE_RX_SM_BUF_SIZE   1536

Definition at line 76 of file sge.c.

#define SGE_TX_DESC_MAX_PLEN   16384

Definition at line 77 of file sge.c.

#define TX_RECLAIM_PERIOD   (HZ / 4)

Definition at line 85 of file sge.c.

#define V_CMD_EOP (   v)    ((v) << 3)

Definition at line 94 of file sge.c.

#define V_CMD_GEN1 (   v)    ((v) << 31)

Definition at line 90 of file sge.c.

#define V_CMD_GEN2 (   v)    (v)

Definition at line 91 of file sge.c.

#define V_CMD_LEN (   v)    (v)

Definition at line 88 of file sge.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
CMDQ_STAT_RUNNING 
CMDQ_STAT_LAST_PKT_DB 

Definition at line 220 of file sge.c.

Function Documentation

module_param ( copybreak  ,
int  ,
 
)
MODULE_PARM_DESC ( copybreak  ,
"Receive copy threshold  
)
irqreturn_t t1_interrupt ( int  irq,
void data 
)

Definition at line 1629 of file sge.c.

int t1_poll ( struct napi_struct napi,
int  budget 
)

Definition at line 1616 of file sge.c.

unsigned int t1_sched_update_parms ( struct sge sge,
unsigned int  port,
unsigned int  mtu,
unsigned int  speed 
)

Definition at line 299 of file sge.c.

int t1_sge_configure ( struct sge sge,
struct sge_params p 
)

Definition at line 1935 of file sge.c.

struct sge* __devinit t1_sge_create ( struct adapter adapter,
struct sge_params p 
)
read

Definition at line 2074 of file sge.c.

void t1_sge_destroy ( struct sge sge)

Definition at line 814 of file sge.c.

struct sge_intr_counts* t1_sge_get_intr_counts ( const struct sge sge)
read

Definition at line 986 of file sge.c.

void t1_sge_get_port_stats ( const struct sge sge,
int  port,
struct sge_port_stats ss 
)

Definition at line 991 of file sge.c.

void t1_sge_intr_clear ( struct sge sge)

Definition at line 943 of file sge.c.

void t1_sge_intr_disable ( struct sge sge)

Definition at line 918 of file sge.c.

void t1_sge_intr_enable ( struct sge sge)

Definition at line 929 of file sge.c.

int t1_sge_intr_error_handler ( struct sge sge)

Definition at line 952 of file sge.c.

int t1_sge_set_coalesce_params ( struct sge sge,
struct sge_params p 
)

Definition at line 1923 of file sge.c.

void t1_sge_start ( struct sge sge)

Definition at line 1978 of file sge.c.

void t1_sge_stop ( struct sge sge)

Definition at line 1958 of file sge.c.

netdev_tx_t t1_start_xmit ( struct sk_buff skb,
struct net_device dev 
)

Definition at line 1786 of file sge.c.

void t1_vlan_mode ( struct adapter adapter,
netdev_features_t  features 
)

Definition at line 745 of file sge.c.