Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
aachba.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/completion.h>
#include <linux/blkdev.h>
#include <asm/uaccess.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include "aacraid.h"

Go to the source code of this file.

Data Structures

struct  inquiry_data
 
struct  scsi_inq
 

Macros

#define INQD_PDT_DA   0x00 /* Direct-access (DISK) device */
 
#define INQD_PDT_PROC   0x03 /* Processor device */
 
#define INQD_PDT_CHNGR   0x08 /* Changer (jukebox, scsi2) */
 
#define INQD_PDT_COMM   0x09 /* Communication device (scsi2) */
 
#define INQD_PDT_NOLUN2   0x1f /* Unknown Device (scsi2) */
 
#define INQD_PDT_NOLUN   0x7f /* Logical Unit Not Present */
 
#define INQD_PDT_DMASK   0x1F /* Peripheral Device Type Mask */
 
#define INQD_PDT_QMASK   0xE0 /* Peripheral Device Qualifer Mask */
 
#define SENCODE_NO_SENSE   0x00
 
#define SENCODE_END_OF_DATA   0x00
 
#define SENCODE_BECOMING_READY   0x04
 
#define SENCODE_INIT_CMD_REQUIRED   0x04
 
#define SENCODE_PARAM_LIST_LENGTH_ERROR   0x1A
 
#define SENCODE_INVALID_COMMAND   0x20
 
#define SENCODE_LBA_OUT_OF_RANGE   0x21
 
#define SENCODE_INVALID_CDB_FIELD   0x24
 
#define SENCODE_LUN_NOT_SUPPORTED   0x25
 
#define SENCODE_INVALID_PARAM_FIELD   0x26
 
#define SENCODE_PARAM_NOT_SUPPORTED   0x26
 
#define SENCODE_PARAM_VALUE_INVALID   0x26
 
#define SENCODE_RESET_OCCURRED   0x29
 
#define SENCODE_LUN_NOT_SELF_CONFIGURED_YET   0x3E
 
#define SENCODE_INQUIRY_DATA_CHANGED   0x3F
 
#define SENCODE_SAVING_PARAMS_NOT_SUPPORTED   0x39
 
#define SENCODE_DIAGNOSTIC_FAILURE   0x40
 
#define SENCODE_INTERNAL_TARGET_FAILURE   0x44
 
#define SENCODE_INVALID_MESSAGE_ERROR   0x49
 
#define SENCODE_LUN_FAILED_SELF_CONFIG   0x4c
 
#define SENCODE_OVERLAPPED_COMMAND   0x4E
 
#define ASENCODE_NO_SENSE   0x00
 
#define ASENCODE_END_OF_DATA   0x05
 
#define ASENCODE_BECOMING_READY   0x01
 
#define ASENCODE_INIT_CMD_REQUIRED   0x02
 
#define ASENCODE_PARAM_LIST_LENGTH_ERROR   0x00
 
#define ASENCODE_INVALID_COMMAND   0x00
 
#define ASENCODE_LBA_OUT_OF_RANGE   0x00
 
#define ASENCODE_INVALID_CDB_FIELD   0x00
 
#define ASENCODE_LUN_NOT_SUPPORTED   0x00
 
#define ASENCODE_INVALID_PARAM_FIELD   0x00
 
#define ASENCODE_PARAM_NOT_SUPPORTED   0x01
 
#define ASENCODE_PARAM_VALUE_INVALID   0x02
 
#define ASENCODE_RESET_OCCURRED   0x00
 
#define ASENCODE_LUN_NOT_SELF_CONFIGURED_YET   0x00
 
#define ASENCODE_INQUIRY_DATA_CHANGED   0x03
 
#define ASENCODE_SAVING_PARAMS_NOT_SUPPORTED   0x00
 
#define ASENCODE_DIAGNOSTIC_FAILURE   0x80
 
#define ASENCODE_INTERNAL_TARGET_FAILURE   0x00
 
#define ASENCODE_INVALID_MESSAGE_ERROR   0x00
 
#define ASENCODE_LUN_FAILED_SELF_CONFIG   0x00
 
#define ASENCODE_OVERLAPPED_COMMAND   0x00
 
#define BYTE0(x)   (unsigned char)(x)
 
#define BYTE1(x)   (unsigned char)((x) >> 8)
 
#define BYTE2(x)   (unsigned char)((x) >> 16)
 
#define BYTE3(x)   (unsigned char)((x) >> 24)
 

Functions

 module_param (aac_sync_mode, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (aac_sync_mode,"Force sync. transfer mode"" 0=off, 1=on")
 
 module_param (aac_convert_sgl, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (aac_convert_sgl,"Convert non-conformable s/g list"" 0=off, 1=on")
 
 module_param (nondasd, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (nondasd,"Control scanning of hba for nondasd devices."" 0=off, 1=on")
 
 module_param_named (cache, aac_cache, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (cache,"Disable Queue Flush commands:\n""\tbit 0 - Disable FUA in WRITE SCSI commands\n""\tbit 1 - Disable SYNCHRONIZE_CACHE SCSI command\n""\tbit 2 - Disable only if Battery is protecting Cache")
 
 module_param (dacmode, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (dacmode,"Control whether dma addressing is using 64 bit DAC."" 0=off, 1=on")
 
 module_param_named (commit, aac_commit, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (commit,"Control whether a COMMIT_CONFIG is issued to the"" adapter for foreign arrays.\n""This is typically needed in systems that do not have a BIOS."" 0=off, 1=on")
 
 module_param_named (msi, aac_msi, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (msi,"IRQ handling."" 0=PIC(default), 1=MSI, 2=MSI-X(unsupported, uses MSI)")
 
 module_param (startup_timeout, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (startup_timeout,"The duration of time in seconds to wait for"" adapter to have it's kernel up and\n""running. This is typically adjusted for large systems that do not"" have a BIOS.")
 
 module_param (aif_timeout, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (aif_timeout,"The duration of time in seconds to wait for"" applications to pick up AIFs before\n""deregistering them. This is typically adjusted for heavily burdened"" systems.")
 
 module_param (numacb, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (numacb,"Request a limit to the number of adapter control"" blocks (FIB) allocated. Valid values are 512 and down. Default is"" to use suggestion from Firmware.")
 
 module_param (acbsize, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (acbsize,"Request a specific adapter control block (FIB)"" size. Valid values are 512, 2048, 4096 and 8192. Default is to use"" suggestion from Firmware.")
 
 module_param (update_interval, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (update_interval,"Interval in seconds between time sync"" updates issued to adapter.")
 
 module_param (check_interval, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (check_interval,"Interval in seconds between adapter health"" checks.")
 
 module_param_named (check_reset, aac_check_reset, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (check_reset,"If adapter fails health check, reset the"" adapter. a value of -1 forces the reset to adapters programmed to"" ignore it.")
 
 module_param (expose_physicals, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (expose_physicals,"Expose physical components of the arrays."" -1=protect 0=off, 1=on")
 
 module_param_named (reset_devices, aac_reset_devices, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (reset_devices,"Force an adapter reset at initialization.")
 
 module_param_named (wwn, aac_wwn, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (wwn,"Select a WWN type for the arrays:\n""\t0 - Disable\n""\t1 - Array Meta Data Signature (default)\n""\t2 - Adapter Serial Number")
 
int aac_get_config_status (struct aac_dev *dev, int commit_flag)
 
int aac_get_containers (struct aac_dev *dev)
 
int aac_probe_container (struct aac_dev *dev, int cid)
 
charget_container_type (unsigned tindex)
 
int aac_get_adapter_info (struct aac_dev *dev)
 
int aac_scsi_cmd (struct scsi_cmnd *scsicmd)
 
int aac_dev_ioctl (struct aac_dev *dev, int cmd, void __user *arg)
 

Variables

int aac_msi
 
int aac_commit = -1
 
int startup_timeout = 180
 
int aif_timeout = 120
 
int aac_sync_mode
 
int aac_convert_sgl = 1
 
int numacb = -1
 
int acbsize = -1
 
int update_interval = 30 * 60
 
int check_interval = 24 * 60 * 60
 
int aac_check_reset = 1
 
int expose_physicals = -1
 
int aac_reset_devices
 
int aac_wwn = 1
 

Macro Definition Documentation

#define ASENCODE_BECOMING_READY   0x01

Definition at line 89 of file aachba.c.

#define ASENCODE_DIAGNOSTIC_FAILURE   0x80

Definition at line 103 of file aachba.c.

#define ASENCODE_END_OF_DATA   0x05

Definition at line 88 of file aachba.c.

#define ASENCODE_INIT_CMD_REQUIRED   0x02

Definition at line 90 of file aachba.c.

#define ASENCODE_INQUIRY_DATA_CHANGED   0x03

Definition at line 101 of file aachba.c.

#define ASENCODE_INTERNAL_TARGET_FAILURE   0x00

Definition at line 104 of file aachba.c.

#define ASENCODE_INVALID_CDB_FIELD   0x00

Definition at line 94 of file aachba.c.

#define ASENCODE_INVALID_COMMAND   0x00

Definition at line 92 of file aachba.c.

#define ASENCODE_INVALID_MESSAGE_ERROR   0x00

Definition at line 105 of file aachba.c.

#define ASENCODE_INVALID_PARAM_FIELD   0x00

Definition at line 96 of file aachba.c.

#define ASENCODE_LBA_OUT_OF_RANGE   0x00

Definition at line 93 of file aachba.c.

#define ASENCODE_LUN_FAILED_SELF_CONFIG   0x00

Definition at line 106 of file aachba.c.

#define ASENCODE_LUN_NOT_SELF_CONFIGURED_YET   0x00

Definition at line 100 of file aachba.c.

#define ASENCODE_LUN_NOT_SUPPORTED   0x00

Definition at line 95 of file aachba.c.

#define ASENCODE_NO_SENSE   0x00

Definition at line 87 of file aachba.c.

#define ASENCODE_OVERLAPPED_COMMAND   0x00

Definition at line 107 of file aachba.c.

#define ASENCODE_PARAM_LIST_LENGTH_ERROR   0x00

Definition at line 91 of file aachba.c.

#define ASENCODE_PARAM_NOT_SUPPORTED   0x01

Definition at line 97 of file aachba.c.

#define ASENCODE_PARAM_VALUE_INVALID   0x02

Definition at line 98 of file aachba.c.

#define ASENCODE_RESET_OCCURRED   0x00

Definition at line 99 of file aachba.c.

#define ASENCODE_SAVING_PARAMS_NOT_SUPPORTED   0x00

Definition at line 102 of file aachba.c.

#define BYTE0 (   x)    (unsigned char)(x)

Definition at line 109 of file aachba.c.

#define BYTE1 (   x)    (unsigned char)((x) >> 8)

Definition at line 110 of file aachba.c.

#define BYTE2 (   x)    (unsigned char)((x) >> 16)

Definition at line 111 of file aachba.c.

#define BYTE3 (   x)    (unsigned char)((x) >> 24)

Definition at line 112 of file aachba.c.

#define INQD_PDT_CHNGR   0x08 /* Changer (jukebox, scsi2) */

Definition at line 49 of file aachba.c.

#define INQD_PDT_COMM   0x09 /* Communication device (scsi2) */

Definition at line 50 of file aachba.c.

#define INQD_PDT_DA   0x00 /* Direct-access (DISK) device */

Definition at line 47 of file aachba.c.

#define INQD_PDT_DMASK   0x1F /* Peripheral Device Type Mask */

Definition at line 54 of file aachba.c.

#define INQD_PDT_NOLUN   0x7f /* Logical Unit Not Present */

Definition at line 52 of file aachba.c.

#define INQD_PDT_NOLUN2   0x1f /* Unknown Device (scsi2) */

Definition at line 51 of file aachba.c.

#define INQD_PDT_PROC   0x03 /* Processor device */

Definition at line 48 of file aachba.c.

#define INQD_PDT_QMASK   0xE0 /* Peripheral Device Qualifer Mask */

Definition at line 55 of file aachba.c.

#define SENCODE_BECOMING_READY   0x04

Definition at line 63 of file aachba.c.

#define SENCODE_DIAGNOSTIC_FAILURE   0x40

Definition at line 77 of file aachba.c.

#define SENCODE_END_OF_DATA   0x00

Definition at line 62 of file aachba.c.

#define SENCODE_INIT_CMD_REQUIRED   0x04

Definition at line 64 of file aachba.c.

#define SENCODE_INQUIRY_DATA_CHANGED   0x3F

Definition at line 75 of file aachba.c.

#define SENCODE_INTERNAL_TARGET_FAILURE   0x44

Definition at line 78 of file aachba.c.

#define SENCODE_INVALID_CDB_FIELD   0x24

Definition at line 68 of file aachba.c.

#define SENCODE_INVALID_COMMAND   0x20

Definition at line 66 of file aachba.c.

#define SENCODE_INVALID_MESSAGE_ERROR   0x49

Definition at line 79 of file aachba.c.

#define SENCODE_INVALID_PARAM_FIELD   0x26

Definition at line 70 of file aachba.c.

#define SENCODE_LBA_OUT_OF_RANGE   0x21

Definition at line 67 of file aachba.c.

#define SENCODE_LUN_FAILED_SELF_CONFIG   0x4c

Definition at line 80 of file aachba.c.

#define SENCODE_LUN_NOT_SELF_CONFIGURED_YET   0x3E

Definition at line 74 of file aachba.c.

#define SENCODE_LUN_NOT_SUPPORTED   0x25

Definition at line 69 of file aachba.c.

#define SENCODE_NO_SENSE   0x00

Definition at line 61 of file aachba.c.

#define SENCODE_OVERLAPPED_COMMAND   0x4E

Definition at line 81 of file aachba.c.

#define SENCODE_PARAM_LIST_LENGTH_ERROR   0x1A

Definition at line 65 of file aachba.c.

#define SENCODE_PARAM_NOT_SUPPORTED   0x26

Definition at line 71 of file aachba.c.

#define SENCODE_PARAM_VALUE_INVALID   0x26

Definition at line 72 of file aachba.c.

#define SENCODE_RESET_OCCURRED   0x29

Definition at line 73 of file aachba.c.

#define SENCODE_SAVING_PARAMS_NOT_SUPPORTED   0x39

Definition at line 76 of file aachba.c.

Function Documentation

int aac_dev_ioctl ( struct aac_dev dev,
int  cmd,
void __user arg 
)

Definition at line 2620 of file aachba.c.

int aac_get_adapter_info ( struct aac_dev dev)

Definition at line 1296 of file aachba.c.

int aac_get_config_status ( struct aac_dev dev,
int  commit_flag 
)

aac_get_config_status - check the adapter configuration : adapter to query

Query config status, and commit the configuration if needed.

Definition at line 267 of file aachba.c.

int aac_get_containers ( struct aac_dev dev)

aac_get_containers - list containers : adapter to probe

Make a list of all containers on this controller

Definition at line 359 of file aachba.c.

int aac_probe_container ( struct aac_dev dev,
int  cid 
)

Definition at line 674 of file aachba.c.

int aac_scsi_cmd ( struct scsi_cmnd scsicmd)

aac_scsi_cmd() - Process SCSI command : SCSI command block

Emulate a SCSI command and queue the required request for the aacraid firmware.

Definition at line 2116 of file aachba.c.

char* get_container_type ( unsigned  tindex)

Definition at line 749 of file aachba.c.

module_param ( aac_sync_mode  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( aac_convert_sgl  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( nondasd  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( dacmode  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( startup_timeout  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( aif_timeout  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( numacb  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( acbsize  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( update_interval  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( check_interval  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( expose_physicals  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param_named ( cache  ,
aac_cache  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param_named ( commit  ,
aac_commit  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param_named ( msi  ,
aac_msi  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param_named ( check_reset  ,
aac_check_reset  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param_named ( reset_devices  ,
aac_reset_devices  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param_named ( wwn  ,
aac_wwn  ,
int  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( aac_sync_mode  ,
"Force sync. transfer mode""  0 = off 
)
MODULE_PARM_DESC ( aac_convert_sgl  ,
"Convert non-conformable s/g list""  0 = off 
)
MODULE_PARM_DESC ( nondasd  ,
"Control scanning of hba for nondasd devices.""  0 = off 
)
MODULE_PARM_DESC ( cache  ,
"Disable Queue Flush commands:\n""\tbit 0 - Disable FUA in WRITE SCSI commands\n""\tbit 1 - Disable SYNCHRONIZE_CACHE SCSI command\n""\tbit 2 - Disable only if Battery is protecting Cache"   
)
MODULE_PARM_DESC ( dacmode  ,
"Control whether dma addressing is using 64 bit DAC.""  0 = off 
)
MODULE_PARM_DESC ( commit  ,
"Control whether a COMMIT_CONFIG is issued to the"" adapter for foreign arrays.\n""This is typically needed in systems that do not have a BIOS.""  0 = off 
)
MODULE_PARM_DESC ( msi  ,
"IRQ handling.""  0 = PIC(default),
= MSI 
)
MODULE_PARM_DESC ( startup_timeout  ,
"The duration of time in seconds to wait for"" adapter to have it's kernel up and\n""running. This is typically adjusted for large systems that do not"" have a BIOS."   
)
MODULE_PARM_DESC ( aif_timeout  ,
"The duration of time in seconds to wait for"" applications to pick up AIFs before\n""deregistering them. This is typically adjusted for heavily burdened"" systems."   
)
MODULE_PARM_DESC ( numacb  ,
"Request a limit to the number of adapter control"" blocks (FIB) allocated. Valid values are 512 and down. Default is"" to use suggestion from Firmware."   
)
MODULE_PARM_DESC ( acbsize  ,
"Request a specific adapter control block (FIB)"" size. Valid values are  512,
2048  ,
4096 and 8192.Default is to use""suggestion from Firmware."   
)
MODULE_PARM_DESC ( update_interval  ,
"Interval in seconds between time sync"" updates issued to adapter."   
)
MODULE_PARM_DESC ( check_interval  ,
"Interval in seconds between adapter health"" checks."   
)
MODULE_PARM_DESC ( check_reset  ,
"If adapter fails health  check,
reset the""adapter.a value of-1 forces the reset to adapters programmed to""ignore it."   
)
MODULE_PARM_DESC ( expose_physicals  ,
"Expose physical components of the arrays."" -  1 = protect 0=off 
)
MODULE_PARM_DESC ( reset_devices  ,
"Force an adapter reset at initialization."   
)
MODULE_PARM_DESC ( wwn  ,
"Select a WWN type for the arrays:\n""\t0 - Disable\n""\t1 - Array Meta Data Signature (default)\n""\t2 - Adapter Serial Number"   
)

Variable Documentation

int aac_check_reset = 1

Definition at line 217 of file aachba.c.

int aac_commit = -1

Definition at line 153 of file aachba.c.

int aac_convert_sgl = 1

Definition at line 157 of file aachba.c.

int aac_msi

Definition at line 152 of file aachba.c.

int aac_reset_devices

Definition at line 228 of file aachba.c.

int aac_sync_mode

Definition at line 156 of file aachba.c.

int aac_wwn = 1

Definition at line 232 of file aachba.c.

int acbsize = -1

Definition at line 201 of file aachba.c.

int aif_timeout = 120

Definition at line 155 of file aachba.c.

int check_interval = 24 * 60 * 60

Definition at line 212 of file aachba.c.

int expose_physicals = -1

Definition at line 223 of file aachba.c.

int numacb = -1

Definition at line 195 of file aachba.c.

int startup_timeout = 180

Definition at line 154 of file aachba.c.

int update_interval = 30 * 60

Definition at line 207 of file aachba.c.