Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
efx.c File Reference
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
#include <linux/notifier.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/in.h>
#include <linux/crc32.h>
#include <linux/ethtool.h>
#include <linux/topology.h>
#include <linux/gfp.h>
#include <linux/cpu_rmap.h>
#include "net_driver.h"
#include "efx.h"
#include "nic.h"
#include "selftest.h"
#include "mcdi.h"
#include "workarounds.h"

Go to the source code of this file.

Macros

#define EFX_MAX_MTU   (9 * 1024)
 
#define EFX_ASSERT_RESET_SERIALISED(efx)
 
#define SFC_VPD_LEN   512
 

Functions

 module_param (separate_tx_channels, uint, 0444)
 
 MODULE_PARM_DESC (separate_tx_channels,"Use separate channels for TX and RX")
 
 module_param (rss_cpus, uint, 0444)
 
 MODULE_PARM_DESC (rss_cpus,"Number of CPUs to use for Receive-Side Scaling")
 
 module_param (phy_flash_cfg, int, 0644)
 
 MODULE_PARM_DESC (phy_flash_cfg,"Set PHYs into reflash mode initially")
 
 module_param (irq_adapt_low_thresh, uint, 0644)
 
 MODULE_PARM_DESC (irq_adapt_low_thresh,"Threshold score for reducing IRQ moderation")
 
 module_param (irq_adapt_high_thresh, uint, 0644)
 
 MODULE_PARM_DESC (irq_adapt_high_thresh,"Threshold score for increasing IRQ moderation")
 
 module_param (debug, uint, 0)
 
 MODULE_PARM_DESC (debug,"Bitmapped debugging message enable value")
 
void efx_process_channel_now (struct efx_channel *channel)
 
int efx_realloc_channels (struct efx_nic *efx, u32 rxq_entries, u32 txq_entries)
 
void efx_schedule_slow_fill (struct efx_rx_queue *rx_queue)
 
int efx_channel_dummy_op_int (struct efx_channel *channel)
 
void efx_channel_dummy_op_void (struct efx_channel *channel)
 
void efx_link_status_changed (struct efx_nic *efx)
 
void efx_link_set_advertising (struct efx_nic *efx, u32 advertising)
 
void efx_link_set_wanted_fc (struct efx_nic *efx, u8 wanted_fc)
 
int __efx_reconfigure_port (struct efx_nic *efx)
 
int efx_reconfigure_port (struct efx_nic *efx)
 
int efx_init_irq_moderation (struct efx_nic *efx, unsigned int tx_usecs, unsigned int rx_usecs, bool rx_adaptive, bool rx_may_override_tx)
 
void efx_get_irq_moderation (struct efx_nic *efx, unsigned int *tx_usecs, unsigned int *rx_usecs, bool *rx_adaptive)
 
void efx_reset_down (struct efx_nic *efx, enum reset_type method)
 
int efx_reset_up (struct efx_nic *efx, enum reset_type method, bool ok)
 
int efx_reset (struct efx_nic *efx, enum reset_type method)
 
void efx_schedule_reset (struct efx_nic *efx, enum reset_type type)
 
int efx_port_dummy_op_int (struct efx_nic *efx)
 
void efx_port_dummy_op_void (struct efx_nic *efx)
 
 module_param (interrupt_mode, uint, 0444)
 
 MODULE_PARM_DESC (interrupt_mode,"Interrupt mode (0=>MSIX 1=>MSI 2=>legacy)")
 
 module_init (efx_init_module)
 
 module_exit (efx_exit_module)
 
 MODULE_AUTHOR ("Solarflare Communications and ""Michael Brown <[email protected]>")
 
 MODULE_DESCRIPTION ("Solarflare Communications network driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (pci, efx_pci_table)
 

Variables

const unsigned int efx_loopback_mode_max = LOOPBACK_MAX
 
const char *const efx_loopback_mode_names []
 
const unsigned int efx_reset_type_max = RESET_TYPE_MAX
 
const char *const efx_reset_type_names []
 

Macro Definition Documentation

#define EFX_ASSERT_RESET_SERIALISED (   efx)
Value:
do { \
if ((efx->state == STATE_READY) || \
(efx->state == STATE_DISABLED)) \
ASSERT_RTNL(); \
} while (0)

Definition at line 203 of file efx.c.

#define EFX_MAX_MTU   (9 * 1024)

Definition at line 87 of file efx.c.

#define SFC_VPD_LEN   512

Definition at line 2571 of file efx.c.

Function Documentation

int __efx_reconfigure_port ( struct efx_nic efx)

Definition at line 949 of file efx.c.

int efx_channel_dummy_op_int ( struct efx_channel channel)

Definition at line 862 of file efx.c.

void efx_channel_dummy_op_void ( struct efx_channel channel)

Definition at line 867 of file efx.c.

void efx_get_irq_moderation ( struct efx_nic efx,
unsigned int tx_usecs,
unsigned int rx_usecs,
bool rx_adaptive 
)

Definition at line 1713 of file efx.c.

int efx_init_irq_moderation ( struct efx_nic efx,
unsigned int  tx_usecs,
unsigned int  rx_usecs,
bool  rx_adaptive,
bool  rx_may_override_tx 
)

Definition at line 1675 of file efx.c.

void efx_link_set_advertising ( struct efx_nic efx,
u32  advertising 
)

Definition at line 912 of file efx.c.

void efx_link_set_wanted_fc ( struct efx_nic efx,
u8  wanted_fc 
)

Definition at line 925 of file efx.c.

void efx_link_status_changed ( struct efx_nic efx)

Definition at line 881 of file efx.c.

int efx_port_dummy_op_int ( struct efx_nic efx)

Definition at line 2413 of file efx.c.

void efx_port_dummy_op_void ( struct efx_nic efx)

Definition at line 2417 of file efx.c.

void efx_process_channel_now ( struct efx_channel channel)

Definition at line 339 of file efx.c.

int efx_realloc_channels ( struct efx_nic efx,
u32  rxq_entries,
u32  txq_entries 
)

Definition at line 749 of file efx.c.

int efx_reconfigure_port ( struct efx_nic efx)

Definition at line 977 of file efx.c.

int efx_reset ( struct efx_nic efx,
enum reset_type  method 
)

Definition at line 2274 of file efx.c.

void efx_reset_down ( struct efx_nic efx,
enum reset_type  method 
)

Definition at line 2207 of file efx.c.

int efx_reset_up ( struct efx_nic efx,
enum reset_type  method,
bool  ok 
)

Definition at line 2225 of file efx.c.

void efx_schedule_reset ( struct efx_nic efx,
enum reset_type  type 
)

Definition at line 2346 of file efx.c.

void efx_schedule_slow_fill ( struct efx_rx_queue rx_queue)

Definition at line 849 of file efx.c.

MODULE_AUTHOR ( "Solarflare Communications and ""Michael Brown <[email protected]>"  )
MODULE_DESCRIPTION ( "Solarflare Communications network driver )
MODULE_DEVICE_TABLE ( pci  ,
efx_pci_table   
)
module_exit ( efx_exit_module  )
module_init ( efx_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( separate_tx_channels  ,
uint  ,
0444   
)
module_param ( rss_cpus  ,
uint  ,
0444   
)
module_param ( phy_flash_cfg  ,
int  ,
0644   
)
module_param ( irq_adapt_low_thresh  ,
uint  ,
0644   
)
module_param ( irq_adapt_high_thresh  ,
uint  ,
0644   
)
module_param ( debug  ,
uint  ,
 
)
module_param ( interrupt_mode  ,
uint  ,
0444   
)
MODULE_PARM_DESC ( separate_tx_channels  ,
"Use separate channels for TX and RX  
)
MODULE_PARM_DESC ( rss_cpus  ,
"Number of CPUs to use for Receive-Side Scaling"   
)
MODULE_PARM_DESC ( phy_flash_cfg  ,
"Set PHYs into reflash mode initially"   
)
MODULE_PARM_DESC ( irq_adapt_low_thresh  ,
"Threshold score for reducing IRQ moderation"   
)
MODULE_PARM_DESC ( irq_adapt_high_thresh  ,
"Threshold score for increasing IRQ moderation"   
)
MODULE_PARM_DESC ( debug  ,
"Bitmapped debugging message enable value  
)
MODULE_PARM_DESC ( interrupt_mode  ,
"Interrupt mode (0=>MSIX 1=>MSI 2=>legacy)"   
)

Variable Documentation

const unsigned int efx_loopback_mode_max = LOOPBACK_MAX

Definition at line 41 of file efx.c.

const char* const efx_loopback_mode_names[]
Initial value:
= {
[LOOPBACK_NONE] = "NONE",
[LOOPBACK_DATA] = "DATAPATH",
[LOOPBACK_GMAC] = "GMAC",
[LOOPBACK_XGMII] = "XGMII",
[LOOPBACK_XGXS] = "XGXS",
[LOOPBACK_XAUI] = "XAUI",
[LOOPBACK_GMII] = "GMII",
[LOOPBACK_SGMII] = "SGMII",
[LOOPBACK_XGBR] = "XGBR",
[LOOPBACK_XFI] = "XFI",
[LOOPBACK_XAUI_FAR] = "XAUI_FAR",
[LOOPBACK_GMII_FAR] = "GMII_FAR",
[LOOPBACK_SGMII_FAR] = "SGMII_FAR",
[LOOPBACK_XFI_FAR] = "XFI_FAR",
[LOOPBACK_GPHY] = "GPHY",
[LOOPBACK_PHYXS] = "PHYXS",
[LOOPBACK_PCS] = "PCS",
[LOOPBACK_PMAPMD] = "PMA/PMD",
[LOOPBACK_XPORT] = "XPORT",
[LOOPBACK_XGMII_WS] = "XGMII_WS",
[LOOPBACK_XAUI_WS] = "XAUI_WS",
[LOOPBACK_XAUI_WS_FAR] = "XAUI_WS_FAR",
[LOOPBACK_XAUI_WS_NEAR] = "XAUI_WS_NEAR",
[LOOPBACK_GMII_WS] = "GMII_WS",
[LOOPBACK_XFI_WS] = "XFI_WS",
[LOOPBACK_XFI_WS_FAR] = "XFI_WS_FAR",
[LOOPBACK_PHYXS_WS] = "PHYXS_WS",
}

Definition at line 42 of file efx.c.

const unsigned int efx_reset_type_max = RESET_TYPE_MAX

Definition at line 72 of file efx.c.

const char* const efx_reset_type_names[]
Initial value:
= {
[RESET_TYPE_INVISIBLE] = "INVISIBLE",
[RESET_TYPE_ALL] = "ALL",
[RESET_TYPE_WORLD] = "WORLD",
[RESET_TYPE_DISABLE] = "DISABLE",
[RESET_TYPE_TX_WATCHDOG] = "TX_WATCHDOG",
[RESET_TYPE_INT_ERROR] = "INT_ERROR",
[RESET_TYPE_RX_RECOVERY] = "RX_RECOVERY",
[RESET_TYPE_RX_DESC_FETCH] = "RX_DESC_FETCH",
[RESET_TYPE_TX_DESC_FETCH] = "TX_DESC_FETCH",
[RESET_TYPE_TX_SKIP] = "TX_SKIP",
[RESET_TYPE_MC_FAILURE] = "MC_FAILURE",
}

Definition at line 73 of file efx.c.