Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
ql4_os.c File Reference
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/blkdev.h>
#include <linux/iscsi_boot_sysfs.h>
#include <linux/inet.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsicam.h>
#include "ql4_def.h"
#include "ql4_version.h"
#include "ql4_glbl.h"
#include "ql4_dbg.h"
#include "ql4_inline.h"
#include "ql4_83xx.h"

Go to the source code of this file.

Macros

#define QL4_DEF_QDEPTH   32
 

Functions

 module_param (ql4xdisablesysfsboot, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (ql4xdisablesysfsboot," Set to disable exporting boot targets to sysfs.\n""\t\t 0 - Export boot targets\n""\t\t 1 - Do not export boot targets (Default)")
 
 module_param (ql4xdontresethba, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (ql4xdontresethba," Don't reset the HBA for driver recovery.\n""\t\t 0 - It will reset HBA (Default)\n""\t\t 1 - It will NOT reset HBA")
 
 module_param (ql4xextended_error_logging, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (ql4xextended_error_logging," Option to enable extended error logging.\n""\t\t 0 - no logging (Default)\n""\t\t 2 - debug logging")
 
 module_param (ql4xenablemsix, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (ql4xenablemsix," Set to enable MSI or MSI-X interrupt mechanism.\n""\t\t 0 = enable INTx interrupt mechanism.\n""\t\t 1 = enable MSI-X interrupt mechanism (Default).\n""\t\t 2 = enable MSI interrupt mechanism.")
 
 module_param (ql4xmaxqdepth, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (ql4xmaxqdepth," Maximum queue depth to report for target devices.\n""\t\t Default: 32.")
 
 module_param (ql4xqfulltracking, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (ql4xqfulltracking," Enable or disable dynamic tracking and adjustment of\n""\t\t scsi device queue depth.\n""\t\t 0 - Disable.\n""\t\t 1 - Enable. (Default)")
 
 module_param (ql4xsess_recovery_tmo, int, S_IRUGO)
 
 MODULE_PARM_DESC (ql4xsess_recovery_tmo," Target Session Recovery Timeout.\n""\t\t Default: 120 sec.")
 
 module_param (ql4xmdcapmask, int, S_IRUGO)
 
 MODULE_PARM_DESC (ql4xmdcapmask," Set the Minidump driver capture mask level.\n""\t\t Default is 0x1F.\n""\t\t Can be set to 0x3, 0x7, 0xF, 0x1F, 0x3F, 0x7F")
 
 module_param (ql4xenablemd, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (ql4xenablemd," Set to enable minidump.\n""\t\t 0 - disable minidump\n""\t\t 1 - enable minidump (Default)")
 
int qla4xxx_get_ddb_index (struct scsi_qla_host *ha, uint16_t *ddb_index)
 
void qla4xxx_update_session_conn_fwddb_param (struct scsi_qla_host *ha, struct ddb_entry *ddb_entry)
 
void qla4xxx_update_session_conn_param (struct scsi_qla_host *ha, struct ddb_entry *ddb_entry)
 
void qla4xxx_mark_device_missing (struct iscsi_cls_session *cls_session)
 
void qla4xxx_mark_all_devices_missing (struct scsi_qla_host *ha)
 
void qla4xxx_srb_compl (struct kref *ref)
 
void qla4_8xxx_watchdog (struct scsi_qla_host *ha)
 
int qla4xxx_hw_reset (struct scsi_qla_host *ha)
 
int qla4xxx_soft_reset (struct scsi_qla_host *ha)
 
void qla4xxx_dead_adapter_cleanup (struct scsi_qla_host *ha)
 
int qla4xxx_unblock_flash_ddb (struct iscsi_cls_session *cls_session)
 
int qla4xxx_unblock_ddb (struct iscsi_cls_session *cls_session)
 
void qla4xxx_wake_dpc (struct scsi_qla_host *ha)
 
int qla4xxx_post_aen_work (struct scsi_qla_host *ha, enum iscsi_host_event_code aen_code, uint32_t data_size, uint8_t *data)
 
int qla4xxx_post_ping_evt_work (struct scsi_qla_host *ha, uint32_t status, uint32_t pid, uint32_t data_size, uint8_t *data)
 
int qla4_8xxx_iospace_config (struct scsi_qla_host *ha)
 
int qla4xxx_iospace_config (struct scsi_qla_host *ha)
 
uint16_t qla4xxx_rd_shdw_req_q_out (struct scsi_qla_host *ha)
 
uint16_t qla4_82xx_rd_shdw_req_q_out (struct scsi_qla_host *ha)
 
uint16_t qla4_83xx_rd_shdw_req_q_out (struct scsi_qla_host *ha)
 
uint16_t qla4xxx_rd_shdw_rsp_q_in (struct scsi_qla_host *ha)
 
uint16_t qla4_82xx_rd_shdw_rsp_q_in (struct scsi_qla_host *ha)
 
uint16_t qla4_83xx_rd_shdw_rsp_q_in (struct scsi_qla_host *ha)
 
void qla4xxx_build_ddb_list (struct scsi_qla_host *ha, int is_reset)
 
struct srbqla4xxx_del_from_active_array (struct scsi_qla_host *ha, uint32_t index)
 
 MODULE_DEVICE_TABLE (pci, qla4xxx_pci_tbl)
 
 module_init (qla4xxx_module_init)
 
 module_exit (qla4xxx_module_exit)
 
 MODULE_AUTHOR ("QLogic Corporation")
 
 MODULE_DESCRIPTION ("QLogic iSCSI HBA Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (QLA4XXX_DRIVER_VERSION)
 

Variables

int ql4xdontresethba
 
int ql4xextended_error_logging
 
int ql4xenablemsix = 1
 
int ql4xmdcapmask = 0x1F
 
int ql4xenablemd = 1
 

Macro Definition Documentation

#define QL4_DEF_QDEPTH   32

Definition at line 65 of file ql4_os.c.

Function Documentation

MODULE_AUTHOR ( "QLogic Corporation"  )
MODULE_DESCRIPTION ( "QLogic iSCSI HBA Driver"  )
MODULE_DEVICE_TABLE ( pci  ,
qla4xxx_pci_tbl   
)
module_exit ( qla4xxx_module_exit  )
module_init ( qla4xxx_module_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( ql4xdisablesysfsboot  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( ql4xdontresethba  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( ql4xextended_error_logging  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( ql4xenablemsix  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( ql4xmaxqdepth  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( ql4xqfulltracking  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( ql4xsess_recovery_tmo  ,
int  ,
S_IRUGO   
)
module_param ( ql4xmdcapmask  ,
int  ,
S_IRUGO   
)
module_param ( ql4xenablemd  ,
int  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( ql4xdisablesysfsboot  ,
" Set to disable exporting boot targets to sysfs.\n""\t\t 0 - Export boot targets\n""\t\t 1 - Do not export boot targets (Default)"   
)
MODULE_PARM_DESC ( ql4xdontresethba  ,
" Don't reset the HBA for driver recovery.\n""\t\t 0 - It will reset HBA (Default)\n""\t\t 1 - It will NOT reset HBA"   
)
MODULE_PARM_DESC ( ql4xextended_error_logging  ,
" Option to enable extended error logging.\n""\t\t 0 - no logging (Default)\n""\t\t 2 - debug logging"   
)
MODULE_PARM_DESC ( ql4xenablemsix  )
MODULE_PARM_DESC ( ql4xmaxqdepth  ,
" Maximum queue depth to report for target devices.\n""\t\t Default: 32."   
)
MODULE_PARM_DESC ( ql4xqfulltracking  ,
" Enable or disable dynamic tracking and adjustment of\n""\t\t scsi device queue depth.\n""\t\t 0 - Disable.\n""\t\t 1 - Enable. (Default)"   
)
MODULE_PARM_DESC ( ql4xsess_recovery_tmo  ,
" Target Session Recovery Timeout.\n""\t\t Default: 120 sec."   
)
MODULE_PARM_DESC ( ql4xmdcapmask  ,
" Set the Minidump driver capture mask level.\n""\t\t Default is 0x1F.\n""\t\t Can be set to  0x3,
0x7  ,
0xF  ,
0x1F  ,
0x3F  ,
0x7F"   
)
MODULE_PARM_DESC ( ql4xenablemd  ,
" Set to enable minidump.\n""\t\t 0 - disable minidump\n""\t\t 1 - enable minidump (Default)"   
)
MODULE_VERSION ( QLA4XXX_DRIVER_VERSION  )
uint16_t qla4_82xx_rd_shdw_req_q_out ( struct scsi_qla_host ha)

Definition at line 3759 of file ql4_os.c.

uint16_t qla4_82xx_rd_shdw_rsp_q_in ( struct scsi_qla_host ha)

Definition at line 3774 of file ql4_os.c.

uint16_t qla4_83xx_rd_shdw_req_q_out ( struct scsi_qla_host ha)

Definition at line 3764 of file ql4_os.c.

uint16_t qla4_83xx_rd_shdw_rsp_q_in ( struct scsi_qla_host ha)

Definition at line 3779 of file ql4_os.c.

int qla4_8xxx_iospace_config ( struct scsi_qla_host ha)

Definition at line 3557 of file ql4_os.c.

void qla4_8xxx_watchdog ( struct scsi_qla_host ha)

qla4_8xxx_watchdog - Poll dev state : Pointer to host adapter structure.

Context: Interrupt

Definition at line 2542 of file ql4_os.c.

void qla4xxx_build_ddb_list ( struct scsi_qla_host ha,
int  is_reset 
)

qla4xxx_build_ddb_list - Build ddb list and setup sessions : pointer to adapter structure : Is this init path or reset path

Create a list of sendtargets (st) from firmware DDBs, issue send targets using connection open, then create the list of normal targets (nt) from firmware DDBs. Based on the list of nt setup session and connection objects.

Definition at line 5063 of file ql4_os.c.

void qla4xxx_dead_adapter_cleanup ( struct scsi_qla_host ha)

Definition at line 2901 of file ql4_os.c.

struct srb* qla4xxx_del_from_active_array ( struct scsi_qla_host ha,
uint32_t  index 
)
read

qla4xxx_del_from_active_array - returns an active srb : Pointer to host adapter structure. : index into the active_array

This routine removes and returns the srb at the specified index

Definition at line 5575 of file ql4_os.c.

int qla4xxx_get_ddb_index ( struct scsi_qla_host ha,
uint16_t ddb_index 
)

Definition at line 1385 of file ql4_os.c.

int qla4xxx_hw_reset ( struct scsi_qla_host ha)

Definition at line 2748 of file ql4_os.c.

int qla4xxx_iospace_config ( struct scsi_qla_host ha)

Definition at line 3619 of file ql4_os.c.

void qla4xxx_mark_all_devices_missing ( struct scsi_qla_host ha)

qla4xxx_mark_all_devices_missing - mark all devices as missing. : Pointer to host adapter structure.

This routine marks a device missing and resets the relogin retry count.

Definition at line 2149 of file ql4_os.c.

void qla4xxx_mark_device_missing ( struct iscsi_cls_session cls_session)

Definition at line 2138 of file ql4_os.c.

int qla4xxx_post_aen_work ( struct scsi_qla_host ha,
enum iscsi_host_event_code  aen_code,
uint32_t  data_size,
uint8_t data 
)

Definition at line 3290 of file ql4_os.c.

int qla4xxx_post_ping_evt_work ( struct scsi_qla_host ha,
uint32_t  status,
uint32_t  pid,
uint32_t  data_size,
uint8_t data 
)

Definition at line 3309 of file ql4_os.c.

uint16_t qla4xxx_rd_shdw_req_q_out ( struct scsi_qla_host ha)

Definition at line 3754 of file ql4_os.c.

uint16_t qla4xxx_rd_shdw_rsp_q_in ( struct scsi_qla_host ha)

Definition at line 3769 of file ql4_os.c.

int qla4xxx_soft_reset ( struct scsi_qla_host ha)

qla4xxx_soft_reset - performs soft reset. : Pointer to host adapter structure.

Definition at line 2780 of file ql4_os.c.

void qla4xxx_srb_compl ( struct kref ref)

Definition at line 2185 of file ql4_os.c.

int qla4xxx_unblock_ddb ( struct iscsi_cls_session cls_session)

Definition at line 3180 of file ql4_os.c.

int qla4xxx_unblock_flash_ddb ( struct iscsi_cls_session cls_session)

Definition at line 3155 of file ql4_os.c.

void qla4xxx_update_session_conn_fwddb_param ( struct scsi_qla_host ha,
struct ddb_entry ddb_entry 
)

Definition at line 1986 of file ql4_os.c.

void qla4xxx_update_session_conn_param ( struct scsi_qla_host ha,
struct ddb_entry ddb_entry 
)

Definition at line 2026 of file ql4_os.c.

void qla4xxx_wake_dpc ( struct scsi_qla_host ha)

Definition at line 3257 of file ql4_os.c.

Variable Documentation

int ql4xdontresethba

Definition at line 43 of file ql4_os.c.

int ql4xenablemd = 1

Definition at line 93 of file ql4_os.c.

int ql4xenablemsix = 1

Definition at line 57 of file ql4_os.c.

int ql4xextended_error_logging

Definition at line 50 of file ql4_os.c.

int ql4xmdcapmask = 0x1F

Definition at line 86 of file ql4_os.c.