Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
megaraid.h File Reference
#include <linux/spinlock.h>
#include <linux/mutex.h>

Go to the source code of this file.

Data Structures

struct  mbox_out
 
struct  mbox_in
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  scb_t
 
struct  __attribute__
 
struct  notify
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  __attribute__
 
struct  uioctl_t
 
struct  mcontroller
 
struct  __attribute__
 
struct  nitioctl_t
 
struct  megastat_t
 
struct  private_bios_data
 
struct  adapter_t
 
struct  mega_hbas
 

Macros

#define MEGARAID_VERSION   "v2.00.4 (Release Date: Thu Feb 9 08:51:30 EST 2006)\n"
 
#define MEGA_HAVE_COALESCING   0
 
#define MEGA_HAVE_CLUSTERING   1
 
#define MEGA_HAVE_STATS   0
 
#define MEGA_HAVE_ENH_PROC   1
 
#define MAX_DEV_TYPE   32
 
#define PCI_DEVICE_ID_DISCOVERY   0x000E
 
#define PCI_DEVICE_ID_PERC4_DI   0x000F
 
#define PCI_DEVICE_ID_PERC4_QC_VERDE   0x0407
 
#define HBA_SIGNATURE   0x3344
 
#define HBA_SIGNATURE_471   0xCCCC
 
#define HBA_SIGNATURE_64BIT   0x0299
 
#define MBOX_BUSY_WAIT
 
#define DEFAULT_INITIATOR_ID   7
 
#define MAX_SGLIST   64 /* max supported in f/w */
 
#define MIN_SGLIST   26 /* guaranteed to support these many */
 
#define MAX_COMMANDS   126
 
#define CMDID_INT_CMDS
 
#define MAX_CDB_LEN   10
 
#define MAX_EXT_CDB_LEN   16 /* we support cdb length up to 16 */
 
#define DEF_CMD_PER_LUN   63
 
#define MAX_CMD_PER_LUN   MAX_COMMANDS
 
#define MAX_FIRMWARE_STATUS   46
 
#define MAX_XFER_PER_CMD   (64*1024)
 
#define MAX_SECTORS_PER_IO   128
 
#define MAX_LOGICAL_DRIVES_40LD   40
 
#define FC_MAX_PHYSICAL_DEVICES   256
 
#define MAX_LOGICAL_DRIVES_8LD   8
 
#define MAX_CHANNELS   5
 
#define MAX_TARGET   15
 
#define MAX_PHYSICAL_DRIVES   MAX_CHANNELS*MAX_TARGET
 
#define MAX_ROW_SIZE_40LD   32
 
#define MAX_ROW_SIZE_8LD   8
 
#define MAX_SPAN_DEPTH   8
 
#define NVIRT_CHAN
 
#define MAX_REQ_SENSE_LEN   0x20
 
#define SCB_FREE   0x0000 /* on the free list */
 
#define SCB_ACTIVE   0x0001 /* off the free list */
 
#define SCB_PENDQ   0x0002 /* on the pending queue */
 
#define SCB_ISSUED   0x0004 /* issued - owner f/w */
 
#define SCB_ABORT   0x0008 /* Got an abort for this one */
 
#define SCB_RESET   0x0010 /* Got a reset for this one */
 
#define MAX_NOTIFY_SIZE   0x80
 
#define CUR_NOTIFY_SIZE   sizeof(struct notify)
 
#define IOCTL_MAX_DATALEN   4096
 
#define MAX_CONTROLLERS   32
 
#define MEGAIOC_MAGIC   'm'
 
#define MEGAIOC_QNADAP   'm' /* Query # of adapters */
 
#define MEGAIOC_QDRVRVER   'e' /* Query driver version */
 
#define MEGAIOC_QADAPINFO   'g' /* Query adapter information */
 
#define MKADAP(adapno)   (MEGAIOC_MAGIC << 8 | (adapno) )
 
#define GETADAP(mkadap)   ( (mkadap) ^ MEGAIOC_MAGIC << 8 )
 
#define VENDOR_SPECIFIC_COMMANDS   0xE0
 
#define MEGA_INTERNAL_CMD   VENDOR_SPECIFIC_COMMANDS + 0x01
 
#define USCSICMD   VENDOR_SPECIFIC_COMMANDS
 
#define UIOC_RD   0x00001
 
#define UIOC_WR   0x00002
 
#define MBOX_CMD   0x00000 /* DCMD or passthru command */
 
#define GET_DRIVER_VER   0x10000 /* Get driver version */
 
#define GET_N_ADAP   0x20000 /* Get number of adapters */
 
#define GET_ADAP_INFO   0x30000 /* Get information about a adapter */
 
#define GET_CAP   0x40000 /* Get ioctl capabilities */
 
#define GET_STATS   0x50000 /* Get statistics, including error info */
 
#define uioc_rmbox   __ua.__raw_mbox
 
#define MBOX(uioc)   ((megacmd_t *)&((uioc).__ua.__raw_mbox[0]))
 
#define MBOX_P(uioc)   ((megacmd_t __user *)&((uioc)->__ua.__raw_mbox[0]))
 
#define uioc_uaddr   __ua.__uaddr
 
#define MEGA_MBOXCMD_LREAD   0x01
 
#define MEGA_MBOXCMD_LWRITE   0x02
 
#define MEGA_MBOXCMD_PASSTHRU   0x03
 
#define MEGA_MBOXCMD_ADPEXTINQ   0x04
 
#define MEGA_MBOXCMD_ADAPTERINQ   0x05
 
#define MEGA_MBOXCMD_LREAD64   0xA7
 
#define MEGA_MBOXCMD_LWRITE64   0xA8
 
#define MEGA_MBOXCMD_PASSTHRU64   0xC3
 
#define MEGA_MBOXCMD_EXTPTHRU   0xE3
 
#define MAIN_MISC_OPCODE   0xA4 /* f/w misc opcode */
 
#define GET_MAX_SG_SUPPORT   0x01 /* get max sg len supported by f/w */
 
#define FC_NEW_CONFIG   0xA1
 
#define NC_SUBOP_PRODUCT_INFO   0x0E
 
#define NC_SUBOP_ENQUIRY3   0x0F
 
#define ENQ3_GET_SOLICITED_FULL   0x02
 
#define OP_DCMD_READ_CONFIG   0x04
 
#define NEW_READ_CONFIG_8LD   0x67
 
#define READ_CONFIG_8LD   0x07
 
#define FLUSH_ADAPTER   0x0A
 
#define FLUSH_SYSTEM   0xFE
 
#define FC_DEL_LOGDRV   0xA4 /* f/w command */
 
#define OP_SUP_DEL_LOGDRV   0x2A /* is feature supported */
 
#define OP_GET_LDID_MAP   0x18 /* get ldid and logdrv number map */
 
#define OP_DEL_LOGDRV   0x1C /* delete logical drive */
 
#define IS_BIOS_ENABLED   0x62
 
#define GET_BIOS   0x01
 
#define CHNL_CLASS   0xA9
 
#define GET_CHNL_CLASS   0x00
 
#define SET_CHNL_CLASS   0x01
 
#define CH_RAID   0x01
 
#define CH_SCSI   0x00
 
#define BIOS_PVT_DATA   0x40
 
#define GET_BIOS_PVT_DATA   0x00
 
#define MEGA_GET_TARGET_ID   0x7D
 
#define MEGA_CLUSTER_OP   0x70
 
#define MEGA_GET_CLUSTER_MODE   0x02
 
#define MEGA_CLUSTER_CMD   0x6E
 
#define MEGA_RESERVE_LD   0x01
 
#define MEGA_RELEASE_LD   0x02
 
#define MEGA_RESET_RESERVATIONS   0x03
 
#define MEGA_RESERVATION_STATUS   0x04
 
#define MEGA_RESERVE_PD   0x05
 
#define MEGA_RELEASE_PD   0x06
 
#define MEGA_BATT_MODULE_MISSING   0x01
 
#define MEGA_BATT_LOW_VOLTAGE   0x02
 
#define MEGA_BATT_TEMP_HIGH   0x04
 
#define MEGA_BATT_PACK_MISSING   0x08
 
#define MEGA_BATT_CHARGE_MASK   0x30
 
#define MEGA_BATT_CHARGE_DONE   0x00
 
#define MEGA_BATT_CHARGE_INPROG   0x10
 
#define MEGA_BATT_CHARGE_FAIL   0x20
 
#define MEGA_BATT_CYCLES_EXCEEDED   0x40
 
#define PDRV_UNCNF   0
 
#define PDRV_ONLINE   3
 
#define PDRV_FAILED   4
 
#define PDRV_RBLD   5
 
#define PDRV_HOTSPARE   6
 
#define RDRV_OFFLINE   0
 
#define RDRV_DEGRADED   1
 
#define RDRV_OPTIMAL   2
 
#define RDRV_DELETED   3
 
#define NO_READ_AHEAD   0
 
#define READ_AHEAD   1
 
#define ADAP_READ_AHEAD   2
 
#define WRMODE_WRITE_THRU   0
 
#define WRMODE_WRITE_BACK   1
 
#define CACHED_IO   0
 
#define DIRECT_IO   1
 
#define SCSI_LIST(scp)   ((struct list_head *)(&(scp)->SCp))
 
#define MEGA_BUFFER_SIZE   (2*1024)
 
#define IN_ABORT   0x80000000L
 
#define IN_RESET   0x40000000L
 
#define BOARD_MEMMAP   0x20000000L
 
#define BOARD_IOMAP   0x10000000L
 
#define BOARD_40LD   0x08000000L
 
#define BOARD_64BIT   0x04000000L
 
#define INTR_VALID   0x40
 
#define PCI_CONF_AMISIG   0xa0
 
#define PCI_CONF_AMISIG64   0xa4
 
#define MEGA_DMA_TYPE_NONE   0xFFFF
 
#define MEGA_BULK_DATA   0x0001
 
#define MEGA_SGLIST   0x0002
 
#define CMD_PORT   0x00
 
#define ACK_PORT   0x00
 
#define TOGGLE_PORT   0x01
 
#define INTR_PORT   0x0a
 
#define MBOX_BUSY_PORT   0x00
 
#define MBOX_PORT0   0x04
 
#define MBOX_PORT1   0x05
 
#define MBOX_PORT2   0x06
 
#define MBOX_PORT3   0x07
 
#define ENABLE_MBOX_REGION   0x0B
 
#define ISSUE_BYTE   0x10
 
#define ACK_BYTE   0x08
 
#define ENABLE_INTR_BYTE   0xc0
 
#define DISABLE_INTR_BYTE   0x00
 
#define VALID_INTR_BYTE   0x40
 
#define MBOX_BUSY_BYTE   0x10
 
#define ENABLE_MBOX_BYTE   0x00
 
#define issue_command(adapter)   outb_p(ISSUE_BYTE, (adapter)->base + CMD_PORT)
 
#define irq_state(adapter)   inb_p((adapter)->base + INTR_PORT)
 
#define set_irq_state(adapter, value)   outb_p((value), (adapter)->base + INTR_PORT)
 
#define irq_ack(adapter)   outb_p(ACK_BYTE, (adapter)->base + ACK_PORT)
 
#define irq_enable(adapter)   outb_p(ENABLE_INTR_BYTE, (adapter)->base + TOGGLE_PORT)
 
#define irq_disable(adapter)   outb_p(DISABLE_INTR_BYTE, (adapter)->base + TOGGLE_PORT)
 

Functions

struct mbox_out __attribute__ ((packed))
 
const charmegaraid_info (struct Scsi_Host *)
 

Variables

typedef __attribute__
 
u8 cmd
 
u8 cmdid
 
u16 numsectors
 
u32 lba
 
u32 xferaddr
 
u8 logdrv
 
u8 numsgelements
 
u8 resvd
 
volatile u8 busy
 
volatile u8 numstatus
 
volatile u8 status
 
volatile u8 completed [MAX_FIRMWARE_STATUS]
 
volatile u8 poll
 
volatile u8 ack
 
u32 global_counter
 
u8 param_counter
 
u8 param_id
 
u16 param_val
 
u8 write_config_counter
 
u8 write_config_rsvd [3]
 
u8 ldrv_op_counter
 
u8 ldrv_opid
 
u8 ldrv_opcmd
 
u8 ldrv_opstatus
 
u8 ldrv_state_counter
 
u8 ldrv_state_id
 
u8 ldrv_state_new
 
u8 ldrv_state_old
 
u8 pdrv_state_counter
 
u8 pdrv_state_id
 
u8 pdrv_state_new
 
u8 pdrv_state_old
 
u8 pdrv_fmt_counter
 
u8 pdrv_fmt_id
 
u8 pdrv_fmt_val
 
u8 pdrv_fmt_rsvd
 
u8 targ_xfer_counter
 
u8 targ_xfer_id
 
u8 targ_xfer_val
 
u8 targ_xfer_rsvd
 
u8 fcloop_id_chg_counter
 
u8 fcloopid_pdrvid
 
u8 fcloop_id0
 
u8 fcloop_id1
 
u8 fcloop_state_counter
 
u8 fcloop_state0
 
u8 fcloop_state1
 
u8 fcloop_state_rsvd
 
u8 opcode
 
u8 subopcode
 
u16 adapno
 
u32 length
 
u8 fca [16]
 
u32 inlen
 
u32 outlen
 
u8 mbox [18]
 
mega_passthru pthru
 
u8 geometry
 
u8 unused
 
u8 boot_drv
 
u8 rsvd [12]
 
u16 cksum
 

Macro Definition Documentation

#define ACK_BYTE   0x08

Definition at line 909 of file megaraid.h.

#define ACK_PORT   0x00

Definition at line 896 of file megaraid.h.

#define ADAP_READ_AHEAD   2

Definition at line 748 of file megaraid.h.

#define BIOS_PVT_DATA   0x40

Definition at line 693 of file megaraid.h.

#define BOARD_40LD   0x08000000L

Definition at line 877 of file megaraid.h.

#define BOARD_64BIT   0x04000000L

Definition at line 878 of file megaraid.h.

#define BOARD_IOMAP   0x10000000L

Definition at line 876 of file megaraid.h.

#define BOARD_MEMMAP   0x20000000L

Definition at line 875 of file megaraid.h.

#define CACHED_IO   0

Definition at line 751 of file megaraid.h.

#define CH_RAID   0x01

Definition at line 691 of file megaraid.h.

#define CH_SCSI   0x00

Definition at line 692 of file megaraid.h.

#define CHNL_CLASS   0xA9

Definition at line 688 of file megaraid.h.

#define CMD_PORT   0x00

Definition at line 895 of file megaraid.h.

#define CMDID_INT_CMDS
Value:
MAX_COMMANDS+1 /* make sure CMDID_INT_CMDS
is less than max commands
supported by any f/w */

Definition at line 62 of file megaraid.h.

#define CUR_NOTIFY_SIZE   sizeof(struct notify)

Definition at line 291 of file megaraid.h.

#define DEF_CMD_PER_LUN   63

Definition at line 67 of file megaraid.h.

#define DEFAULT_INITIATOR_ID   7

Definition at line 57 of file megaraid.h.

#define DIRECT_IO   1

Definition at line 752 of file megaraid.h.

#define DISABLE_INTR_BYTE   0x00

Definition at line 911 of file megaraid.h.

#define ENABLE_INTR_BYTE   0xc0

Definition at line 910 of file megaraid.h.

#define ENABLE_MBOX_BYTE   0x00

Definition at line 914 of file megaraid.h.

#define ENABLE_MBOX_REGION   0x0B

Definition at line 905 of file megaraid.h.

#define ENQ3_GET_SOLICITED_FULL   0x02

Definition at line 668 of file megaraid.h.

#define FC_DEL_LOGDRV   0xA4 /* f/w command */

Definition at line 678 of file megaraid.h.

#define FC_MAX_PHYSICAL_DEVICES   256

Definition at line 74 of file megaraid.h.

#define FC_NEW_CONFIG   0xA1

Definition at line 665 of file megaraid.h.

#define FLUSH_ADAPTER   0x0A

Definition at line 672 of file megaraid.h.

#define FLUSH_SYSTEM   0xFE

Definition at line 673 of file megaraid.h.

#define GET_ADAP_INFO   0x30000 /* Get information about a adapter */

Definition at line 570 of file megaraid.h.

#define GET_BIOS   0x01

Definition at line 687 of file megaraid.h.

#define GET_BIOS_PVT_DATA   0x00

Definition at line 694 of file megaraid.h.

#define GET_CAP   0x40000 /* Get ioctl capabilities */

Definition at line 571 of file megaraid.h.

#define GET_CHNL_CLASS   0x00

Definition at line 689 of file megaraid.h.

#define GET_DRIVER_VER   0x10000 /* Get driver version */

Definition at line 568 of file megaraid.h.

#define GET_MAX_SG_SUPPORT   0x01 /* get max sg len supported by f/w */

Definition at line 663 of file megaraid.h.

#define GET_N_ADAP   0x20000 /* Get number of adapters */

Definition at line 569 of file megaraid.h.

#define GET_STATS   0x50000 /* Get statistics, including error info */

Definition at line 572 of file megaraid.h.

#define GETADAP (   mkadap)    ( (mkadap) ^ MEGAIOC_MAGIC << 8 )

Definition at line 541 of file megaraid.h.

#define HBA_SIGNATURE   0x3344

Definition at line 52 of file megaraid.h.

#define HBA_SIGNATURE_471   0xCCCC

Definition at line 53 of file megaraid.h.

#define HBA_SIGNATURE_64BIT   0x0299

Definition at line 54 of file megaraid.h.

#define IN_ABORT   0x80000000L

Definition at line 873 of file megaraid.h.

#define IN_RESET   0x40000000L

Definition at line 874 of file megaraid.h.

#define INTR_PORT   0x0a

Definition at line 898 of file megaraid.h.

#define INTR_VALID   0x40

Definition at line 880 of file megaraid.h.

#define IOCTL_MAX_DATALEN   4096

Definition at line 462 of file megaraid.h.

#define irq_ack (   adapter)    outb_p(ACK_BYTE, (adapter)->base + ACK_PORT)

Definition at line 926 of file megaraid.h.

#define irq_disable (   adapter)    outb_p(DISABLE_INTR_BYTE, (adapter)->base + TOGGLE_PORT)

Definition at line 932 of file megaraid.h.

#define irq_enable (   adapter)    outb_p(ENABLE_INTR_BYTE, (adapter)->base + TOGGLE_PORT)

Definition at line 929 of file megaraid.h.

#define irq_state (   adapter)    inb_p((adapter)->base + INTR_PORT)

Definition at line 921 of file megaraid.h.

#define IS_BIOS_ENABLED   0x62

Definition at line 686 of file megaraid.h.

#define ISSUE_BYTE   0x10

Definition at line 908 of file megaraid.h.

#define issue_command (   adapter)    outb_p(ISSUE_BYTE, (adapter)->base + CMD_PORT)

Definition at line 918 of file megaraid.h.

#define MAIN_MISC_OPCODE   0xA4 /* f/w misc opcode */

Definition at line 662 of file megaraid.h.

#define MAX_CDB_LEN   10

Definition at line 64 of file megaraid.h.

#define MAX_CHANNELS   5

Definition at line 76 of file megaraid.h.

#define MAX_CMD_PER_LUN   MAX_COMMANDS

Definition at line 68 of file megaraid.h.

#define MAX_COMMANDS   126

Definition at line 61 of file megaraid.h.

#define MAX_CONTROLLERS   32

Definition at line 501 of file megaraid.h.

#define MAX_DEV_TYPE   32

Definition at line 46 of file megaraid.h.

#define MAX_EXT_CDB_LEN   16 /* we support cdb length up to 16 */

Definition at line 65 of file megaraid.h.

#define MAX_FIRMWARE_STATUS   46

Definition at line 69 of file megaraid.h.

#define MAX_LOGICAL_DRIVES_40LD   40

Definition at line 73 of file megaraid.h.

#define MAX_LOGICAL_DRIVES_8LD   8

Definition at line 75 of file megaraid.h.

#define MAX_NOTIFY_SIZE   0x80

Definition at line 290 of file megaraid.h.

#define MAX_PHYSICAL_DRIVES   MAX_CHANNELS*MAX_TARGET

Definition at line 78 of file megaraid.h.

#define MAX_REQ_SENSE_LEN   0x20

Definition at line 119 of file megaraid.h.

#define MAX_ROW_SIZE_40LD   32

Definition at line 79 of file megaraid.h.

#define MAX_ROW_SIZE_8LD   8

Definition at line 80 of file megaraid.h.

#define MAX_SECTORS_PER_IO   128

Definition at line 71 of file megaraid.h.

#define MAX_SGLIST   64 /* max supported in f/w */

Definition at line 59 of file megaraid.h.

#define MAX_SPAN_DEPTH   8

Definition at line 81 of file megaraid.h.

#define MAX_TARGET   15

Definition at line 77 of file megaraid.h.

#define MAX_XFER_PER_CMD   (64*1024)

Definition at line 70 of file megaraid.h.

#define MBOX (   uioc)    ((megacmd_t *)&((uioc).__ua.__raw_mbox[0]))

Definition at line 590 of file megaraid.h.

#define MBOX_BUSY_BYTE   0x10

Definition at line 913 of file megaraid.h.

#define MBOX_BUSY_PORT   0x00

Definition at line 900 of file megaraid.h.

#define MBOX_BUSY_WAIT
Value:
10 /* wait for up to 10 usec for
mailbox to be free */

Definition at line 56 of file megaraid.h.

#define MBOX_CMD   0x00000 /* DCMD or passthru command */

Definition at line 567 of file megaraid.h.

#define MBOX_P (   uioc)    ((megacmd_t __user *)&((uioc)->__ua.__raw_mbox[0]))

Definition at line 591 of file megaraid.h.

#define MBOX_PORT0   0x04

Definition at line 901 of file megaraid.h.

#define MBOX_PORT1   0x05

Definition at line 902 of file megaraid.h.

#define MBOX_PORT2   0x06

Definition at line 903 of file megaraid.h.

#define MBOX_PORT3   0x07

Definition at line 904 of file megaraid.h.

#define MEGA_BATT_CHARGE_DONE   0x00

Definition at line 720 of file megaraid.h.

#define MEGA_BATT_CHARGE_FAIL   0x20

Definition at line 722 of file megaraid.h.

#define MEGA_BATT_CHARGE_INPROG   0x10

Definition at line 721 of file megaraid.h.

#define MEGA_BATT_CHARGE_MASK   0x30

Definition at line 719 of file megaraid.h.

#define MEGA_BATT_CYCLES_EXCEEDED   0x40

Definition at line 723 of file megaraid.h.

#define MEGA_BATT_LOW_VOLTAGE   0x02

Definition at line 716 of file megaraid.h.

#define MEGA_BATT_MODULE_MISSING   0x01

Definition at line 715 of file megaraid.h.

#define MEGA_BATT_PACK_MISSING   0x08

Definition at line 718 of file megaraid.h.

#define MEGA_BATT_TEMP_HIGH   0x04

Definition at line 717 of file megaraid.h.

#define MEGA_BUFFER_SIZE   (2*1024)

Definition at line 784 of file megaraid.h.

#define MEGA_BULK_DATA   0x0001

Definition at line 887 of file megaraid.h.

#define MEGA_CLUSTER_CMD   0x6E

Definition at line 703 of file megaraid.h.

#define MEGA_CLUSTER_OP   0x70

Definition at line 701 of file megaraid.h.

#define MEGA_DMA_TYPE_NONE   0xFFFF

Definition at line 886 of file megaraid.h.

#define MEGA_GET_CLUSTER_MODE   0x02

Definition at line 702 of file megaraid.h.

#define MEGA_GET_TARGET_ID   0x7D

Definition at line 700 of file megaraid.h.

#define MEGA_HAVE_CLUSTERING   1

Definition at line 28 of file megaraid.h.

#define MEGA_HAVE_COALESCING   0

Definition at line 21 of file megaraid.h.

#define MEGA_HAVE_ENH_PROC   1

Definition at line 44 of file megaraid.h.

#define MEGA_HAVE_STATS   0

Definition at line 37 of file megaraid.h.

#define MEGA_INTERNAL_CMD   VENDOR_SPECIFIC_COMMANDS + 0x01

Definition at line 551 of file megaraid.h.

#define MEGA_MBOXCMD_ADAPTERINQ   0x05

Definition at line 656 of file megaraid.h.

#define MEGA_MBOXCMD_ADPEXTINQ   0x04

Definition at line 655 of file megaraid.h.

#define MEGA_MBOXCMD_EXTPTHRU   0xE3

Definition at line 660 of file megaraid.h.

#define MEGA_MBOXCMD_LREAD   0x01

Definition at line 652 of file megaraid.h.

#define MEGA_MBOXCMD_LREAD64   0xA7

Definition at line 657 of file megaraid.h.

#define MEGA_MBOXCMD_LWRITE   0x02

Definition at line 653 of file megaraid.h.

#define MEGA_MBOXCMD_LWRITE64   0xA8

Definition at line 658 of file megaraid.h.

#define MEGA_MBOXCMD_PASSTHRU   0x03

Definition at line 654 of file megaraid.h.

#define MEGA_MBOXCMD_PASSTHRU64   0xC3

Definition at line 659 of file megaraid.h.

#define MEGA_RELEASE_LD   0x02

Definition at line 705 of file megaraid.h.

#define MEGA_RELEASE_PD   0x06

Definition at line 709 of file megaraid.h.

#define MEGA_RESERVATION_STATUS   0x04

Definition at line 707 of file megaraid.h.

#define MEGA_RESERVE_LD   0x01

Definition at line 704 of file megaraid.h.

#define MEGA_RESERVE_PD   0x05

Definition at line 708 of file megaraid.h.

#define MEGA_RESET_RESERVATIONS   0x03

Definition at line 706 of file megaraid.h.

#define MEGA_SGLIST   0x0002

Definition at line 888 of file megaraid.h.

#define MEGAIOC_MAGIC   'm'

Definition at line 535 of file megaraid.h.

#define MEGAIOC_QADAPINFO   'g' /* Query adapter information */

Definition at line 539 of file megaraid.h.

#define MEGAIOC_QDRVRVER   'e' /* Query driver version */

Definition at line 538 of file megaraid.h.

#define MEGAIOC_QNADAP   'm' /* Query # of adapters */

Definition at line 537 of file megaraid.h.

#define MEGARAID_VERSION   "v2.00.4 (Release Date: Thu Feb 9 08:51:30 EST 2006)\n"

Definition at line 7 of file megaraid.h.

#define MIN_SGLIST   26 /* guaranteed to support these many */

Definition at line 60 of file megaraid.h.

#define MKADAP (   adapno)    (MEGAIOC_MAGIC << 8 | (adapno) )

Definition at line 540 of file megaraid.h.

#define NC_SUBOP_ENQUIRY3   0x0F

Definition at line 667 of file megaraid.h.

#define NC_SUBOP_PRODUCT_INFO   0x0E

Definition at line 666 of file megaraid.h.

#define NEW_READ_CONFIG_8LD   0x67

Definition at line 670 of file megaraid.h.

#define NO_READ_AHEAD   0

Definition at line 746 of file megaraid.h.

#define NVIRT_CHAN
Value:
4 /* # of virtual channels to represent
up to 60 logical drives */

Definition at line 83 of file megaraid.h.

#define OP_DCMD_READ_CONFIG   0x04

Definition at line 669 of file megaraid.h.

#define OP_DEL_LOGDRV   0x1C /* delete logical drive */

Definition at line 681 of file megaraid.h.

#define OP_GET_LDID_MAP   0x18 /* get ldid and logdrv number map */

Definition at line 680 of file megaraid.h.

#define OP_SUP_DEL_LOGDRV   0x2A /* is feature supported */

Definition at line 679 of file megaraid.h.

#define PCI_CONF_AMISIG   0xa0

Definition at line 882 of file megaraid.h.

#define PCI_CONF_AMISIG64   0xa4

Definition at line 883 of file megaraid.h.

#define PCI_DEVICE_ID_DISCOVERY   0x000E

Definition at line 48 of file megaraid.h.

#define PCI_DEVICE_ID_PERC4_DI   0x000F

Definition at line 49 of file megaraid.h.

#define PCI_DEVICE_ID_PERC4_QC_VERDE   0x0407

Definition at line 50 of file megaraid.h.

#define PDRV_FAILED   4

Definition at line 730 of file megaraid.h.

#define PDRV_HOTSPARE   6

Definition at line 732 of file megaraid.h.

#define PDRV_ONLINE   3

Definition at line 729 of file megaraid.h.

#define PDRV_RBLD   5

Definition at line 731 of file megaraid.h.

#define PDRV_UNCNF   0

Definition at line 728 of file megaraid.h.

#define RDRV_DEGRADED   1

Definition at line 739 of file megaraid.h.

#define RDRV_DELETED   3

Definition at line 741 of file megaraid.h.

#define RDRV_OFFLINE   0

Definition at line 738 of file megaraid.h.

#define RDRV_OPTIMAL   2

Definition at line 740 of file megaraid.h.

#define READ_AHEAD   1

Definition at line 747 of file megaraid.h.

#define READ_CONFIG_8LD   0x07

Definition at line 671 of file megaraid.h.

#define SCB_ABORT   0x0008 /* Got an abort for this one */

Definition at line 210 of file megaraid.h.

#define SCB_ACTIVE   0x0001 /* off the free list */

Definition at line 207 of file megaraid.h.

#define SCB_FREE   0x0000 /* on the free list */

Definition at line 206 of file megaraid.h.

#define SCB_ISSUED   0x0004 /* issued - owner f/w */

Definition at line 209 of file megaraid.h.

#define SCB_PENDQ   0x0002 /* on the pending queue */

Definition at line 208 of file megaraid.h.

#define SCB_RESET   0x0010 /* Got a reset for this one */

Definition at line 211 of file megaraid.h.

#define SCSI_LIST (   scp)    ((struct list_head *)(&(scp)->SCp))

Definition at line 755 of file megaraid.h.

#define SET_CHNL_CLASS   0x01

Definition at line 690 of file megaraid.h.

#define set_irq_state (   adapter,
  value 
)    outb_p((value), (adapter)->base + INTR_PORT)

Definition at line 923 of file megaraid.h.

#define TOGGLE_PORT   0x01

Definition at line 897 of file megaraid.h.

#define UIOC_RD   0x00001

Definition at line 561 of file megaraid.h.

#define uioc_rmbox   __ua.__raw_mbox

Definition at line 589 of file megaraid.h.

#define uioc_uaddr   __ua.__uaddr

Definition at line 592 of file megaraid.h.

#define UIOC_WR   0x00002

Definition at line 562 of file megaraid.h.

#define USCSICMD   VENDOR_SPECIFIC_COMMANDS

Definition at line 556 of file megaraid.h.

#define VALID_INTR_BYTE   0x40

Definition at line 912 of file megaraid.h.

#define VENDOR_SPECIFIC_COMMANDS   0xE0

Definition at line 550 of file megaraid.h.

#define WRMODE_WRITE_BACK   1

Definition at line 750 of file megaraid.h.

#define WRMODE_WRITE_THRU   0

Definition at line 749 of file megaraid.h.

Function Documentation

struct mbox_out __attribute__ ( (packed)  )
read

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

const char* megaraid_info ( struct Scsi_Host )

Definition at line 1873 of file megaraid.c.

Variable Documentation

typedef __attribute__
volatile u8 ack

Definition at line 108 of file megaraid.h.

u16 adapno

Definition at line 484 of file megaraid.h.

u8 boot_drv

Definition at line 652 of file megaraid.h.

volatile u8 busy

Definition at line 103 of file megaraid.h.

u16 cksum

Definition at line 658 of file megaraid.h.

Definition at line 94 of file megaraid.h.

u8 cmdid

Definition at line 95 of file megaraid.h.

volatile u8 completed[MAX_FIRMWARE_STATUS]

Definition at line 106 of file megaraid.h.

u8 fca[16]

Definition at line 483 of file megaraid.h.

u8 fcloop_id0

Definition at line 325 of file megaraid.h.

u8 fcloop_id1

Definition at line 326 of file megaraid.h.

u8 fcloop_id_chg_counter

Definition at line 323 of file megaraid.h.

u8 fcloop_state0

Definition at line 329 of file megaraid.h.

u8 fcloop_state1

Definition at line 330 of file megaraid.h.

u8 fcloop_state_counter

Definition at line 328 of file megaraid.h.

u8 fcloop_state_rsvd

Definition at line 331 of file megaraid.h.

u8 fcloopid_pdrvid

Definition at line 324 of file megaraid.h.

u8 geometry

Definition at line 644 of file megaraid.h.

u32 global_counter

Definition at line 289 of file megaraid.h.

u32 inlen

Definition at line 493 of file megaraid.h.

u32 lba

Definition at line 97 of file megaraid.h.

u8 ldrv_op_counter

Definition at line 298 of file megaraid.h.

u8 ldrv_opcmd

Definition at line 300 of file megaraid.h.

u8 ldrv_opid

Definition at line 299 of file megaraid.h.

u8 ldrv_opstatus

Definition at line 301 of file megaraid.h.

u8 ldrv_state_counter

Definition at line 303 of file megaraid.h.

u8 ldrv_state_id

Definition at line 304 of file megaraid.h.

u8 ldrv_state_new

Definition at line 305 of file megaraid.h.

u8 ldrv_state_old

Definition at line 306 of file megaraid.h.

u32 length

Definition at line 492 of file megaraid.h.

u8 logdrv

Definition at line 99 of file megaraid.h.

u8 mbox[18]

Definition at line 511 of file megaraid.h.

u16 numsectors

Definition at line 96 of file megaraid.h.

u8 numsgelements

Definition at line 100 of file megaraid.h.

volatile u8 numstatus

Definition at line 104 of file megaraid.h.

Definition at line 482 of file megaraid.h.

u32 outlen

Definition at line 494 of file megaraid.h.

u8 param_counter

Definition at line 291 of file megaraid.h.

u8 param_id

Definition at line 292 of file megaraid.h.

u16 param_val

Definition at line 293 of file megaraid.h.

u8 pdrv_fmt_counter

Definition at line 313 of file megaraid.h.

u8 pdrv_fmt_id

Definition at line 314 of file megaraid.h.

u8 pdrv_fmt_rsvd

Definition at line 316 of file megaraid.h.

u8 pdrv_fmt_val

Definition at line 315 of file megaraid.h.

u8 pdrv_state_counter

Definition at line 308 of file megaraid.h.

u8 pdrv_state_id

Definition at line 309 of file megaraid.h.

u8 pdrv_state_new

Definition at line 310 of file megaraid.h.

u8 pdrv_state_old

Definition at line 311 of file megaraid.h.

volatile u8 poll

Definition at line 107 of file megaraid.h.

mega_passthru pthru

Definition at line 512 of file megaraid.h.

u8 resvd

Definition at line 101 of file megaraid.h.

u8 rsvd[12]

Definition at line 657 of file megaraid.h.

volatile u8 status

Definition at line 105 of file megaraid.h.

u8 subopcode

Definition at line 483 of file megaraid.h.

u8 targ_xfer_counter

Definition at line 318 of file megaraid.h.

u8 targ_xfer_id

Definition at line 319 of file megaraid.h.

u8 targ_xfer_rsvd

Definition at line 321 of file megaraid.h.

u8 targ_xfer_val

Definition at line 320 of file megaraid.h.

Definition at line 651 of file megaraid.h.

u8 write_config_counter

Definition at line 295 of file megaraid.h.

u8 write_config_rsvd[3]

Definition at line 296 of file megaraid.h.

u32 xferaddr

Definition at line 98 of file megaraid.h.