Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
nic.h File Reference
#include <linux/net_tstamp.h>
#include <linux/i2c-algo-bit.h>
#include "net_driver.h"
#include "efx.h"
#include "mcdi.h"
#include "spi.h"

Go to the source code of this file.

Data Structures

struct  falcon_board_type
 
struct  falcon_board
 
struct  falcon_nic_data
 
struct  siena_nic_data
 
struct  efx_nic_register_test
 

Macros

#define FALCON_XMAC_LOOPBACKS
 
#define FALCON_GMAC_LOOPBACKS   (1 << LOOPBACK_GMAC)
 
#define EFX_PAGE_SIZE   4096
 
#define EFX_BUF_SIZE   EFX_PAGE_SIZE
 
#define EFX_VI_SCALE_MAX   6
 
#define EFX_VI_BASE   128U
 
#define EFX_VF_COUNT_MAX   127
 
#define EFX_MAX_VF_EVQ_SIZE   8192UL
 
#define EFX_VF_BUFTBL_PER_VI
 
#define FALCON_STAT_OFFSET(falcon_stat)   EFX_VAL(falcon_stat, offset)
 
#define FALCON_STAT_WIDTH(falcon_stat)   EFX_VAL(falcon_stat, WIDTH)
 
#define FALCON_STAT(efx, falcon_stat, efx_stat)
 
#define FALCON_MAC_STATS_SIZE   0x100
 
#define MAC_DATA_LBN   0
 
#define MAC_DATA_WIDTH   32
 

Enumerations

enum  { EFX_REV_FALCON_A0 = 0, EFX_REV_FALCON_A1 = 1, EFX_REV_FALCON_B0 = 2, EFX_REV_SIENA_A0 = 3 }
 
enum  {
  PHY_TYPE_NONE = 0, PHY_TYPE_TXC43128 = 1, PHY_TYPE_88E1111 = 2, PHY_TYPE_SFX7101 = 3,
  PHY_TYPE_QT2022C2 = 4, PHY_TYPE_PM8358 = 6, PHY_TYPE_SFT9001A = 8, PHY_TYPE_QT2025C = 9,
  PHY_TYPE_SFT9001B = 10
}
 

Functions

u32 efx_nic_fpga_ver (struct efx_nic *efx)
 
int efx_sriov_set_vf_mac (struct net_device *dev, int vf, u8 *mac)
 
int efx_sriov_set_vf_vlan (struct net_device *dev, int vf, u16 vlan, u8 qos)
 
int efx_sriov_get_vf_config (struct net_device *dev, int vf, struct ifla_vf_info *ivf)
 
int efx_sriov_set_vf_spoofchk (struct net_device *net_dev, int vf, bool spoofchk)
 
int falcon_probe_board (struct efx_nic *efx, u16 revision_info)
 
int efx_nic_probe_tx (struct efx_tx_queue *tx_queue)
 
void efx_nic_init_tx (struct efx_tx_queue *tx_queue)
 
void efx_nic_fini_tx (struct efx_tx_queue *tx_queue)
 
void efx_nic_remove_tx (struct efx_tx_queue *tx_queue)
 
void efx_nic_push_buffers (struct efx_tx_queue *tx_queue)
 
int efx_nic_probe_rx (struct efx_rx_queue *rx_queue)
 
void efx_nic_init_rx (struct efx_rx_queue *rx_queue)
 
void efx_nic_fini_rx (struct efx_rx_queue *rx_queue)
 
void efx_nic_remove_rx (struct efx_rx_queue *rx_queue)
 
void efx_nic_notify_rx_desc (struct efx_rx_queue *rx_queue)
 
void efx_nic_generate_fill_event (struct efx_rx_queue *rx_queue)
 
int efx_nic_probe_eventq (struct efx_channel *channel)
 
void efx_nic_init_eventq (struct efx_channel *channel)
 
void efx_nic_fini_eventq (struct efx_channel *channel)
 
void efx_nic_remove_eventq (struct efx_channel *channel)
 
int efx_nic_process_eventq (struct efx_channel *channel, int rx_quota)
 
void efx_nic_eventq_read_ack (struct efx_channel *channel)
 
bool efx_nic_event_present (struct efx_channel *channel)
 
void falcon_drain_tx_fifo (struct efx_nic *efx)
 
void falcon_reconfigure_mac_wrapper (struct efx_nic *efx)
 
bool falcon_xmac_check_fault (struct efx_nic *efx)
 
int falcon_reconfigure_xmac (struct efx_nic *efx)
 
void falcon_update_stats_xmac (struct efx_nic *efx)
 
int efx_nic_init_interrupt (struct efx_nic *efx)
 
void efx_nic_enable_interrupts (struct efx_nic *efx)
 
void efx_nic_event_test_start (struct efx_channel *channel)
 
void efx_nic_irq_test_start (struct efx_nic *efx)
 
void efx_nic_disable_interrupts (struct efx_nic *efx)
 
void efx_nic_fini_interrupt (struct efx_nic *efx)
 
irqreturn_t efx_nic_fatal_interrupt (struct efx_nic *efx)
 
irqreturn_t falcon_legacy_interrupt_a1 (int irq, void *dev_id)
 
void falcon_irq_ack_a1 (struct efx_nic *efx)
 
int efx_nic_flush_queues (struct efx_nic *efx)
 
void falcon_start_nic_stats (struct efx_nic *efx)
 
void falcon_stop_nic_stats (struct efx_nic *efx)
 
void falcon_setup_xaui (struct efx_nic *efx)
 
int falcon_reset_xaui (struct efx_nic *efx)
 
void efx_nic_dimension_resources (struct efx_nic *efx, unsigned sram_lim_qw)
 
void efx_nic_init_common (struct efx_nic *efx)
 
void efx_nic_push_rx_indir_table (struct efx_nic *efx)
 
int efx_nic_alloc_buffer (struct efx_nic *efx, struct efx_buffer *buffer, unsigned int len)
 
void efx_nic_free_buffer (struct efx_nic *efx, struct efx_buffer *buffer)
 
int efx_nic_test_registers (struct efx_nic *efx, const struct efx_nic_register_test *regs, size_t n_regs)
 
size_t efx_nic_get_regs_len (struct efx_nic *efx)
 
void efx_nic_get_regs (struct efx_nic *efx, void *buf)
 
void efx_generate_event (struct efx_nic *efx, unsigned int evq, efx_qword_t *event)
 
void falcon_poll_xmac (struct efx_nic *efx)
 

Variables

struct efx_nic_type falcon_a1_nic_type
 
struct efx_nic_type falcon_b0_nic_type
 
struct efx_nic_type siena_a0_nic_type
 

Macro Definition Documentation

#define EFX_BUF_SIZE   EFX_PAGE_SIZE

Definition at line 68 of file nic.h.

#define EFX_MAX_VF_EVQ_SIZE   8192UL

Definition at line 188 of file nic.h.

#define EFX_PAGE_SIZE   4096

Definition at line 66 of file nic.h.

#define EFX_VF_BUFTBL_PER_VI
Value:

Definition at line 190 of file nic.h.

#define EFX_VF_COUNT_MAX   127

Definition at line 186 of file nic.h.

#define EFX_VI_BASE   128U

Definition at line 184 of file nic.h.

#define EFX_VI_SCALE_MAX   6

Definition at line 181 of file nic.h.

#define FALCON_GMAC_LOOPBACKS   (1 << LOOPBACK_GMAC)

Definition at line 62 of file nic.h.

#define FALCON_MAC_STATS_SIZE   0x100

Definition at line 427 of file nic.h.

#define FALCON_STAT (   efx,
  falcon_stat,
  efx_stat 
)
Value:
do { \
if (FALCON_STAT_WIDTH(falcon_stat) == 16) \
(efx)->mac_stats.efx_stat += le16_to_cpu( \
*((__force __le16 *) \
(efx->stats_buffer.addr + \
FALCON_STAT_OFFSET(falcon_stat)))); \
else if (FALCON_STAT_WIDTH(falcon_stat) == 32) \
(efx)->mac_stats.efx_stat += le32_to_cpu( \
*((__force __le32 *) \
(efx->stats_buffer.addr + \
FALCON_STAT_OFFSET(falcon_stat)))); \
else \
(efx)->mac_stats.efx_stat += le64_to_cpu( \
*((__force __le64 *) \
(efx->stats_buffer.addr + \
FALCON_STAT_OFFSET(falcon_stat)))); \
} while (0)

Definition at line 409 of file nic.h.

#define FALCON_STAT_OFFSET (   falcon_stat)    EFX_VAL(falcon_stat, offset)

Definition at line 405 of file nic.h.

#define FALCON_STAT_WIDTH (   falcon_stat)    EFX_VAL(falcon_stat, WIDTH)

Definition at line 406 of file nic.h.

#define FALCON_XMAC_LOOPBACKS
Value:
((1 << LOOPBACK_XGMII) | \
(1 << LOOPBACK_XGXS) | \
(1 << LOOPBACK_XAUI))

Definition at line 57 of file nic.h.

#define MAC_DATA_LBN   0

Definition at line 429 of file nic.h.

#define MAC_DATA_WIDTH   32

Definition at line 430 of file nic.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
EFX_REV_FALCON_A0 
EFX_REV_FALCON_A1 
EFX_REV_FALCON_B0 
EFX_REV_SIENA_A0 

Definition at line 25 of file nic.h.

anonymous enum
Enumerator:
PHY_TYPE_NONE 
PHY_TYPE_TXC43128 
PHY_TYPE_88E1111 
PHY_TYPE_SFX7101 
PHY_TYPE_QT2022C2 
PHY_TYPE_PM8358 
PHY_TYPE_SFT9001A 
PHY_TYPE_QT2025C 
PHY_TYPE_SFT9001B 

Definition at line 45 of file nic.h.

Function Documentation

void efx_generate_event ( struct efx_nic efx,
unsigned int  evq,
efx_qword_t event 
)

Definition at line 774 of file nic.c.

int efx_nic_alloc_buffer ( struct efx_nic efx,
struct efx_buffer buffer,
unsigned int  len 
)

Definition at line 305 of file nic.c.

void efx_nic_dimension_resources ( struct efx_nic efx,
unsigned  sram_lim_qw 
)

Definition at line 1651 of file nic.c.

void efx_nic_disable_interrupts ( struct efx_nic efx)

Definition at line 1376 of file nic.c.

void efx_nic_enable_interrupts ( struct efx_nic efx)

Definition at line 1368 of file nic.c.

bool efx_nic_event_present ( struct efx_channel channel)

Definition at line 1260 of file nic.c.

void efx_nic_event_test_start ( struct efx_channel channel)

Definition at line 1334 of file nic.c.

void efx_nic_eventq_read_ack ( struct efx_channel channel)

Definition at line 762 of file nic.c.

irqreturn_t efx_nic_fatal_interrupt ( struct efx_nic efx)

Definition at line 1396 of file nic.c.

void efx_nic_fini_eventq ( struct efx_channel channel)

Definition at line 1311 of file nic.c.

void efx_nic_fini_interrupt ( struct efx_nic efx)

Definition at line 1620 of file nic.c.

void efx_nic_fini_rx ( struct efx_rx_queue rx_queue)

Definition at line 633 of file nic.c.

void efx_nic_fini_tx ( struct efx_tx_queue tx_queue)

Definition at line 503 of file nic.c.

int efx_nic_flush_queues ( struct efx_nic efx)

Definition at line 675 of file nic.c.

u32 efx_nic_fpga_ver ( struct efx_nic efx)

Definition at line 1694 of file nic.c.

void efx_nic_free_buffer ( struct efx_nic efx,
struct efx_buffer buffer 
)

Definition at line 317 of file nic.c.

void efx_nic_generate_fill_event ( struct efx_rx_queue rx_queue)

Definition at line 1341 of file nic.c.

void efx_nic_get_regs ( struct efx_nic efx,
void buf 
)

Definition at line 2004 of file nic.c.

size_t efx_nic_get_regs_len ( struct efx_nic efx)

Definition at line 1981 of file nic.c.

void efx_nic_init_common ( struct efx_nic efx)

Definition at line 1701 of file nic.c.

void efx_nic_init_eventq ( struct efx_channel channel)

Definition at line 1276 of file nic.c.

int efx_nic_init_interrupt ( struct efx_nic efx)

Definition at line 1575 of file nic.c.

void efx_nic_init_rx ( struct efx_rx_queue rx_queue)

Definition at line 586 of file nic.c.

void efx_nic_init_tx ( struct efx_tx_queue tx_queue)

Definition at line 436 of file nic.c.

void efx_nic_irq_test_start ( struct efx_nic efx)

Definition at line 1386 of file nic.c.

void efx_nic_notify_rx_desc ( struct efx_rx_queue rx_queue)

Definition at line 556 of file nic.c.

int efx_nic_probe_eventq ( struct efx_channel channel)

Definition at line 1266 of file nic.c.

int efx_nic_probe_rx ( struct efx_rx_queue rx_queue)

Definition at line 576 of file nic.c.

int efx_nic_probe_tx ( struct efx_tx_queue tx_queue)

Definition at line 426 of file nic.c.

int efx_nic_process_eventq ( struct efx_channel channel,
int  rx_quota 
)

Definition at line 1184 of file nic.c.

void efx_nic_push_buffers ( struct efx_tx_queue tx_queue)

Definition at line 387 of file nic.c.

void efx_nic_push_rx_indir_table ( struct efx_nic efx)

Definition at line 1554 of file nic.c.

void efx_nic_remove_eventq ( struct efx_channel channel)

Definition at line 1328 of file nic.c.

void efx_nic_remove_rx ( struct efx_rx_queue rx_queue)

Definition at line 648 of file nic.c.

void efx_nic_remove_tx ( struct efx_tx_queue tx_queue)

Definition at line 518 of file nic.c.

int efx_nic_test_registers ( struct efx_nic efx,
const struct efx_nic_register_test regs,
size_t  n_regs 
)

Definition at line 120 of file nic.c.

int efx_sriov_get_vf_config ( struct net_device dev,
int  vf,
struct ifla_vf_info ivf 
)

Definition at line 1630 of file siena_sriov.c.

int efx_sriov_set_vf_mac ( struct net_device dev,
int  vf,
u8 mac 
)

Definition at line 1569 of file siena_sriov.c.

int efx_sriov_set_vf_spoofchk ( struct net_device net_dev,
int  vf,
bool  spoofchk 
)

Definition at line 1606 of file siena_sriov.c.

int efx_sriov_set_vf_vlan ( struct net_device dev,
int  vf,
u16  vlan,
u8  qos 
)

Definition at line 1586 of file siena_sriov.c.

void falcon_drain_tx_fifo ( struct efx_nic efx)

Definition at line 500 of file falcon.c.

void falcon_irq_ack_a1 ( struct efx_nic efx)
inline

Definition at line 149 of file falcon.c.

irqreturn_t falcon_legacy_interrupt_a1 ( int  irq,
void dev_id 
)

Definition at line 159 of file falcon.c.

void falcon_poll_xmac ( struct efx_nic efx)

Definition at line 352 of file falcon_xmac.c.

int falcon_probe_board ( struct efx_nic efx,
u16  revision_info 
)

Definition at line 744 of file falcon_boards.c.

void falcon_reconfigure_mac_wrapper ( struct efx_nic efx)

Definition at line 532 of file falcon.c.

int falcon_reconfigure_xmac ( struct efx_nic efx)

Definition at line 277 of file falcon_xmac.c.

int falcon_reset_xaui ( struct efx_nic efx)

Definition at line 59 of file falcon_xmac.c.

void falcon_setup_xaui ( struct efx_nic efx)

Definition at line 27 of file falcon_xmac.c.

void falcon_start_nic_stats ( struct efx_nic efx)

Definition at line 1712 of file falcon.c.

void falcon_stop_nic_stats ( struct efx_nic efx)

Definition at line 1722 of file falcon.c.

void falcon_update_stats_xmac ( struct efx_nic efx)

Definition at line 292 of file falcon_xmac.c.

bool falcon_xmac_check_fault ( struct efx_nic efx)

Definition at line 272 of file falcon_xmac.c.

Variable Documentation

struct efx_nic_type falcon_a1_nic_type

Definition at line 1781 of file falcon.c.

struct efx_nic_type falcon_b0_nic_type

Definition at line 1823 of file falcon.c.

struct efx_nic_type siena_a0_nic_type

Definition at line 650 of file siena.c.