Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
be_main.c File Reference
#include <linux/reboot.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/blkdev.h>
#include <linux/pci.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/semaphore.h>
#include <linux/iscsi_boot_sysfs.h>
#include <linux/module.h>
#include <linux/bsg-lib.h>
#include <scsi/libiscsi.h>
#include <scsi/scsi_bsg_iscsi.h>
#include <scsi/scsi_netlink.h>
#include <scsi/scsi_transport_iscsi.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi.h>
#include "be_main.h"
#include "be_iscsi.h"
#include "be_mgmt.h"
#include "be_cmds.h"

Go to the source code of this file.

Macros

#define beiscsi_disp_param(_name)
 
#define beiscsi_change_param(_name, _minval, _maxval, _defaval)
 
#define beiscsi_store_param(_name)
 
#define beiscsi_init_param(_name, _minval, _maxval, _defval)
 
#define BEISCSI_RW_ATTR(_name, _minval, _maxval, _defval, _descp)
 

Functions

 MODULE_DEVICE_TABLE (pci, beiscsi_pci_id_table)
 
 MODULE_DESCRIPTION (DRV_DESC" "BUILD_STR)
 
 MODULE_VERSION (BUILD_STR)
 
 MODULE_AUTHOR ("Emulex Corporation")
 
 MODULE_LICENSE ("GPL")
 
 module_param (be_iopoll_budget, int, 0)
 
 module_param (enable_msix, int, 0)
 
 module_param (be_max_phys_size, uint, S_IRUGO)
 
 MODULE_PARM_DESC (be_max_phys_size,"Maximum Size (In Kilobytes) of physically contiguous ""memory that can be allocated. Range is 16 - 128")
 
 BEISCSI_RW_ATTR (log_enable, 0x00, 0xFF, 0x00,"Enable logging Bit Mask\n""\t\t\t\tInitialization Events : 0x01\n""\t\t\t\tMailbox Events : 0x02\n""\t\t\t\tMiscellaneous Events : 0x04\n""\t\t\t\tError Handling : 0x08\n""\t\t\t\tIO Path Events : 0x10\n""\t\t\t\tConfiguration Path : 0x20\n")
 
struct wrb_handlealloc_wrb_handle (struct beiscsi_hba *phba, unsigned int cid)
 
void free_mgmt_sgl_handle (struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 
void beiscsi_process_all_cqs (struct work_struct *work)
 
void beiscsi_offload_connection (struct beiscsi_conn *beiscsi_conn, struct beiscsi_offload_params *params)
 
void beiscsi_hba_attrs_init (struct beiscsi_hba *phba)
 
 module_init (beiscsi_module_init)
 
 module_exit (beiscsi_module_exit)
 

Variables

struct device_attributebeiscsi_attrs []
 
struct iscsi_transport beiscsi_iscsi_transport
 

Macro Definition Documentation

#define beiscsi_change_param (   _name,
  _minval,
  _maxval,
  _defaval 
)
Value:
int \
beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\
{\
if (val >= _minval && val <= _maxval) {\
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,\
"BA_%d : beiscsi_"#_name" updated "\
"from 0x%x ==> 0x%x\n",\
phba->attr_##_name, val); \
phba->attr_##_name = val;\
return 0;\
} \
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, \
"BA_%d beiscsi_"#_name" attribute "\
"cannot be updated to 0x%x, "\
"range allowed is ["#_minval" - "#_maxval"]\n", val);\
return -EINVAL;\
}

Definition at line 78 of file be_main.c.

#define beiscsi_disp_param (   _name)
Value:
ssize_t \
beiscsi_##_name##_disp(struct device *dev,\
struct device_attribute *attrib, char *buf) \
{ \
param_val = phba->attr_##_name;\
return snprintf(buf, PAGE_SIZE, "%d\n",\
phba->attr_##_name);\
}

Definition at line 65 of file be_main.c.

#define beiscsi_init_param (   _name,
  _minval,
  _maxval,
  _defval 
)
Value:
int \
beiscsi_##_name##_init(struct beiscsi_hba *phba, uint32_t val) \
{ \
if (val >= _minval && val <= _maxval) {\
phba->attr_##_name = val;\
return 0;\
} \
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,\
"BA_%d beiscsi_"#_name" attribute " \
"cannot be updated to 0x%x, "\
"range allowed is ["#_minval" - "#_maxval"]\n", val);\
phba->attr_##_name = _defval;\
return -EINVAL;\
}

Definition at line 116 of file be_main.c.

#define BEISCSI_RW_ATTR (   _name,
  _minval,
  _maxval,
  _defval,
  _descp 
)
Value:
static uint beiscsi_##_name = _defval;\
module_param(beiscsi_##_name, uint, S_IRUGO);\
MODULE_PARM_DESC(beiscsi_##_name, _descp);\
beiscsi_disp_param(_name)\
beiscsi_change_param(_name, _minval, _maxval, _defval)\
beiscsi_store_param(_name)\
beiscsi_init_param(_name, _minval, _maxval, _defval)\
DEVICE_ATTR(beiscsi_##_name, S_IRUGO | S_IWUSR,\
beiscsi_##_name##_disp, beiscsi_##_name##_store)

Definition at line 132 of file be_main.c.

#define beiscsi_store_param (   _name)
Value:
ssize_t \
beiscsi_##_name##_store(struct device *dev,\
struct device_attribute *attr, const char *buf,\
size_t count) \
{ \
if (!isdigit(buf[0]))\
return -EINVAL;\
if (sscanf(buf, "%i", &param_val) != 1)\
return -EINVAL;\
if (beiscsi_##_name##_change(phba, param_val) == 0) \
return strlen(buf);\
else \
return -EINVAL;\
}

Definition at line 97 of file be_main.c.

Function Documentation

struct wrb_handle* alloc_wrb_handle ( struct beiscsi_hba phba,
unsigned int  cid 
)
read

alloc_wrb_handle - To allocate a wrb handle : The hba pointer : The cid to use for allocation

This happens under session_lock until submission to chip

Definition at line 1107 of file be_main.c.

void beiscsi_hba_attrs_init ( struct beiscsi_hba phba)

Definition at line 4377 of file be_main.c.

void beiscsi_offload_connection ( struct beiscsi_conn beiscsi_conn,
struct beiscsi_offload_params params 
)

Definition at line 3908 of file be_main.c.

void beiscsi_process_all_cqs ( struct work_struct work)

Definition at line 2066 of file be_main.c.

BEISCSI_RW_ATTR ( log_enable  ,
0x00  ,
0xFF  ,
0x00  ,
"Enable logging Bit Mask\n""\t\t\t\tInitialization Events : 0x01\n""\t\t\t\tMailbox Events : 0x02\n""\t\t\t\tMiscellaneous Events : 0x04\n""\t\t\t\tError Handling : 0x08\n""\t\t\t\tIO Path Events : 0x10\n""\t\t\t\tConfiguration Path : 0x20\n"   
)
void free_mgmt_sgl_handle ( struct beiscsi_hba phba,
struct sgl_handle psgl_handle 
)

Definition at line 1184 of file be_main.c.

MODULE_AUTHOR ( "Emulex Corporation"  )
MODULE_DESCRIPTION ( DRV_DESC" "  BUILD_STR)
MODULE_DEVICE_TABLE ( pci  ,
beiscsi_pci_id_table   
)
module_exit ( beiscsi_module_exit  )
module_init ( beiscsi_module_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( be_iopoll_budget  ,
int  ,
 
)
module_param ( enable_msix  ,
int  ,
 
)
module_param ( be_max_phys_size  ,
uint  ,
S_IRUGO   
)
MODULE_PARM_DESC ( be_max_phys_size  ,
"Maximum Size (In Kilobytes) of physically contiguous ""memory that can be allocated. Range is 16 - 128"   
)
MODULE_VERSION ( BUILD_STR  )

Variable Documentation

struct device_attribute* beiscsi_attrs[]
Initial value:
= {
&dev_attr_beiscsi_log_enable,
}

Definition at line 156 of file be_main.c.

struct iscsi_transport beiscsi_iscsi_transport

Copyright (C) 2005 - 2011 Emulex All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. The full GNU General Public License is included in this distribution in the file called COPYING.

Written by: Jayamohan Kallickal (jayam.nosp@m.ohan.nosp@m..kall.nosp@m.icka.nosp@m.l@emu.nosp@m.lex..nosp@m.com)

Contact Information: linux.nosp@m.-dri.nosp@m.vers@.nosp@m.emul.nosp@m.ex.co.nosp@m.m

Emulex 3333 Susan Street Costa Mesa, CA 92626

Definition at line 4680 of file be_main.c.