Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hpsa.c File Reference
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/pci-aspm.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/timer.h>
#include <linux/seq_file.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/compat.h>
#include <linux/blktrace_api.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/dma-mapping.h>
#include <linux/completion.h>
#include <linux/moduleparam.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include <linux/cciss_ioctl.h>
#include <linux/string.h>
#include <linux/bitmap.h>
#include <linux/atomic.h>
#include <linux/kthread.h>
#include <linux/jiffies.h>
#include "hpsa_cmd.h"
#include "hpsa.h"

Go to the source code of this file.

Macros

#define HPSA_DRIVER_VERSION   "2.0.2-1"
 
#define DRIVER_NAME   "HP HPSA Driver (v " HPSA_DRIVER_VERSION ")"
 
#define HPSA   "hpsa"
 
#define MAX_CONFIG_WAIT   30000
 
#define MAX_IOCTL_CONFIG_WAIT   1000
 
#define MAX_CMD_RETRIES   3
 
#define BOARD_NOT_READY   0
 
#define BOARD_READY   1
 
#define RAID_UNKNOWN   (ARRAY_SIZE(raid_label) - 1)
 
#define HEARTBEAT_SAMPLE_INTERVAL_DURING_FLASH   (240 * HZ)
 
#define HEARTBEAT_SAMPLE_INTERVAL   (30 * HZ)
 
#define SCSI3ADDR_EQ(a, b)
 
#define DEVICE_NOT_FOUND   0
 
#define DEVICE_CHANGED   1
 
#define DEVICE_SAME   2
 
#define DEVICE_UPDATED   3
 
#define MAX_DRIVER_CMD_RETRIES   25
 
#define OBDR_SIG_OFFSET   43
 
#define OBDR_TAPE_SIG   "$DR-10"
 
#define OBDR_SIG_LEN   (sizeof(OBDR_TAPE_SIG) - 1)
 
#define OBDR_TAPE_INQ_SIZE   (OBDR_SIG_OFFSET + OBDR_SIG_LEN)
 
#define ABORT_COMPLETE_WAIT_SECS   30
 
#define HPSA_PERF_ERROR_BITS   ((1 << DIRECT_LOOKUP_SHIFT) - 1)
 
#define HPSA_SIMPLE_ERROR_BITS   0x03
 
#define hpsa_noop(p)   hpsa_message(p, 3, 0)
 
#define HBA_INQUIRY_BYTE_COUNT   64
 
#define COMMANDLIST_ALIGNMENT   32
 
#define MINIMUM_TRANSFER_BLOCKS   4
 
#define NUM_BUCKETS   8
 

Functions

 MODULE_AUTHOR ("Hewlett-Packard Company")
 
 MODULE_DESCRIPTION ("Driver for HP Smart Array Controller version "HPSA_DRIVER_VERSION)
 
 MODULE_SUPPORTED_DEVICE ("HP Smart Array Controllers")
 
 MODULE_VERSION (HPSA_DRIVER_VERSION)
 
 MODULE_LICENSE ("GPL")
 
 module_param (hpsa_allow_any, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (hpsa_allow_any,"Allow hpsa driver to access unknown HP Smart Array hardware")
 
 module_param (hpsa_simple_mode, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (hpsa_simple_mode,"Use 'simple mode' rather than 'performant mode'")
 
 MODULE_DEVICE_TABLE (pci, hpsa_pci_device_id)
 
u8figure_lunaddrbytes (struct ctlr_info *h, int raid_ctlr_position, int i, int nphysicals, int nlogicals, struct ReportLUNdata *physdev_list, struct ReportLUNdata *logdev_list)
 
 module_init (hpsa_init)
 
 module_exit (hpsa_cleanup)
 

Macro Definition Documentation

#define ABORT_COMPLETE_WAIT_SECS   30
#define BOARD_NOT_READY   0

Definition at line 203 of file hpsa.c.

#define BOARD_READY   1

Definition at line 204 of file hpsa.c.

#define COMMANDLIST_ALIGNMENT   32
#define DEVICE_CHANGED   1
#define DEVICE_NOT_FOUND   0
#define DEVICE_SAME   2
#define DEVICE_UPDATED   3
#define DRIVER_NAME   "HP HPSA Driver (v " HPSA_DRIVER_VERSION ")"

Definition at line 58 of file hpsa.c.

#define HBA_INQUIRY_BYTE_COUNT   64
#define HEARTBEAT_SAMPLE_INTERVAL   (30 * HZ)

Definition at line 601 of file hpsa.c.

#define HEARTBEAT_SAMPLE_INTERVAL_DURING_FLASH   (240 * HZ)

Definition at line 600 of file hpsa.c.

#define HPSA   "hpsa"

Definition at line 59 of file hpsa.c.

#define HPSA_DRIVER_VERSION   "2.0.2-1"

Definition at line 57 of file hpsa.c.

#define hpsa_noop (   p)    hpsa_message(p, 3, 0)

Definition at line 3703 of file hpsa.c.

#define HPSA_PERF_ERROR_BITS   ((1 << DIRECT_LOOKUP_SHIFT) - 1)
#define HPSA_SIMPLE_ERROR_BITS   0x03
#define MAX_CMD_RETRIES   3

Definition at line 66 of file hpsa.c.

#define MAX_CONFIG_WAIT   30000

Definition at line 62 of file hpsa.c.

#define MAX_DRIVER_CMD_RETRIES   25

Definition at line 1443 of file hpsa.c.

#define MAX_IOCTL_CONFIG_WAIT   1000

Definition at line 63 of file hpsa.c.

#define MINIMUM_TRANSFER_BLOCKS   4
#define NUM_BUCKETS   8
#define OBDR_SIG_LEN   (sizeof(OBDR_TAPE_SIG) - 1)
#define OBDR_SIG_OFFSET   43
#define OBDR_TAPE_INQ_SIZE   (OBDR_SIG_OFFSET + OBDR_SIG_LEN)
#define OBDR_TAPE_SIG   "$DR-10"
#define RAID_UNKNOWN   (ARRAY_SIZE(raid_label) - 1)

Definition at line 403 of file hpsa.c.

#define SCSI3ADDR_EQ (   a,
  b 
)
Value:
( \
(a)[7] == (b)[7] && \
(a)[6] == (b)[6] && \
(a)[5] == (b)[5] && \
(a)[4] == (b)[4] && \
(a)[3] == (b)[3] && \
(a)[2] == (b)[2] && \
(a)[1] == (b)[1] && \
(a)[0] == (b)[0])

Definition at line 823 of file hpsa.c.

Function Documentation

u8* figure_lunaddrbytes ( struct ctlr_info h,
int  raid_ctlr_position,
int  i,
int  nphysicals,
int  nlogicals,
struct ReportLUNdata physdev_list,
struct ReportLUNdata logdev_list 
)

Definition at line 1884 of file hpsa.c.

MODULE_AUTHOR ( "Hewlett-Packard Company"  )
MODULE_DESCRIPTION ( "Driver for HP Smart Array Controller version HPSA_DRIVER_VERSION)
MODULE_DEVICE_TABLE ( pci  ,
hpsa_pci_device_id   
)
module_exit ( hpsa_cleanup  )
module_init ( hpsa_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( hpsa_allow_any  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( hpsa_simple_mode  ,
int  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( hpsa_allow_any  ,
"Allow hpsa driver to access unknown HP Smart Array hardware  
)
MODULE_PARM_DESC ( hpsa_simple_mode  ,
"Use 'simple mode' rather than 'performant mode'"   
)
MODULE_SUPPORTED_DEVICE ( "HP Smart Array Controllers"  )
MODULE_VERSION ( HPSA_DRIVER_VERSION  )