Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
igb_main.c File Reference
#include <linux/module.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/vmalloc.h>
#include <linux/pagemap.h>
#include <linux/netdevice.h>
#include <linux/ipv6.h>
#include <linux/slab.h>
#include <net/checksum.h>
#include <net/ip6_checksum.h>
#include <linux/net_tstamp.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/if.h>
#include <linux/if_vlan.h>
#include <linux/pci.h>
#include <linux/pci-aspm.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/sctp.h>
#include <linux/if_ether.h>
#include <linux/aer.h>
#include <linux/prefetch.h>
#include <linux/pm_runtime.h>
#include "igb.h"

Go to the source code of this file.

Data Structures

struct  igb_reg_info
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define MAJ   4
 
#define MIN   0
 
#define BUILD   1
 
#define DRV_VERSION
 
#define DEFAULT_MSG_ENABLE   (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)
 
#define Q_IDX_82576(i)   (((i & 0x1) << 3) + (i >> 1))
 
#define IGB_N0_QUEUE   -1
 
#define IGB_STAGGERED_QUEUE_OFFSET   8
 
#define IGB_MAX_TXD_PWR   15
 
#define IGB_MAX_DATA_PER_TXD   (1<<IGB_MAX_TXD_PWR)
 
#define MAX_STD_JUMBO_FRAME_SIZE   9238
 
#define PHY_IDLE_ERROR_COUNT_MASK   0x00FF
 
#define E1000_CTRL_ADVD3WUC   0x00100000
 
#define E1000_CTRL_EN_PHY_PWR_MGMT   0x00200000
 

Enumerations

enum  latency_range {
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255,
  lowest_latency = 0, low_latency = 1, bulk_latency = 2, latency_invalid = 255
}
 

Functions

 MODULE_DEVICE_TABLE (pci, igb_pci_tbl)
 
void igb_reset (struct igb_adapter *)
 
 MODULE_AUTHOR ("Intel Corporation, <[email protected]>")
 
 MODULE_DESCRIPTION ("Intel(R) Gigabit Ethernet Network Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_VERSION)
 
 module_param (debug, int, 0)
 
 MODULE_PARM_DESC (debug,"Debug level (0=none,...,16=all)")
 
struct net_deviceigb_get_hw_dev (struct e1000_hw *hw)
 
 module_init (igb_init_module)
 
 module_exit (igb_exit_module)
 
void igb_power_up_link (struct igb_adapter *adapter)
 
int igb_up (struct igb_adapter *adapter)
 
void igb_down (struct igb_adapter *adapter)
 
void igb_reinit_locked (struct igb_adapter *adapter)
 
void igb_set_fw_version (struct igb_adapter *adapter)
 
int igb_setup_tx_resources (struct igb_ring *tx_ring)
 
void igb_setup_tctl (struct igb_adapter *adapter)
 
void igb_configure_tx_ring (struct igb_adapter *adapter, struct igb_ring *ring)
 
int igb_setup_rx_resources (struct igb_ring *rx_ring)
 
void igb_setup_rctl (struct igb_adapter *adapter)
 
void igb_configure_rx_ring (struct igb_adapter *adapter, struct igb_ring *ring)
 
void igb_free_tx_resources (struct igb_ring *tx_ring)
 
void igb_unmap_and_free_tx_resource (struct igb_ring *ring, struct igb_tx_buffer *tx_buffer)
 
void igb_free_rx_resources (struct igb_ring *rx_ring)
 
bool igb_has_link (struct igb_adapter *adapter)
 
netdev_tx_t igb_xmit_frame_ring (struct sk_buff *skb, struct igb_ring *tx_ring)
 
void igb_update_stats (struct igb_adapter *adapter, struct rtnl_link_stats64 *net_stats)
 
void igb_alloc_rx_buffers (struct igb_ring *rx_ring, u16 cleaned_count)
 
s32 igb_read_pcie_cap_reg (struct e1000_hw *hw, u32 reg, u16 *value)
 
s32 igb_write_pcie_cap_reg (struct e1000_hw *hw, u32 reg, u16 *value)
 
int igb_set_spd_dplx (struct igb_adapter *adapter, u32 spd, u8 dplx)
 

Variables

char igb_driver_name [] = "igb"
 
char igb_driver_version [] = DRV_VERSION
 

Macro Definition Documentation

#define BUILD   1

Definition at line 64 of file igb_main.c.

#define DEFAULT_MSG_ENABLE   (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)

Definition at line 244 of file igb_main.c.

#define DRV_VERSION
Value:
__stringify(BUILD) "-k"

Definition at line 65 of file igb_main.c.

#define E1000_CTRL_ADVD3WUC   0x00100000
#define E1000_CTRL_EN_PHY_PWR_MGMT   0x00200000
#define IGB_MAX_DATA_PER_TXD   (1<<IGB_MAX_TXD_PWR)

Definition at line 4203 of file igb_main.c.

#define IGB_MAX_TXD_PWR   15

Definition at line 4202 of file igb_main.c.

#define IGB_N0_QUEUE   -1

Definition at line 759 of file igb_main.c.

#define IGB_STAGGERED_QUEUE_OFFSET   8

Definition at line 3561 of file igb_main.c.

#define MAJ   4

Definition at line 62 of file igb_main.c.

#define MAX_STD_JUMBO_FRAME_SIZE   9238
#define MIN   0

Definition at line 63 of file igb_main.c.

#define PHY_IDLE_ERROR_COUNT_MASK   0x00FF
#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 28 of file igb_main.c.

#define Q_IDX_82576 (   i)    (((i & 0x1) << 3) + (i >> 1))

Definition at line 620 of file igb_main.c.

Enumeration Type Documentation

Enumerator:
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 
lowest_latency 
low_latency 
bulk_latency 
latency_invalid 

Definition at line 3789 of file igb_main.c.

Function Documentation

void igb_alloc_rx_buffers ( struct igb_ring rx_ring,
u16  cleaned_count 
)

igb_alloc_rx_buffers - Replace used receive buffers; packet split : address of board private structure

Definition at line 6117 of file igb_main.c.

void igb_configure_rx_ring ( struct igb_adapter adapter,
struct igb_ring ring 
)

igb_configure_rx_ring - Configure a receive ring after Reset : board private structure : receive ring to be configured

Configure the Rx unit of the MAC after a reset.

Definition at line 3084 of file igb_main.c.

void igb_configure_tx_ring ( struct igb_adapter adapter,
struct igb_ring ring 
)

igb_configure_tx_ring - Configure transmit ring after Reset : board private structure : tx ring to configure

Configure a transmit ring after a reset.

Definition at line 2718 of file igb_main.c.

void igb_down ( struct igb_adapter adapter)

Definition at line 1519 of file igb_main.c.

void igb_free_rx_resources ( struct igb_ring rx_ring)

igb_free_rx_resources - Free Rx Resources : ring to clean the resources from

Free all receive software resources

Definition at line 3268 of file igb_main.c.

void igb_free_tx_resources ( struct igb_ring tx_ring)

igb_free_tx_resources - Free Tx Resources per Queue : Tx descriptor ring for a specific queue

Free all transmit software resources

Definition at line 3166 of file igb_main.c.

struct net_device* igb_get_hw_dev ( struct e1000_hw hw)
read

igb_get_hw_dev - return device used by hardware layer to print debugging information

Definition at line 575 of file igb_main.c.

bool igb_has_link ( struct igb_adapter adapter)

igb_has_link - check shared code for link and determine up/down : pointer to driver private info

Definition at line 3594 of file igb_main.c.

void igb_power_up_link ( struct igb_adapter adapter)

igb_power_up_link - Power up the phy/serdes link : address of board private structure

Definition at line 1455 of file igb_main.c.

s32 igb_read_pcie_cap_reg ( struct e1000_hw hw,
u32  reg,
u16 value 
)

Definition at line 6219 of file igb_main.c.

void igb_reinit_locked ( struct igb_adapter adapter)

Definition at line 1574 of file igb_main.c.

void igb_reset ( struct igb_adapter adapter)

Definition at line 1584 of file igb_main.c.

void igb_set_fw_version ( struct igb_adapter adapter)

igb_set_fw_version - Configure version string for ethtool : adapter struct

Definition at line 1783 of file igb_main.c.

int igb_set_spd_dplx ( struct igb_adapter adapter,
u32  spd,
u8  dplx 
)

Definition at line 6312 of file igb_main.c.

void igb_setup_rctl ( struct igb_adapter adapter)

igb_setup_rctl - configure the receive control registers : Board private structure

Definition at line 2938 of file igb_main.c.

int igb_setup_rx_resources ( struct igb_ring rx_ring)

igb_setup_rx_resources - allocate Rx resources (Descriptors) : rx descriptor ring (for a specific queue) to setup

Returns 0 on success, negative on failure

Definition at line 2769 of file igb_main.c.

void igb_setup_tctl ( struct igb_adapter adapter)

igb_setup_tctl - configure the transmit control registers : Board private structure

Definition at line 2689 of file igb_main.c.

int igb_setup_tx_resources ( struct igb_ring tx_ring)

igb_setup_tx_resources - allocate Tx resources (Descriptors) : tx descriptor ring (for a specific queue) to setup

Return 0 on success, negative on failure

Definition at line 2625 of file igb_main.c.

void igb_unmap_and_free_tx_resource ( struct igb_ring ring,
struct igb_tx_buffer tx_buffer 
)

Definition at line 3197 of file igb_main.c.

int igb_up ( struct igb_adapter adapter)

igb_up - Open the interface and prepare it to handle traffic : board private structure

Definition at line 1481 of file igb_main.c.

void igb_update_stats ( struct igb_adapter adapter,
struct rtnl_link_stats64 net_stats 
)

igb_update_stats - Update the board statistics counters : board private structure

Definition at line 4580 of file igb_main.c.

s32 igb_write_pcie_cap_reg ( struct e1000_hw hw,
u32  reg,
u16 value 
)

Definition at line 6229 of file igb_main.c.

netdev_tx_t igb_xmit_frame_ring ( struct sk_buff skb,
struct igb_ring tx_ring 
)

Definition at line 4372 of file igb_main.c.

MODULE_AUTHOR ( "Intel  Corporation,
< e1000-devel @lists.sourceforge.net >"   
)
MODULE_DESCRIPTION ( "Intel(R) Gigabit Ethernet Network Driver"  )
MODULE_DEVICE_TABLE ( pci  ,
igb_pci_tbl   
)
module_exit ( igb_exit_module  )
module_init ( igb_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
 
)
MODULE_PARM_DESC ( debug  ,
"Debug level (0=none,...,16=all)"   
)
MODULE_VERSION ( DRV_VERSION  )

Variable Documentation

char igb_driver_name[] = "igb"

Definition at line 67 of file igb_main.c.

char igb_driver_version[] = DRV_VERSION

Definition at line 68 of file igb_main.c.