Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
e1000.h File Reference
#include <linux/stddef.h>
#include <linux/module.h>
#include <linux/types.h>
#include <asm/byteorder.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/string.h>
#include <linux/pagemap.h>
#include <linux/dma-mapping.h>
#include <linux/bitops.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <linux/capability.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <net/pkt_sched.h>
#include <linux/list.h>
#include <linux/reboot.h>
#include <net/checksum.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include "e1000_hw.h"

Go to the source code of this file.

Data Structures

struct  e1000_buffer
 
struct  e1000_tx_ring
 
struct  e1000_rx_ring
 
struct  e1000_adapter
 

Macros

#define BAR_0   0
 
#define BAR_1   1
 
#define BAR_5   5
 
#define INTEL_E1000_ETHERNET_DEVICE(device_id)
 
#define E1000_MAX_INTR   10
 
#define E1000_DEFAULT_TXD   256
 
#define E1000_MAX_TXD   256
 
#define E1000_MIN_TXD   48
 
#define E1000_MAX_82544_TXD   4096
 
#define E1000_DEFAULT_RXD   256
 
#define E1000_MAX_RXD   256
 
#define E1000_MIN_RXD   48
 
#define E1000_MAX_82544_RXD   4096
 
#define E1000_MIN_ITR_USECS   10 /* 100000 irq/sec */
 
#define E1000_MAX_ITR_USECS   10000 /* 100 irq/sec */
 
#define MAXIMUM_ETHERNET_VLAN_SIZE   1522
 
#define E1000_RXBUFFER_128   128 /* Used for packet split */
 
#define E1000_RXBUFFER_256   256 /* Used for packet split */
 
#define E1000_RXBUFFER_512   512
 
#define E1000_RXBUFFER_1024   1024
 
#define E1000_RXBUFFER_2048   2048
 
#define E1000_RXBUFFER_4096   4096
 
#define E1000_RXBUFFER_8192   8192
 
#define E1000_RXBUFFER_16384   16384
 
#define E1000_SMARTSPEED_DOWNSHIFT   3
 
#define E1000_SMARTSPEED_MAX   15
 
#define E1000_PBA_BYTES_SHIFT   0xA
 
#define E1000_TX_HEAD_ADDR_SHIFT   7
 
#define E1000_PBA_TX_MASK   0xFFFF0000
 
#define E1000_FC_HIGH_DIFF   0x1638 /* High: 5688 bytes below Rx FIFO size */
 
#define E1000_FC_LOW_DIFF   0x1640 /* Low: 5696 bytes below Rx FIFO size */
 
#define E1000_FC_PAUSE_TIME   0xFFFF /* pause for the max or until send xon */
 
#define E1000_TX_QUEUE_WAKE   16
 
#define E1000_RX_BUFFER_WRITE   16 /* Must be power of 2 */
 
#define AUTO_ALL_MODES   0
 
#define E1000_EEPROM_82544_APM   0x0004
 
#define E1000_EEPROM_APME   0x0400
 
#define E1000_MASTER_SLAVE   e1000_ms_hw_default
 
#define E1000_MNG_VLAN_NONE   (-1)
 
#define E1000_DESC_UNUSED(R)
 
#define E1000_RX_DESC_EXT(R, i)   (&(((union e1000_rx_desc_extended *)((R).desc))[i]))
 
#define E1000_GET_DESC(R, i, type)   (&(((struct type *)((R).desc))[i]))
 
#define E1000_RX_DESC(R, i)   E1000_GET_DESC(R, i, e1000_rx_desc)
 
#define E1000_TX_DESC(R, i)   E1000_GET_DESC(R, i, e1000_tx_desc)
 
#define E1000_CONTEXT_DESC(R, i)   E1000_GET_DESC(R, i, e1000_context_desc)
 
#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define e_dbg(format, arg...)   netdev_dbg(e1000_get_hw_dev(hw), format, ## arg)
 
#define e_err(msglvl, format, arg...)   netif_err(adapter, msglvl, adapter->netdev, format, ## arg)
 
#define e_info(msglvl, format, arg...)   netif_info(adapter, msglvl, adapter->netdev, format, ## arg)
 
#define e_warn(msglvl, format, arg...)   netif_warn(adapter, msglvl, adapter->netdev, format, ## arg)
 
#define e_notice(msglvl, format, arg...)   netif_notice(adapter, msglvl, adapter->netdev, format, ## arg)
 
#define e_dev_info(format, arg...)   dev_info(&adapter->pdev->dev, format, ## arg)
 
#define e_dev_warn(format, arg...)   dev_warn(&adapter->pdev->dev, format, ## arg)
 
#define e_dev_err(format, arg...)   dev_err(&adapter->pdev->dev, format, ## arg)
 

Enumerations

enum  e1000_state_t {
  __E1000_TESTING, __E1000_RESETTING, __E1000_DOWN, __E1000_TESTING,
  __E1000_RESETTING, __E1000_ACCESS_SHARED_RESOURCE, __E1000_DOWN, __IGB_TESTING,
  __IGB_RESETTING, __IGB_DOWN
}
 

Functions

struct net_devicee1000_get_hw_dev (struct e1000_hw *hw)
 
int e1000_up (struct e1000_adapter *adapter)
 
void e1000_down (struct e1000_adapter *adapter)
 
void e1000_reinit_locked (struct e1000_adapter *adapter)
 
void e1000_reset (struct e1000_adapter *adapter)
 
int e1000_set_spd_dplx (struct e1000_adapter *adapter, u32 spd, u8 dplx)
 
int e1000_setup_all_rx_resources (struct e1000_adapter *adapter)
 
int e1000_setup_all_tx_resources (struct e1000_adapter *adapter)
 
void e1000_free_all_rx_resources (struct e1000_adapter *adapter)
 
void e1000_free_all_tx_resources (struct e1000_adapter *adapter)
 
void e1000_update_stats (struct e1000_adapter *adapter)
 
bool e1000_has_link (struct e1000_adapter *adapter)
 
void e1000_power_up_phy (struct e1000_adapter *)
 
void e1000_set_ethtool_ops (struct net_device *netdev)
 
void e1000_check_options (struct e1000_adapter *adapter)
 
chare1000_get_hw_dev_name (struct e1000_hw *hw)
 

Variables

char e1000_driver_name []
 
const char e1000_driver_version []
 

Macro Definition Documentation

#define AUTO_ALL_MODES   0

Definition at line 133 of file e1000.h.

#define BAR_0   0

Definition at line 73 of file e1000.h.

#define BAR_1   1

Definition at line 74 of file e1000.h.

#define BAR_5   5

Definition at line 75 of file e1000.h.

#define E1000_CONTEXT_DESC (   R,
  i 
)    E1000_GET_DESC(R, i, e1000_context_desc)

Definition at line 212 of file e1000.h.

#define E1000_DEFAULT_RXD   256

Definition at line 92 of file e1000.h.

#define E1000_DEFAULT_TXD   256

Definition at line 87 of file e1000.h.

#define E1000_DESC_UNUSED (   R)
Value:
((((R)->next_to_clean > (R)->next_to_use) \
? 0 : (R)->count) + (R)->next_to_clean - (R)->next_to_use - 1)

Definition at line 203 of file e1000.h.

#define E1000_EEPROM_82544_APM   0x0004

Definition at line 134 of file e1000.h.

#define E1000_EEPROM_APME   0x0400

Definition at line 135 of file e1000.h.

#define E1000_FC_HIGH_DIFF   0x1638 /* High: 5688 bytes below Rx FIFO size */

Definition at line 123 of file e1000.h.

#define E1000_FC_LOW_DIFF   0x1640 /* Low: 5696 bytes below Rx FIFO size */

Definition at line 124 of file e1000.h.

#define E1000_FC_PAUSE_TIME   0xFFFF /* pause for the max or until send xon */

Definition at line 126 of file e1000.h.

#define E1000_GET_DESC (   R,
  i,
  type 
)    (&(((struct type *)((R).desc))[i]))

Definition at line 209 of file e1000.h.

#define E1000_MASTER_SLAVE   e1000_ms_hw_default

Definition at line 139 of file e1000.h.

#define E1000_MAX_82544_RXD   4096

Definition at line 95 of file e1000.h.

#define E1000_MAX_82544_TXD   4096

Definition at line 90 of file e1000.h.

#define E1000_MAX_INTR   10

Definition at line 84 of file e1000.h.

#define E1000_MAX_ITR_USECS   10000 /* 100 irq/sec */

Definition at line 98 of file e1000.h.

#define E1000_MAX_RXD   256

Definition at line 93 of file e1000.h.

#define E1000_MAX_TXD   256

Definition at line 88 of file e1000.h.

#define E1000_MIN_ITR_USECS   10 /* 100000 irq/sec */

Definition at line 97 of file e1000.h.

#define E1000_MIN_RXD   48

Definition at line 94 of file e1000.h.

#define E1000_MIN_TXD   48

Definition at line 89 of file e1000.h.

#define E1000_MNG_VLAN_NONE   (-1)

Definition at line 142 of file e1000.h.

#define E1000_PBA_BYTES_SHIFT   0xA

Definition at line 118 of file e1000.h.

#define E1000_PBA_TX_MASK   0xFFFF0000

Definition at line 120 of file e1000.h.

#define E1000_RX_BUFFER_WRITE   16 /* Must be power of 2 */

Definition at line 131 of file e1000.h.

#define E1000_RX_DESC (   R,
  i 
)    E1000_GET_DESC(R, i, e1000_rx_desc)

Definition at line 210 of file e1000.h.

#define E1000_RX_DESC_EXT (   R,
  i 
)    (&(((union e1000_rx_desc_extended *)((R).desc))[i]))

Definition at line 207 of file e1000.h.

#define E1000_RXBUFFER_1024   1024

Definition at line 107 of file e1000.h.

#define E1000_RXBUFFER_128   128 /* Used for packet split */

Definition at line 104 of file e1000.h.

#define E1000_RXBUFFER_16384   16384

Definition at line 111 of file e1000.h.

#define E1000_RXBUFFER_2048   2048

Definition at line 108 of file e1000.h.

#define E1000_RXBUFFER_256   256 /* Used for packet split */

Definition at line 105 of file e1000.h.

#define E1000_RXBUFFER_4096   4096

Definition at line 109 of file e1000.h.

#define E1000_RXBUFFER_512   512

Definition at line 106 of file e1000.h.

#define E1000_RXBUFFER_8192   8192

Definition at line 110 of file e1000.h.

#define E1000_SMARTSPEED_DOWNSHIFT   3

Definition at line 114 of file e1000.h.

#define E1000_SMARTSPEED_MAX   15

Definition at line 115 of file e1000.h.

#define E1000_TX_DESC (   R,
  i 
)    E1000_GET_DESC(R, i, e1000_tx_desc)

Definition at line 211 of file e1000.h.

#define E1000_TX_HEAD_ADDR_SHIFT   7

Definition at line 119 of file e1000.h.

#define E1000_TX_QUEUE_WAKE   16

Definition at line 129 of file e1000.h.

#define e_dbg (   format,
  arg... 
)    netdev_dbg(e1000_get_hw_dev(hw), format, ## arg)

Definition at line 328 of file e1000.h.

#define e_dev_err (   format,
  arg... 
)    dev_err(&adapter->pdev->dev, format, ## arg)

Definition at line 342 of file e1000.h.

#define e_dev_info (   format,
  arg... 
)    dev_info(&adapter->pdev->dev, format, ## arg)

Definition at line 338 of file e1000.h.

#define e_dev_warn (   format,
  arg... 
)    dev_warn(&adapter->pdev->dev, format, ## arg)

Definition at line 340 of file e1000.h.

#define e_err (   msglvl,
  format,
  arg... 
)    netif_err(adapter, msglvl, adapter->netdev, format, ## arg)

Definition at line 330 of file e1000.h.

#define e_info (   msglvl,
  format,
  arg... 
)    netif_info(adapter, msglvl, adapter->netdev, format, ## arg)

Definition at line 332 of file e1000.h.

#define e_notice (   msglvl,
  format,
  arg... 
)    netif_notice(adapter, msglvl, adapter->netdev, format, ## arg)

Definition at line 336 of file e1000.h.

#define e_warn (   msglvl,
  format,
  arg... 
)    netif_warn(adapter, msglvl, adapter->netdev, format, ## arg)

Definition at line 334 of file e1000.h.

#define INTEL_E1000_ETHERNET_DEVICE (   device_id)
Value:
{\

Definition at line 77 of file e1000.h.

#define MAXIMUM_ETHERNET_VLAN_SIZE   1522

Definition at line 101 of file e1000.h.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 325 of file e1000.h.

Enumeration Type Documentation

Enumerator:
__E1000_TESTING 
__E1000_RESETTING 
__E1000_DOWN 
__E1000_TESTING 
__E1000_RESETTING 
__E1000_ACCESS_SHARED_RESOURCE 
__E1000_DOWN 
__IGB_TESTING 
__IGB_RESETTING 
__IGB_DOWN 

Definition at line 318 of file e1000.h.

Function Documentation

void e1000_check_options ( struct e1000_adapter adapter)

e1000_check_options - Range Checking for Command Line Parameters : board private structure

This routine checks all command line parameters for valid user input. If an invalid value is given, or if no user specified value exists, a default value is used. The final value is stored in a variable in the adapter structure.

Definition at line 271 of file e1000_param.c.

void e1000_down ( struct e1000_adapter adapter)

Definition at line 506 of file e1000_main.c.

void e1000_free_all_rx_resources ( struct e1000_adapter adapter)

e1000_free_all_rx_resources - Free Rx Resources for All Queues : board private structure

Free all receive software resources

Definition at line 2077 of file e1000_main.c.

void e1000_free_all_tx_resources ( struct e1000_adapter adapter)

e1000_free_all_tx_resources - Free Tx Resources for All Queues : board private structure

Free all transmit software resources

Definition at line 1967 of file e1000_main.c.

struct net_device* e1000_get_hw_dev ( struct e1000_hw hw)
read

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

Definition at line 230 of file e1000_main.c.

char* e1000_get_hw_dev_name ( struct e1000_hw hw)
bool e1000_has_link ( struct e1000_adapter adapter)

Definition at line 2406 of file e1000_main.c.

void e1000_power_up_phy ( struct e1000_adapter adapter)

e1000_power_up_phy - restore link in case the phy was powered down : address of board private structure

The phy may be powered down to save power and turn off link when the driver is unloaded and wake on lan is not enabled (among others) *** this routine MUST be followed by a call to e1000_reset ***

Definition at line 439 of file e1000_main.c.

void e1000_reinit_locked ( struct e1000_adapter adapter)

Definition at line 559 of file e1000_main.c.

void e1000_reset ( struct e1000_adapter adapter)

Definition at line 571 of file e1000_main.c.

void e1000_set_ethtool_ops ( struct net_device netdev)

Definition at line 1896 of file e1000_ethtool.c.

int e1000_set_spd_dplx ( struct e1000_adapter adapter,
u32  spd,
u8  dplx 
)

Definition at line 4925 of file e1000_main.c.

int e1000_setup_all_rx_resources ( struct e1000_adapter adapter)

e1000_setup_all_rx_resources - wrapper to allocate Rx resources (Descriptors) for all queues : board private structure

Return 0 on success, negative on failure

Definition at line 1783 of file e1000_main.c.

int e1000_setup_all_tx_resources ( struct e1000_adapter adapter)

e1000_setup_all_tx_resources - wrapper to allocate Tx resources (Descriptors) for all queues : board private structure

Return 0 on success, negative on failure

Definition at line 1583 of file e1000_main.c.

int e1000_up ( struct e1000_adapter adapter)

Definition at line 409 of file e1000_main.c.

void e1000_update_stats ( struct e1000_adapter adapter)

e1000_update_stats - Update the board statistics counters : board private structure

Definition at line 3622 of file e1000_main.c.

Variable Documentation

char e1000_driver_name[]

Definition at line 36 of file e1000_main.c.

const char e1000_driver_version[]

Definition at line 39 of file e1000_main.c.