Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
bnad.c File Reference
#include <linux/bitops.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/etherdevice.h>
#include <linux/in.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/prefetch.h>
#include <linux/module.h>
#include "bnad.h"
#include "bna.h"
#include "cna.h"

Go to the source code of this file.

Macros

#define BNAD_TX_UNMAPQ_DEPTH   (bnad->txq_depth * 2)
 
#define BNAD_RX_UNMAPQ_DEPTH   (bnad->rxq_depth)
 
#define BNAD_GET_MBOX_IRQ(_bnad)
 
#define BNAD_FILL_UNMAPQ_MEM_REQ(_res_info, _num, _depth)
 
#define BNAD_NAPI_POLL_QUOTA   64
 

Functions

 module_param (bnad_msix_disable, uint, 0444)
 
 MODULE_PARM_DESC (bnad_msix_disable,"Disable MSIX mode")
 
 module_param (bnad_ioc_auto_recover, uint, 0444)
 
 MODULE_PARM_DESC (bnad_ioc_auto_recover,"Enable / Disable auto recovery")
 
 module_param (bna_debugfs_enable, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (bna_debugfs_enable,"Enables debugfs feature, default=1,"" Range[false:0|true:1]")
 
void bnad_cb_mbox_intr_enable (struct bnad *bnad)
 
void bnad_cb_mbox_intr_disable (struct bnad *bnad)
 
void bnad_cb_ioceth_ready (struct bnad *bnad)
 
void bnad_cb_ioceth_failed (struct bnad *bnad)
 
void bnad_cb_ioceth_disabled (struct bnad *bnad)
 
void bnad_cb_ethport_link_status (struct bnad *bnad, enum bna_link_status link_status)
 
void bnad_cb_stats_get (struct bnad *bnad, enum bna_cb_status status, struct bna_stats *stats)
 
void bnad_cb_completion (void *arg, enum bfa_status status)
 
void bnad_dim_timer_start (struct bnad *bnad)
 
void bnad_destroy_tx (struct bnad *bnad, u32 tx_id)
 
int bnad_setup_tx (struct bnad *bnad, u32 tx_id)
 
void bnad_destroy_rx (struct bnad *bnad, u32 rx_id)
 
int bnad_setup_rx (struct bnad *bnad, u32 rx_id)
 
void bnad_tx_coalescing_timeo_set (struct bnad *bnad)
 
void bnad_rx_coalescing_timeo_set (struct bnad *bnad)
 
int bnad_mac_addr_set_locked (struct bnad *bnad, u8 *mac_addr)
 
int bnad_enable_default_bcast (struct bnad *bnad)
 
void bnad_restore_vlans (struct bnad *bnad, u32 rx_id)
 
void bnad_netdev_qstats_fill (struct bnad *bnad, struct rtnl_link_stats64 *stats)
 
void bnad_netdev_hwstats_fill (struct bnad *bnad, struct rtnl_link_stats64 *stats)
 
void bnad_set_rx_mode (struct net_device *netdev)
 
 MODULE_DEVICE_TABLE (pci, bnad_pci_id_table)
 
 module_init (bnad_module_init)
 
 module_exit (bnad_module_exit)
 
 MODULE_AUTHOR ("Brocade")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("Brocade 10G PCIe Ethernet driver")
 
 MODULE_VERSION (BNAD_VERSION)
 
 MODULE_FIRMWARE (CNA_FW_FILE_CT)
 
 MODULE_FIRMWARE (CNA_FW_FILE_CT2)
 

Variables

u32 bnad_rxqs_per_cq = 2
 

Macro Definition Documentation

#define BNAD_FILL_UNMAPQ_MEM_REQ (   _res_info,
  _num,
  _depth 
)
Value:
do { \
(_res_info)->res_type = BNA_RES_T_MEM; \
(_res_info)->res_u.mem_info.mem_type = BNA_MEM_T_KVA; \
(_res_info)->res_u.mem_info.num = (_num); \
(_res_info)->res_u.mem_info.len = \
sizeof(struct bnad_unmap_q) + \
(sizeof(struct bnad_skb_unmap) * ((_depth) - 1)); \
} while (0)

Definition at line 73 of file bnad.c.

#define BNAD_GET_MBOX_IRQ (   _bnad)
Value:
(((_bnad)->cfg_flags & BNAD_CF_MSIX) ? \
((_bnad)->msix_table[BNAD_MAILBOX_MSIX_INDEX].vector) : \
((_bnad)->pcidev->irq))

Definition at line 68 of file bnad.c.

#define BNAD_NAPI_POLL_QUOTA   64

Definition at line 1686 of file bnad.c.

#define BNAD_RX_UNMAPQ_DEPTH   (bnad->rxq_depth)

Definition at line 66 of file bnad.c.

#define BNAD_TX_UNMAPQ_DEPTH   (bnad->txq_depth * 2)

Definition at line 64 of file bnad.c.

Function Documentation

void bnad_cb_completion ( void arg,
enum bfa_status  status 
)

Definition at line 1097 of file bnad.c.

void bnad_cb_ethport_link_status ( struct bnad bnad,
enum bna_link_status  link_status 
)

Definition at line 685 of file bnad.c.

void bnad_cb_ioceth_disabled ( struct bnad bnad)

Definition at line 669 of file bnad.c.

void bnad_cb_ioceth_failed ( struct bnad bnad)

Definition at line 662 of file bnad.c.

void bnad_cb_ioceth_ready ( struct bnad bnad)

Definition at line 655 of file bnad.c.

void bnad_cb_mbox_intr_disable ( struct bnad bnad)

Definition at line 649 of file bnad.c.

void bnad_cb_mbox_intr_enable ( struct bnad bnad)

Definition at line 643 of file bnad.c.

void bnad_cb_stats_get ( struct bnad bnad,
enum bna_cb_status  status,
struct bna_stats stats 
)

Definition at line 1075 of file bnad.c.

void bnad_destroy_rx ( struct bnad bnad,
u32  rx_id 
)

Definition at line 1864 of file bnad.c.

void bnad_destroy_tx ( struct bnad bnad,
u32  tx_id 
)

Definition at line 1713 of file bnad.c.

void bnad_dim_timer_start ( struct bnad bnad)

Definition at line 1594 of file bnad.c.

int bnad_enable_default_bcast ( struct bnad bnad)

Definition at line 2059 of file bnad.c.

int bnad_mac_addr_set_locked ( struct bnad bnad,
u8 mac_addr 
)

Definition at line 2039 of file bnad.c.

void bnad_netdev_hwstats_fill ( struct bnad bnad,
struct rtnl_link_stats64 stats 
)

Definition at line 2139 of file bnad.c.

void bnad_netdev_qstats_fill ( struct bnad bnad,
struct rtnl_link_stats64 stats 
)

Definition at line 2099 of file bnad.c.

void bnad_restore_vlans ( struct bnad bnad,
u32  rx_id 
)

Definition at line 2085 of file bnad.c.

void bnad_rx_coalescing_timeo_set ( struct bnad bnad)

Definition at line 2021 of file bnad.c.

void bnad_set_rx_mode ( struct net_device netdev)

Definition at line 2835 of file bnad.c.

int bnad_setup_rx ( struct bnad bnad,
u32  rx_id 
)

Definition at line 1910 of file bnad.c.

int bnad_setup_tx ( struct bnad bnad,
u32  tx_id 
)

Definition at line 1744 of file bnad.c.

void bnad_tx_coalescing_timeo_set ( struct bnad bnad)

Definition at line 2008 of file bnad.c.

MODULE_AUTHOR ( "Brocade"  )
MODULE_DESCRIPTION ( "Brocade 10G PCIe Ethernet driver"  )
MODULE_DEVICE_TABLE ( pci  ,
bnad_pci_id_table   
)
module_exit ( bnad_module_exit  )
MODULE_FIRMWARE ( CNA_FW_FILE_CT  )
MODULE_FIRMWARE ( CNA_FW_FILE_CT2  )
module_init ( bnad_module_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( bnad_msix_disable  ,
uint  ,
0444   
)
module_param ( bnad_ioc_auto_recover  ,
uint  ,
0444   
)
module_param ( bna_debugfs_enable  ,
uint  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( bnad_msix_disable  ,
"Disable MSIX mode  
)
MODULE_PARM_DESC ( bnad_ioc_auto_recover  ,
"Enable / Disable auto recovery"   
)
MODULE_PARM_DESC ( bna_debugfs_enable  ,
"Enables debugfs  feature,
default  = 1,
""Range"  [false:0|true:1] 
)
MODULE_VERSION ( BNAD_VERSION  )

Variable Documentation

u32 bnad_rxqs_per_cq = 2

Definition at line 55 of file bnad.c.