Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
megaraid_mbox.h File Reference
#include "mega_common.h"
#include "mbox_defs.h"
#include "megaraid_ioctl.h"

Go to the source code of this file.

Data Structures

struct  mbox_ccb_t
 
struct  mraid_device_t
 

Macros

#define MEGARAID_VERSION   "2.20.5.1"
 
#define MEGARAID_EXT_VERSION   "(Release Date: Thu Nov 16 15:32:35 EST 2006)"
 
#define PCI_DEVICE_ID_PERC4_DI_DISCOVERY   0x000E
 
#define PCI_SUBSYS_ID_PERC4_DI_DISCOVERY   0x0123
 
#define PCI_DEVICE_ID_PERC4_SC   0x1960
 
#define PCI_SUBSYS_ID_PERC4_SC   0x0520
 
#define PCI_DEVICE_ID_PERC4_DC   0x1960
 
#define PCI_SUBSYS_ID_PERC4_DC   0x0518
 
#define PCI_DEVICE_ID_VERDE   0x0407
 
#define PCI_DEVICE_ID_PERC4_DI_EVERGLADES   0x000F
 
#define PCI_SUBSYS_ID_PERC4_DI_EVERGLADES   0x014A
 
#define PCI_DEVICE_ID_PERC4E_SI_BIGBEND   0x0013
 
#define PCI_SUBSYS_ID_PERC4E_SI_BIGBEND   0x016c
 
#define PCI_DEVICE_ID_PERC4E_DI_KOBUK   0x0013
 
#define PCI_SUBSYS_ID_PERC4E_DI_KOBUK   0x016d
 
#define PCI_DEVICE_ID_PERC4E_DI_CORVETTE   0x0013
 
#define PCI_SUBSYS_ID_PERC4E_DI_CORVETTE   0x016e
 
#define PCI_DEVICE_ID_PERC4E_DI_EXPEDITION   0x0013
 
#define PCI_SUBSYS_ID_PERC4E_DI_EXPEDITION   0x016f
 
#define PCI_DEVICE_ID_PERC4E_DI_GUADALUPE   0x0013
 
#define PCI_SUBSYS_ID_PERC4E_DI_GUADALUPE   0x0170
 
#define PCI_DEVICE_ID_DOBSON   0x0408
 
#define PCI_DEVICE_ID_MEGARAID_SCSI_320_0   0x1960
 
#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_0   0xA520
 
#define PCI_DEVICE_ID_MEGARAID_SCSI_320_1   0x1960
 
#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_1   0x0520
 
#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2   0x1960
 
#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2   0x0518
 
#define PCI_DEVICE_ID_MEGARAID_I4_133_RAID   0x1960
 
#define PCI_SUBSYS_ID_MEGARAID_I4_133_RAID   0x0522
 
#define PCI_DEVICE_ID_MEGARAID_SATA_150_4   0x1960
 
#define PCI_SUBSYS_ID_MEGARAID_SATA_150_4   0x4523
 
#define PCI_DEVICE_ID_MEGARAID_SATA_150_6   0x1960
 
#define PCI_SUBSYS_ID_MEGARAID_SATA_150_6   0x0523
 
#define PCI_DEVICE_ID_LINDSAY   0x0409
 
#define PCI_DEVICE_ID_INTEL_RAID_SRCS16   0x1960
 
#define PCI_SUBSYS_ID_INTEL_RAID_SRCS16   0x0523
 
#define PCI_DEVICE_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK   0x1960
 
#define PCI_SUBSYS_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK   0x0520
 
#define PCI_SUBSYS_ID_PERC3_QC   0x0471
 
#define PCI_SUBSYS_ID_PERC3_DC   0x0493
 
#define PCI_SUBSYS_ID_PERC3_SC   0x0475
 
#define PCI_SUBSYS_ID_CERC_ATA100_4CH   0x0511
 
#define MBOX_MAX_SCSI_CMDS   128
 
#define MBOX_MAX_USER_CMDS   32
 
#define MBOX_DEF_CMD_PER_LUN   64
 
#define MBOX_DEFAULT_SG_SIZE   26
 
#define MBOX_MAX_SG_SIZE   32
 
#define MBOX_MAX_SECTORS   128
 
#define MBOX_TIMEOUT   30
 
#define MBOX_BUSY_WAIT   10
 
#define MBOX_RESET_WAIT   180
 
#define MBOX_RESET_EXT_WAIT   120
 
#define MBOX_SYNC_WAIT_CNT   0xFFFF
 
#define MBOX_SYNC_DELAY_200   200
 
#define MBOX_IBUF_SIZE   4096
 
#define MAX_LD_EXTENDED64   64
 
#define ADAP2RAIDDEV(adp)   ((mraid_device_t *)((adp)->raid_device))
 
#define MAILBOX_LOCK(rdev)   (&(rdev)->mailbox_lock)
 
#define IS_RAID_CH(rdev, ch)   (((rdev)->channel_class >> (ch)) & 0x01)
 
#define RDINDOOR(rdev)   readl((rdev)->baseaddr + 0x20)
 
#define RDOUTDOOR(rdev)   readl((rdev)->baseaddr + 0x2C)
 
#define WRINDOOR(rdev, value)   writel(value, (rdev)->baseaddr + 0x20)
 
#define WROUTDOOR(rdev, value)   writel(value, (rdev)->baseaddr + 0x2C)
 

Macro Definition Documentation

#define ADAP2RAIDDEV (   adp)    ((mraid_device_t *)((adp)->raid_device))

Definition at line 223 of file megaraid_mbox.h.

#define IS_RAID_CH (   rdev,
  ch 
)    (((rdev)->channel_class >> (ch)) & 0x01)

Definition at line 228 of file megaraid_mbox.h.

#define MAILBOX_LOCK (   rdev)    (&(rdev)->mailbox_lock)

Definition at line 225 of file megaraid_mbox.h.

#define MAX_LD_EXTENDED64   64

mraid_device_t - adapter soft state structure for mailbox controllers : 64-bit mbox - unaligned : mbox dma addr - unaligned : 32-bit mbox - aligned : 64-bit mbox - aligned : mbox dma addr - aligned : exclusion lock for the mailbox : base port of hba memory : mapped addr of hba memory : pool of mailboxes : handle for the mailbox pool memory : a pool for extended passthru commands : handle to the pool above : pool of scatter-gather lists for this driver : handle to the pool above : list of our command control blocks : list of cmd control blocks for mgmt module : array of mailbox for user commands (cmm) : array for state of each physical drive. : flag used to show device scanning : set if FW not responding : If set, skip physical device scanning : channel class, RAID or SCSI : mutex to serialize access to sysfs res. : management packet to issue FW calls from sysfs : mailbox packet to issue FW calls from sysfs : data buffer for FW commands issued from sysfs : DMA buffer for FW commands issued from sysfs : wait queue for sysfs operations : set if the random deletion is supported : current LDID map

Initialization structure for mailbox controllers: memory based and IO based All the fields in this structure are LLD specific and may be discovered at init() or start() time.

NOTE: The fields of this structures are placed to minimize cache misses

Definition at line 187 of file megaraid_mbox.h.

#define MBOX_BUSY_WAIT   10

Definition at line 101 of file megaraid_mbox.h.

#define MBOX_DEF_CMD_PER_LUN   64

Definition at line 96 of file megaraid_mbox.h.

#define MBOX_DEFAULT_SG_SIZE   26

Definition at line 97 of file megaraid_mbox.h.

#define MBOX_IBUF_SIZE   4096

Definition at line 112 of file megaraid_mbox.h.

#define MBOX_MAX_SCSI_CMDS   128

Definition at line 94 of file megaraid_mbox.h.

#define MBOX_MAX_SECTORS   128

Definition at line 99 of file megaraid_mbox.h.

#define MBOX_MAX_SG_SIZE   32

Definition at line 98 of file megaraid_mbox.h.

#define MBOX_MAX_USER_CMDS   32

Definition at line 95 of file megaraid_mbox.h.

#define MBOX_RESET_EXT_WAIT   120

Definition at line 103 of file megaraid_mbox.h.

#define MBOX_RESET_WAIT   180

Definition at line 102 of file megaraid_mbox.h.

#define MBOX_SYNC_DELAY_200   200

Definition at line 106 of file megaraid_mbox.h.

#define MBOX_SYNC_WAIT_CNT   0xFFFF

Definition at line 104 of file megaraid_mbox.h.

#define MBOX_TIMEOUT   30

Definition at line 100 of file megaraid_mbox.h.

#define MEGARAID_EXT_VERSION   "(Release Date: Thu Nov 16 15:32:35 EST 2006)"

Definition at line 25 of file megaraid_mbox.h.

#define MEGARAID_VERSION   "2.20.5.1"

Definition at line 24 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_DOBSON   0x0408

Definition at line 60 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_INTEL_RAID_SRCS16   0x1960

Definition at line 82 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK   0x1960

Definition at line 85 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_LINDSAY   0x0409

Definition at line 80 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_MEGARAID_I4_133_RAID   0x1960

Definition at line 71 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_MEGARAID_SATA_150_4   0x1960

Definition at line 74 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_MEGARAID_SATA_150_6   0x1960

Definition at line 77 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_MEGARAID_SCSI_320_0   0x1960

Definition at line 62 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_MEGARAID_SCSI_320_1   0x1960

Definition at line 65 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2   0x1960

Definition at line 68 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4_DC   0x1960

Definition at line 37 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4_DI_DISCOVERY   0x000E

Definition at line 31 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4_DI_EVERGLADES   0x000F

Definition at line 42 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4_SC   0x1960

Definition at line 34 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4E_DI_CORVETTE   0x0013

Definition at line 51 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4E_DI_EXPEDITION   0x0013

Definition at line 54 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4E_DI_GUADALUPE   0x0013

Definition at line 57 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4E_DI_KOBUK   0x0013

Definition at line 48 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_PERC4E_SI_BIGBEND   0x0013

Definition at line 45 of file megaraid_mbox.h.

#define PCI_DEVICE_ID_VERDE   0x0407

Definition at line 40 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_CERC_ATA100_4CH   0x0511

Definition at line 91 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_INTEL_RAID_SRCS16   0x0523

Definition at line 83 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK   0x0520

Definition at line 86 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_MEGARAID_I4_133_RAID   0x0522

Definition at line 72 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_MEGARAID_SATA_150_4   0x4523

Definition at line 75 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_MEGARAID_SATA_150_6   0x0523

Definition at line 78 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_0   0xA520

Definition at line 63 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_1   0x0520

Definition at line 66 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2   0x0518

Definition at line 69 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC3_DC   0x0493

Definition at line 89 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC3_QC   0x0471

Definition at line 88 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC3_SC   0x0475

Definition at line 90 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4_DC   0x0518

Definition at line 38 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4_DI_DISCOVERY   0x0123

Definition at line 32 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4_DI_EVERGLADES   0x014A

Definition at line 43 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4_SC   0x0520

Definition at line 35 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4E_DI_CORVETTE   0x016e

Definition at line 52 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4E_DI_EXPEDITION   0x016f

Definition at line 55 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4E_DI_GUADALUPE   0x0170

Definition at line 58 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4E_DI_KOBUK   0x016d

Definition at line 49 of file megaraid_mbox.h.

#define PCI_SUBSYS_ID_PERC4E_SI_BIGBEND   0x016c

Definition at line 46 of file megaraid_mbox.h.

#define RDINDOOR (   rdev)    readl((rdev)->baseaddr + 0x20)

Definition at line 231 of file megaraid_mbox.h.

#define RDOUTDOOR (   rdev)    readl((rdev)->baseaddr + 0x2C)

Definition at line 232 of file megaraid_mbox.h.

#define WRINDOOR (   rdev,
  value 
)    writel(value, (rdev)->baseaddr + 0x20)

Definition at line 233 of file megaraid_mbox.h.

#define WROUTDOOR (   rdev,
  value 
)    writel(value, (rdev)->baseaddr + 0x2C)

Definition at line 234 of file megaraid_mbox.h.