Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | uioc |
struct | mraid_hba_info |
struct | mcontroller |
struct | mm_dmapool |
struct | mraid_mmadp |
Macros | |
#define | CL_ANN 0 /* print unconditionally, announcements */ |
#define | CL_DLEVEL1 1 /* debug level 1, informative */ |
#define | CL_DLEVEL2 2 /* debug level 2, verbose */ |
#define | CL_DLEVEL3 3 /* debug level 3, very verbose */ |
#define | con_log(level, fmt) if (LSI_DBGLVL >= level) printk fmt; |
#define | MEGAIOC_MAGIC 'm' |
#define | MEGAIOCCMD _IOWR(MEGAIOC_MAGIC, 0, mimd_t) |
#define | MEGAIOC_QNADAP 'm' /* Query # of adapters */ |
#define | MEGAIOC_QDRVRVER 'e' /* Query driver version */ |
#define | MEGAIOC_QADAPINFO 'g' /* Query adapter information */ |
#define | USCSICMD 0x80 |
#define | UIOC_RD 0x00001 |
#define | UIOC_WR 0x00002 |
#define | MBOX_CMD 0x00000 |
#define | GET_DRIVER_VER 0x10000 |
#define | GET_N_ADAP 0x20000 |
#define | GET_ADAP_INFO 0x30000 |
#define | GET_CAP 0x40000 |
#define | GET_STATS 0x50000 |
#define | GET_IOCTL_VERSION 0x01 |
#define | EXT_IOCTL_SIGN_SZ 16 |
#define | EXT_IOCTL_SIGN "$$_EXTD_IOCTL_$$" |
#define | MBOX_LEGACY 0x00 /* ioctl has legacy mbox*/ |
#define | MBOX_HPE 0x01 /* ioctl has hpe mbox */ |
#define | APPTYPE_MIMD 0x00 /* old existing apps */ |
#define | APPTYPE_UIOC 0x01 /* new apps using uioc */ |
#define | IOCTL_ISSUE 0x00000001 /* Issue ioctl */ |
#define | IOCTL_ABORT 0x00000002 /* Abort previous ioctl */ |
#define | DRVRTYPE_MBOX 0x00000001 /* regular mbox driver */ |
#define | DRVRTYPE_HPE 0x00000002 /* new hpe driver */ |
#define | MKADAP(adapno) (MEGAIOC_MAGIC << 8 | (adapno) ) |
#define | GETADAP(mkadap) ((mkadap) ^ MEGAIOC_MAGIC << 8) |
#define | MAX_DMA_POOLS 5 /* 4k, 8k, 16k, 32k, 64k*/ |
Typedefs | |
typedef struct mm_dmapool | mm_dmapool_t |
typedef struct mraid_mmadp | mraid_mmadp_t |
Functions | |
struct uioc | __attribute__ ((aligned(1024), packed)) uioc_t |
struct mraid_hba_info | __attribute__ ((aligned(256), packed)) mraid_hba_info_t |
struct mcontroller | __attribute__ ((packed)) mcontroller_t |
int | mraid_mm_register_adp (mraid_mmadp_t *) |
int | mraid_mm_unregister_adp (uint32_t) |
uint32_t | mraid_mm_adapter_app_handle (uint32_t) |
#define APPTYPE_MIMD 0x00 /* old existing apps */ |
Definition at line 73 of file megaraid_ioctl.h.
#define APPTYPE_UIOC 0x01 /* new apps using uioc */ |
Definition at line 74 of file megaraid_ioctl.h.
#define CL_ANN 0 /* print unconditionally, announcements */ |
Definition at line 28 of file megaraid_ioctl.h.
Definition at line 29 of file megaraid_ioctl.h.
Definition at line 30 of file megaraid_ioctl.h.
Definition at line 31 of file megaraid_ioctl.h.
#define DRVRTYPE_HPE 0x00000002 /* new hpe driver */ |
Definition at line 80 of file megaraid_ioctl.h.
#define DRVRTYPE_MBOX 0x00000001 /* regular mbox driver */ |
Definition at line 79 of file megaraid_ioctl.h.
#define EXT_IOCTL_SIGN "$$_EXTD_IOCTL_$$" |
Definition at line 68 of file megaraid_ioctl.h.
#define EXT_IOCTL_SIGN_SZ 16 |
Definition at line 67 of file megaraid_ioctl.h.
#define GET_ADAP_INFO 0x30000 |
Definition at line 62 of file megaraid_ioctl.h.
#define GET_CAP 0x40000 |
Definition at line 63 of file megaraid_ioctl.h.
#define GET_DRIVER_VER 0x10000 |
Definition at line 60 of file megaraid_ioctl.h.
#define GET_IOCTL_VERSION 0x01 |
Definition at line 65 of file megaraid_ioctl.h.
#define GET_N_ADAP 0x20000 |
Definition at line 61 of file megaraid_ioctl.h.
#define GET_STATS 0x50000 |
Definition at line 64 of file megaraid_ioctl.h.
#define GETADAP | ( | mkadap | ) | ((mkadap) ^ MEGAIOC_MAGIC << 8) |
Definition at line 83 of file megaraid_ioctl.h.
#define IOCTL_ABORT 0x00000002 /* Abort previous ioctl */ |
Definition at line 77 of file megaraid_ioctl.h.
#define IOCTL_ISSUE 0x00000001 /* Issue ioctl */ |
Definition at line 76 of file megaraid_ioctl.h.
#define MAX_DMA_POOLS 5 /* 4k, 8k, 16k, 32k, 64k*/ |
Definition at line 85 of file megaraid_ioctl.h.
#define MBOX_CMD 0x00000 |
Definition at line 59 of file megaraid_ioctl.h.
#define MBOX_HPE 0x01 /* ioctl has hpe mbox */ |
Definition at line 71 of file megaraid_ioctl.h.
#define MBOX_LEGACY 0x00 /* ioctl has legacy mbox*/ |
Definition at line 70 of file megaraid_ioctl.h.
#define MEGAIOC_MAGIC 'm' |
Definition at line 48 of file megaraid_ioctl.h.
Definition at line 53 of file megaraid_ioctl.h.
Definition at line 52 of file megaraid_ioctl.h.
#define MEGAIOC_QNADAP 'm' /* Query # of adapters */ |
Definition at line 51 of file megaraid_ioctl.h.
#define MEGAIOCCMD _IOWR(MEGAIOC_MAGIC, 0, mimd_t) |
Definition at line 49 of file megaraid_ioctl.h.
#define MKADAP | ( | adapno | ) | (MEGAIOC_MAGIC << 8 | (adapno) ) |
Definition at line 82 of file megaraid_ioctl.h.
#define UIOC_RD 0x00001 |
Definition at line 56 of file megaraid_ioctl.h.
#define UIOC_WR 0x00002 |
Definition at line 57 of file megaraid_ioctl.h.
#define USCSICMD 0x80 |
Definition at line 55 of file megaraid_ioctl.h.
typedef struct mm_dmapool mm_dmapool_t |
typedef struct mraid_mmadp mraid_mmadp_t |
mraid_mmadp_t: Structure that drivers pass during (un)registration
: Any unique id (usually PCI bus+dev+fn) : megaraid or hpe (DRVRTYPE_MBOX or DRVRTYPE_HPE) : Driver specific; not touched by the common module : timeout for issued kiocs : Maximum ioctl packets acceptable by the lld : pci dev; used for allocating dma'ble memory : Driver supplied routine to issue uioc_t commands : issue_uioc(drvr_data, kioc, ISSUE/ABORT, uioc_done) : flag to indicate if ioctl can be issued to this adp : attach with the global list of adapters : block of mem for number of kiocs : pool of free kiocs : protection for free pool : so as not to exceed parallel ioctls : block of mem for number of mboxes : DMA pool to allocate passthru packets : array of dma pools
struct uioc __attribute__ | ( | (aligned(1024), packed) | ) |
struct uioc_t - the common ioctl packet structure
: Must be "$$_EXTD_IOCTL_$$" : Type of the mail box (MB_LEGACY or MB_HPE) : Type of the issuing application (existing or new) : Opcode of the command : Adapter number : Pointer to buffer - can point to mbox or plain data buffer : xferlen for DCMD and non mailbox commands : Direction of the data transfer : Status from the driver : reserved bytes for future expansion
: user data transfer address is saved in this : length of the data buffer sent by user app : user passthru address is saves in this (null if DCMD) : kernel address passthru (allocated per kioc) : physicall address of : for kioc free pool list maintenance : call back routine for llds to call when kioc is completed : dma pool buffer attached to kioc for data transfer : physical address of the dma pool buffer : index of the dma pool that is taken from : indicates if buffer needs to be freed after kioc completes
Note : All LSI drivers understand only this packet. Any other : format sent by applications would be converted to this.
struct mraid_hba_info __attribute__ | ( | (aligned(256), packed) | ) |
struct mraid_hba_info - information about the controller
: PCI vendor id : PCI device id : PCI subsystem vendor id : PCI subsystem device id : base port of hba memory : PCI bus : PCI device/function values : interrupt vector for the device
Extended information of 256 bytes about the controller. Align on the single byte boundary so that 32-bit applications can be run on 64-bit platform drivers withoug re-compilation. NOTE: reduce the number of reserved bytes whenever new field are added, so that total size of the structure remains 256 bytes.
|
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.
mraid_mm_adapter_app_handle - return the application handle for this adapter : adapter unique identifier
For the given driver data, locate the adapter in our global list and return the corresponding handle, which is also used by applications to uniquely identify an adapter.
Return adapter handle if found in the list. Return 0 if adapter could not be located, should never happen though.
Definition at line 1034 of file megaraid_mm.c.
int mraid_mm_register_adp | ( | mraid_mmadp_t * | lld_adp | ) |
mraid_mm_register_adp - Registration routine for low level drivers : Adapter objejct
Definition at line 902 of file megaraid_mm.c.
mraid_mm_unregister_adp - Unregister routine for low level drivers : UID of the adpater
Assumes no outstanding ioctls to llds.
Definition at line 1115 of file megaraid_mm.c.
u16 adapno |
Definition at line 162 of file megaraid_ioctl.h.
uint16_t app_type |
Definition at line 160 of file megaraid_ioctl.h.
uint64_t base |
Definition at line 224 of file megaraid_ioctl.h.
uint64_t baseport |
Definition at line 199 of file megaraid_ioctl.h.
dma_addr_t buf_paddr |
Definition at line 185 of file megaraid_ioctl.h.
caddr_t buf_vaddr |
Definition at line 184 of file megaraid_ioctl.h.
uint64_t cmdbuf |
Definition at line 163 of file megaraid_ioctl.h.
uint32_t data_dir |
Definition at line 165 of file megaraid_ioctl.h.
Definition at line 182 of file megaraid_ioctl.h.
uint8_t free_buf |
Definition at line 187 of file megaraid_ioctl.h.
u16 host_no |
Definition at line 206 of file megaraid_ioctl.h.
uint8_t irq |
Definition at line 203 of file megaraid_ioctl.h.
Definition at line 181 of file megaraid_ioctl.h.
uint16_t mb_type |
Definition at line 159 of file megaraid_ioctl.h.
uint8_t num_ldrv |
Definition at line 208 of file megaraid_ioctl.h.
uint8_t numldrv |
Definition at line 226 of file megaraid_ioctl.h.
Definition at line 161 of file megaraid_ioctl.h.
uint32_t pad_for_64bit_align |
Definition at line 174 of file megaraid_ioctl.h.
Definition at line 200 of file megaraid_ioctl.h.
uint8_t pci_dev_fn |
Definition at line 201 of file megaraid_ioctl.h.
Definition at line 195 of file megaraid_ioctl.h.
Definition at line 202 of file megaraid_ioctl.h.
uint16_t pci_vendor_id |
Definition at line 194 of file megaraid_ioctl.h.
uint8_t pcibus |
Definition at line 227 of file megaraid_ioctl.h.
uint16_t pcidev |
Definition at line 228 of file megaraid_ioctl.h.
uint8_t pcifun |
Definition at line 229 of file megaraid_ioctl.h.
uint16_t pciid |
Definition at line 230 of file megaraid_ioctl.h.
uint8_t pcislot |
Definition at line 232 of file megaraid_ioctl.h.
uint16_t pcivendor |
Definition at line 231 of file megaraid_ioctl.h.
int8_t pool_index |
Definition at line 186 of file megaraid_ioctl.h.
mraid_passthru_t* pthru32 |
Definition at line 178 of file megaraid_ioctl.h.
dma_addr_t pthru32_h |
Definition at line 179 of file megaraid_ioctl.h.
uint8_t reserved[128] |
Definition at line 167 of file megaraid_ioctl.h.
uint8_t signature[EXT_IOCTL_SIGN_SZ] |
Definition at line 158 of file megaraid_ioctl.h.
Definition at line 166 of file megaraid_ioctl.h.
uint16_t subsys_device_id |
Definition at line 197 of file megaraid_ioctl.h.
uint16_t subsys_vendor_id |
Definition at line 196 of file megaraid_ioctl.h.
uint8_t timedout |
Definition at line 189 of file megaraid_ioctl.h.
uint32_t uid |
Definition at line 233 of file megaraid_ioctl.h.
uint32_t unique_id |
Definition at line 205 of file megaraid_ioctl.h.
Definition at line 170 of file megaraid_ioctl.h.
uint32_t user_data_len |
Definition at line 171 of file megaraid_ioctl.h.
mraid_passthru_t __user* user_pthru |
Definition at line 176 of file megaraid_ioctl.h.
uint32_t xferlen |
Definition at line 164 of file megaraid_ioctl.h.