Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
bnx2i_init.c File Reference
#include "bnx2i.h"

Go to the source code of this file.

Macros

#define DRV_MODULE_NAME   "bnx2i"
 
#define DRV_MODULE_VERSION   "2.7.2.2"
 
#define DRV_MODULE_RELDATE   "Apr 25, 2012"
 
#define BNX2I_INIT_POLL_TIME   (1000 / HZ)
 

Functions

 MODULE_AUTHOR ("Anil Veerabhadrappa <[email protected]> and ""Eddie Wai <[email protected]>")
 
 MODULE_DESCRIPTION ("Broadcom NetXtreme II BCM5706/5708/5709/57710/57711/57712""/57800/57810/57840 iSCSI Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_MODULE_VERSION)
 
 module_param (event_coal_min, int, 0664)
 
 MODULE_PARM_DESC (event_coal_min,"Event Coalescing Minimum Commands")
 
 module_param (event_coal_div, int, 0664)
 
 MODULE_PARM_DESC (event_coal_div,"Event Coalescing Divide Factor")
 
 module_param (en_tcp_dack, int, 0664)
 
 MODULE_PARM_DESC (en_tcp_dack,"Enable TCP Delayed ACK")
 
 module_param (error_mask1, uint, 0664)
 
 MODULE_PARM_DESC (error_mask1,"Config FW iSCSI Error Mask #1")
 
 module_param (error_mask2, uint, 0664)
 
 MODULE_PARM_DESC (error_mask2,"Config FW iSCSI Error Mask #2")
 
 module_param (sq_size, int, 0664)
 
 MODULE_PARM_DESC (sq_size,"Configure SQ size")
 
 module_param (rq_size, int, 0664)
 
 MODULE_PARM_DESC (rq_size,"Configure RQ size")
 
 DEFINE_PER_CPU (struct bnx2i_percpu_s, bnx2i_percpu)
 
void bnx2i_identify_device (struct bnx2i_hba *hba)
 
struct bnx2i_hbaget_adapter_list_head (void)
 
struct bnx2i_hbabnx2i_find_hba_for_cnic (struct cnic_dev *cnic)
 
void bnx2i_start (void *handle)
 
void bnx2i_stop (void *handle)
 
void bnx2i_ulp_init (struct cnic_dev *dev)
 
void bnx2i_ulp_exit (struct cnic_dev *dev)
 
int bnx2i_get_stats (void *handle)
 
 module_init (bnx2i_mod_init)
 
 module_exit (bnx2i_mod_exit)
 

Variables

unsigned int event_coal_min = 24
 
unsigned int event_coal_div = 2
 
unsigned int en_tcp_dack = 1
 
unsigned int error_mask1 = 0x00
 
unsigned int error_mask2 = 0x00
 
unsigned int sq_size
 
unsigned int rq_size = BNX2I_RQ_WQES_DEFAULT
 
u64 iscsi_error_mask = 0x00
 

Macro Definition Documentation

#define BNX2I_INIT_POLL_TIME   (1000 / HZ)
#define DRV_MODULE_NAME   "bnx2i"

Definition at line 20 of file bnx2i_init.c.

#define DRV_MODULE_RELDATE   "Apr 25, 2012"

Definition at line 22 of file bnx2i_init.c.

#define DRV_MODULE_VERSION   "2.7.2.2"

Definition at line 21 of file bnx2i_init.c.

Function Documentation

struct bnx2i_hba* bnx2i_find_hba_for_cnic ( struct cnic_dev cnic)
read

bnx2i_find_hba_for_cnic - maps cnic device instance to bnx2i adapter instance : pointer to cnic device instance

Definition at line 150 of file bnx2i_init.c.

int bnx2i_get_stats ( void handle)

bnx2i_get_stats - Retrieve various statistic from iSCSI offload : bnx2i_hba

function callback exported via bnx2i - cnic driver interface to retrieve various iSCSI offload related statistics.

Definition at line 390 of file bnx2i_init.c.

void bnx2i_identify_device ( struct bnx2i_hba hba)

bnx2i_identify_device - identifies NetXtreme II device type : Adapter structure pointer

This function identifies the NX2 device type and sets appropriate queue mailbox register access method, 5709 requires driver to access MBOX regs using bin mode

Definition at line 87 of file bnx2i_init.c.

void bnx2i_start ( void handle)

bnx2i_start - cnic callback to initialize & start adapter instance : transparent handle pointing to adapter structure

This function maps adapter structure to pcidev structure and initiates firmware handshake to enable/initialize on chip iscsi components This bnx2i - cnic interface api callback is issued after following 2 conditions are met - a) underlying network interface is up (marked by event 'NETDEV_UP' from netdev b) bnx2i adapter instance is registered

Definition at line 178 of file bnx2i_init.c.

void bnx2i_stop ( void handle)

bnx2i_stop - cnic callback to shutdown adapter instance : transparent handle pointing to adapter structure

driver checks if adapter is already in shutdown mode, if not start the shutdown process

Definition at line 237 of file bnx2i_init.c.

void bnx2i_ulp_exit ( struct cnic_dev dev)

bnx2i_ulp_exit - shuts down adapter instance and frees all resources : cnic device handle

Definition at line 359 of file bnx2i_init.c.

void bnx2i_ulp_init ( struct cnic_dev dev)

bnx2i_ulp_init - initialize an adapter instance : cnic device handle

Called from cnic_register_driver() context to initialize all enumerated cnic devices. This routine allocate adapter structure and other device specific resources.

Definition at line 334 of file bnx2i_init.c.

DEFINE_PER_CPU ( struct bnx2i_percpu_s  ,
bnx2i_percpu   
)
struct bnx2i_hba* get_adapter_list_head ( void  )
read

get_adapter_list_head - returns head of adapter list

Definition at line 124 of file bnx2i_init.c.

MODULE_AUTHOR ( "Anil Veerabhadrappa <[email protected]> and ""Eddie Wai <[email protected]>"  )
MODULE_DESCRIPTION ( "Broadcom NetXtreme II BCM5706/5708/5709/57710/57711/57712""/57800/57810/57840 iSCSI Driver"  )
module_exit ( bnx2i_mod_exit  )
module_init ( bnx2i_mod_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( event_coal_min  ,
int  ,
0664   
)
module_param ( event_coal_div  ,
int  ,
0664   
)
module_param ( en_tcp_dack  ,
int  ,
0664   
)
module_param ( error_mask1  ,
uint  ,
0664   
)
module_param ( error_mask2  ,
uint  ,
0664   
)
module_param ( sq_size  ,
int  ,
0664   
)
module_param ( rq_size  ,
int  ,
0664   
)
MODULE_PARM_DESC ( event_coal_min  ,
"Event Coalescing Minimum Commands"   
)
MODULE_PARM_DESC ( event_coal_div  ,
"Event Coalescing Divide Factor"   
)
MODULE_PARM_DESC ( en_tcp_dack  ,
"Enable TCP Delayed ACK  
)
MODULE_PARM_DESC ( error_mask1  ,
"Config FW iSCSI Error Mask #1"   
)
MODULE_PARM_DESC ( error_mask2  ,
"Config FW iSCSI Error Mask #2"   
)
MODULE_PARM_DESC ( sq_size  ,
"Configure SQ size  
)
MODULE_PARM_DESC ( rq_size  ,
"Configure RQ size  
)
MODULE_VERSION ( DRV_MODULE_VERSION  )

Variable Documentation

unsigned int en_tcp_dack = 1

Definition at line 47 of file bnx2i_init.c.

unsigned int error_mask1 = 0x00

Definition at line 51 of file bnx2i_init.c.

unsigned int error_mask2 = 0x00

Definition at line 55 of file bnx2i_init.c.

unsigned int event_coal_div = 2

Definition at line 43 of file bnx2i_init.c.

unsigned int event_coal_min = 24

Definition at line 39 of file bnx2i_init.c.

u64 iscsi_error_mask = 0x00

Definition at line 67 of file bnx2i_init.c.

unsigned int rq_size = BNX2I_RQ_WQES_DEFAULT

Definition at line 63 of file bnx2i_init.c.

unsigned int sq_size

Definition at line 59 of file bnx2i_init.c.