Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Variables
pm3393.c File Reference
#include "common.h"
#include "regs.h"
#include "gmac.h"
#include "elmer0.h"
#include "suni1x10gexp_regs.h"
#include <linux/crc32.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  _cmac_instance
 

Macros

#define OFFSET(REG_ADDR)   ((REG_ADDR) << 2)
 
#define MAX_FRAME_SIZE   9600
 
#define IPG   12
 
#define TXXG_CONF1_VAL
 
#define RXXG_CONF1_VAL
 
#define STATS_TICK_SECS   (15 * 60)
 
#define RMON_UPDATE(mac, name, stat_name)
 

Enumerations

enum  {
  RxOctetsReceivedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_1_LOW, RxUnicastFramesReceivedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_4_LOW, RxMulticastFramesReceivedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_5_LOW, RxBroadcastFramesReceivedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_6_LOW,
  RxPAUSEMACCtrlFramesReceived = SUNI1x10GEXP_REG_MSTAT_COUNTER_8_LOW, RxFrameCheckSequenceErrors = SUNI1x10GEXP_REG_MSTAT_COUNTER_10_LOW, RxFramesLostDueToInternalMACErrors = SUNI1x10GEXP_REG_MSTAT_COUNTER_11_LOW, RxSymbolErrors = SUNI1x10GEXP_REG_MSTAT_COUNTER_12_LOW,
  RxInRangeLengthErrors = SUNI1x10GEXP_REG_MSTAT_COUNTER_13_LOW, RxFramesTooLongErrors = SUNI1x10GEXP_REG_MSTAT_COUNTER_15_LOW, RxJabbers = SUNI1x10GEXP_REG_MSTAT_COUNTER_16_LOW, RxFragments = SUNI1x10GEXP_REG_MSTAT_COUNTER_17_LOW,
  RxUndersizedFrames = SUNI1x10GEXP_REG_MSTAT_COUNTER_18_LOW, RxJumboFramesReceivedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_25_LOW, RxJumboOctetsReceivedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_26_LOW, TxOctetsTransmittedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_33_LOW,
  TxFramesLostDueToInternalMACTransmissionError = SUNI1x10GEXP_REG_MSTAT_COUNTER_35_LOW, TxTransmitSystemError = SUNI1x10GEXP_REG_MSTAT_COUNTER_36_LOW, TxUnicastFramesTransmittedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_38_LOW, TxMulticastFramesTransmittedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_40_LOW,
  TxBroadcastFramesTransmittedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_42_LOW, TxPAUSEMACCtrlFramesTransmitted = SUNI1x10GEXP_REG_MSTAT_COUNTER_43_LOW, TxJumboFramesReceivedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_51_LOW, TxJumboOctetsReceivedOK = SUNI1x10GEXP_REG_MSTAT_COUNTER_52_LOW
}
 

Variables

struct gmac t1_pm3393_ops
 

Macro Definition Documentation

#define IPG   12

Definition at line 54 of file pm3393.c.

#define MAX_FRAME_SIZE   9600

Definition at line 52 of file pm3393.c.

#define OFFSET (   REG_ADDR)    ((REG_ADDR) << 2)

Definition at line 49 of file pm3393.c.

#define RMON_UPDATE (   mac,
  name,
  stat_name 
)
Value:
{ \
t1_tpi_read((mac)->adapter, OFFSET(name), &val0); \
t1_tpi_read((mac)->adapter, OFFSET((name)+1), &val1); \
t1_tpi_read((mac)->adapter, OFFSET((name)+2), &val2); \
(mac)->stats.stat_name = (u64)(val0 & 0xffff) | \
((u64)(val1 & 0xffff) << 16) | \
((u64)(val2 & 0xff) << 32) | \
((mac)->stats.stat_name & \
0xffffff0000000000ULL); \
if (ro & \
(mac)->stats.stat_name += 1ULL << 40; \
}

Definition at line 434 of file pm3393.c.

#define RXXG_CONF1_VAL
Value:
SUNI1x10GEXP_BITMSK_RXXG_FLCHK | SUNI1x10GEXP_BITMSK_RXXG_CRC_STRIP)

Definition at line 58 of file pm3393.c.

#define STATS_TICK_SECS   (15 * 60)

Definition at line 62 of file pm3393.c.

#define TXXG_CONF1_VAL

Enumeration Type Documentation

anonymous enum
Enumerator:
RxOctetsReceivedOK 
RxUnicastFramesReceivedOK 
RxMulticastFramesReceivedOK 
RxBroadcastFramesReceivedOK 
RxPAUSEMACCtrlFramesReceived 
RxFrameCheckSequenceErrors 
RxFramesLostDueToInternalMACErrors 
RxSymbolErrors 
RxInRangeLengthErrors 
RxFramesTooLongErrors 
RxJabbers 
RxFragments 
RxUndersizedFrames 
RxJumboFramesReceivedOK 
RxJumboOctetsReceivedOK 
TxOctetsTransmittedOK 
TxFramesLostDueToInternalMACTransmissionError 
TxTransmitSystemError 
TxUnicastFramesTransmittedOK 
TxMulticastFramesTransmittedOK 
TxBroadcastFramesTransmittedOK 
TxPAUSEMACCtrlFramesTransmitted 
TxJumboFramesReceivedOK 
TxJumboOctetsReceivedOK 

Definition at line 64 of file pm3393.c.

Variable Documentation

struct gmac t1_pm3393_ops
Initial value:
= {
.stats_update_period = STATS_TICK_SECS,
.create = pm3393_mac_create,
.reset = pm3393_mac_reset,
}

Definition at line 792 of file pm3393.c.