Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ehca_main.c File Reference
#include <linux/notifier.h>
#include <linux/memory.h>
#include "ehca_classes.h"
#include "ehca_iverbs.h"
#include "ehca_mrmw.h"
#include "ehca_tools.h"
#include "hcp_if.h"

Go to the source code of this file.

Data Structures

struct  cap_descr
 

Macros

#define HCAD_VERSION   "0029"
 
#define EHCA_HCAAVER   EHCA_BMASK_IBM(32, 39)
 
#define EHCA_REVID   EHCA_BMASK_IBM(40, 63)
 
#define EHCA_RESOURCE_ATTR(name)
 

Functions

 MODULE_LICENSE ("Dual BSD/GPL")
 
 MODULE_AUTHOR ("Christoph Raisch <[email protected]>")
 
 MODULE_DESCRIPTION ("IBM eServer HCA InfiniBand Device Driver")
 
 MODULE_VERSION (HCAD_VERSION)
 
 module_param_named (open_aqp1, ehca_open_aqp1, bool, S_IRUGO)
 
 module_param_named (debug_level, ehca_debug_level, int, S_IRUGO)
 
 module_param_named (hw_level, ehca_hw_level, int, S_IRUGO)
 
 module_param_named (nr_ports, ehca_nr_ports, int, S_IRUGO)
 
 module_param_named (use_hp_mr, ehca_use_hp_mr, bool, S_IRUGO)
 
 module_param_named (port_act_time, ehca_port_act_time, int, S_IRUGO)
 
 module_param_named (poll_all_eqs, ehca_poll_all_eqs, bool, S_IRUGO)
 
 module_param_named (static_rate, ehca_static_rate, int, S_IRUGO)
 
 module_param_named (scaling_code, ehca_scaling_code, bool, S_IRUGO)
 
 module_param_named (lock_hcalls, ehca_lock_hcalls, bint, S_IRUGO)
 
 module_param_named (number_of_cqs, ehca_max_cq, int, S_IRUGO)
 
 module_param_named (number_of_qps, ehca_max_qp, int, S_IRUGO)
 
 MODULE_PARM_DESC (open_aqp1,"Open AQP1 on startup (default: no)")
 
 MODULE_PARM_DESC (debug_level,"Amount of debug output (0: none (default), 1: traces, ""2: some dumps, 3: lots)")
 
 MODULE_PARM_DESC (hw_level,"Hardware level (0: autosensing (default), ""0x10..0x14: eHCA, 0x20..0x23: eHCA2)")
 
 MODULE_PARM_DESC (nr_ports,"number of connected ports (-1: autodetect (default), ""1: port one only, 2: two ports)")
 
 MODULE_PARM_DESC (use_hp_mr,"Use high performance MRs (default: no)")
 
 MODULE_PARM_DESC (port_act_time,"Time to wait for port activation (default: 30 sec)")
 
 MODULE_PARM_DESC (poll_all_eqs,"Poll all event queues periodically (default: yes)")
 
 MODULE_PARM_DESC (static_rate,"Set permanent static rate (default: no static rate)")
 
 MODULE_PARM_DESC (scaling_code,"Enable scaling code (default: no)")
 
 MODULE_PARM_DESC (lock_hcalls,"Serialize all hCalls made by the driver ""(default: autodetect)")
 
 MODULE_PARM_DESC (number_of_cqs,"Max number of CQs which can be allocated ""(default: autodetect)")
 
 MODULE_PARM_DESC (number_of_qps,"Max number of QPs which can be allocated ""(default: autodetect)")
 
 DEFINE_RWLOCK (ehca_qp_idr_lock)
 
 DEFINE_RWLOCK (ehca_cq_idr_lock)
 
 DEFINE_IDR (ehca_qp_idr)
 
 DEFINE_IDR (ehca_cq_idr)
 
 DEFINE_SPINLOCK (shca_list_lock)
 
int ehca2ib_return_code (u64 ehca_rc)
 
 EHCA_RESOURCE_ATTR (num_ports)
 
 EHCA_RESOURCE_ATTR (hw_ver)
 
 EHCA_RESOURCE_ATTR (max_eq)
 
 EHCA_RESOURCE_ATTR (cur_eq)
 
 EHCA_RESOURCE_ATTR (max_cq)
 
 EHCA_RESOURCE_ATTR (cur_cq)
 
 EHCA_RESOURCE_ATTR (max_qp)
 
 EHCA_RESOURCE_ATTR (cur_qp)
 
 EHCA_RESOURCE_ATTR (max_mr)
 
 EHCA_RESOURCE_ATTR (cur_mr)
 
 EHCA_RESOURCE_ATTR (max_mw)
 
 EHCA_RESOURCE_ATTR (cur_mw)
 
 EHCA_RESOURCE_ATTR (max_pd)
 
 EHCA_RESOURCE_ATTR (max_ah)
 
 MODULE_DEVICE_TABLE (of, ehca_device_table)
 
void ehca_poll_eqs (unsigned long data)
 
 module_init (ehca_module_init)
 
 module_exit (ehca_module_exit)
 

Variables

int ehca_debug_level = 0
 
int ehca_nr_ports = -1
 
bool ehca_use_hp_mr = 0
 
int ehca_port_act_time = 30
 
int ehca_static_rate = -1
 
bool ehca_scaling_code = 0
 
int ehca_lock_hcalls = -1
 
int ehca_max_cq = -1
 
int ehca_max_qp = -1
 

Macro Definition Documentation

#define EHCA_HCAAVER   EHCA_BMASK_IBM(32, 39)

Definition at line 251 of file ehca_main.c.

#define EHCA_RESOURCE_ATTR (   name)

Definition at line 633 of file ehca_main.c.

#define EHCA_REVID   EHCA_BMASK_IBM(40, 63)

Definition at line 252 of file ehca_main.c.

#define HCAD_VERSION   "0029"

Definition at line 55 of file ehca_main.c.

Function Documentation

DEFINE_IDR ( ehca_qp_idr  )
DEFINE_IDR ( ehca_cq_idr  )
DEFINE_RWLOCK ( ehca_qp_idr_lock  )
DEFINE_RWLOCK ( ehca_cq_idr_lock  )
DEFINE_SPINLOCK ( shca_list_lock  )
int ehca2ib_return_code ( u64  ehca_rc)

Definition at line 149 of file ehca_main.c.

void ehca_poll_eqs ( unsigned long  data)

Definition at line 951 of file ehca_main.c.

EHCA_RESOURCE_ATTR ( num_ports  )
EHCA_RESOURCE_ATTR ( hw_ver  )
EHCA_RESOURCE_ATTR ( max_eq  )
EHCA_RESOURCE_ATTR ( cur_eq  )
EHCA_RESOURCE_ATTR ( max_cq  )
EHCA_RESOURCE_ATTR ( cur_cq  )
EHCA_RESOURCE_ATTR ( max_qp  )
EHCA_RESOURCE_ATTR ( cur_qp  )
EHCA_RESOURCE_ATTR ( max_mr  )
EHCA_RESOURCE_ATTR ( cur_mr  )
EHCA_RESOURCE_ATTR ( max_mw  )
EHCA_RESOURCE_ATTR ( cur_mw  )
EHCA_RESOURCE_ATTR ( max_pd  )
EHCA_RESOURCE_ATTR ( max_ah  )
MODULE_AUTHOR ( "Christoph Raisch <[email protected]>"  )
MODULE_DESCRIPTION ( "IBM eServer HCA InfiniBand Device Driver"  )
MODULE_DEVICE_TABLE ( of  ,
ehca_device_table   
)
module_exit ( ehca_module_exit  )
module_init ( ehca_module_init  )
MODULE_LICENSE ( "Dual BSD/GPL"  )
module_param_named ( open_aqp1  ,
ehca_open_aqp1  ,
bool  ,
S_IRUGO   
)
module_param_named ( debug_level  ,
ehca_debug_level  ,
int  ,
S_IRUGO   
)
module_param_named ( hw_level  ,
ehca_hw_level  ,
int  ,
S_IRUGO   
)
module_param_named ( nr_ports  ,
ehca_nr_ports  ,
int  ,
S_IRUGO   
)
module_param_named ( use_hp_mr  ,
ehca_use_hp_mr  ,
bool  ,
S_IRUGO   
)
module_param_named ( port_act_time  ,
ehca_port_act_time  ,
int  ,
S_IRUGO   
)
module_param_named ( poll_all_eqs  ,
ehca_poll_all_eqs  ,
bool  ,
S_IRUGO   
)
module_param_named ( static_rate  ,
ehca_static_rate  ,
int  ,
S_IRUGO   
)
module_param_named ( scaling_code  ,
ehca_scaling_code  ,
bool  ,
S_IRUGO   
)
module_param_named ( lock_hcalls  ,
ehca_lock_hcalls  ,
bint  ,
S_IRUGO   
)
module_param_named ( number_of_cqs  ,
ehca_max_cq  ,
int  ,
S_IRUGO   
)
module_param_named ( number_of_qps  ,
ehca_max_qp  ,
int  ,
S_IRUGO   
)
MODULE_PARM_DESC ( open_aqp1  ,
"Open AQP1 on startup (default: no)"   
)
MODULE_PARM_DESC ( debug_level  ,
"Amount of debug output (0: none (default), 1: traces, ""2: some dumps, 3: lots)"   
)
MODULE_PARM_DESC ( hw_level  ,
"Hardware level (0: autosensing (default), ""0x10..0x14: eHCA, 0x20..0x23: eHCA2)"   
)
MODULE_PARM_DESC ( nr_ports  ,
"number of connected ports (-1: autodetect (default), ""1: port one only, 2: two ports)"   
)
MODULE_PARM_DESC ( use_hp_mr  ,
"Use high performance MRs (default: no)"   
)
MODULE_PARM_DESC ( port_act_time  ,
"Time to wait for port activation (default: 30 sec)"   
)
MODULE_PARM_DESC ( poll_all_eqs  ,
"Poll all event queues periodically (default: yes)"   
)
MODULE_PARM_DESC ( static_rate  ,
"Set permanent static rate (default: no static rate)"   
)
MODULE_PARM_DESC ( scaling_code  ,
"Enable scaling code (default: no)"   
)
MODULE_PARM_DESC ( lock_hcalls  ,
"Serialize all hCalls made by the driver ""(default: autodetect)"   
)
MODULE_PARM_DESC ( number_of_cqs  ,
"Max number of CQs which can be allocated ""(default: autodetect)"   
)
MODULE_PARM_DESC ( number_of_qps  ,
"Max number of QPs which can be allocated ""(default: autodetect)"   
)
MODULE_VERSION ( HCAD_VERSION  )

Variable Documentation

int ehca_debug_level = 0

Definition at line 66 of file ehca_main.c.

int ehca_lock_hcalls = -1

Definition at line 72 of file ehca_main.c.

int ehca_max_cq = -1

Definition at line 73 of file ehca_main.c.

int ehca_max_qp = -1

Definition at line 74 of file ehca_main.c.

int ehca_nr_ports = -1

Definition at line 67 of file ehca_main.c.

int ehca_port_act_time = 30

Definition at line 69 of file ehca_main.c.

bool ehca_scaling_code = 0

Definition at line 71 of file ehca_main.c.

int ehca_static_rate = -1

Definition at line 70 of file ehca_main.c.

bool ehca_use_hp_mr = 0

Definition at line 68 of file ehca_main.c.