Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * | |
3 | * Linux MegaRAID device driver | |
4 | * | |
5 | * Copyright (c) 2003-2004 LSI Logic Corporation. | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or | |
8 | * modify it under the terms of the GNU General Public License | |
9 | * as published by the Free Software Foundation; either version | |
10 | * 2 of the License, or (at your option) any later version. | |
11 | * | |
12 | * FILE : megaraid_mm.h | |
13 | */ | |
14 | ||
15 | #ifndef MEGARAID_MM_H | |
16 | #define MEGARAID_MM_H | |
17 | ||
18 | #include <linux/spinlock.h> | |
19 | #include <linux/fs.h> | |
20 | #include <asm/uaccess.h> | |
1da177e4 LT |
21 | #include <linux/module.h> |
22 | #include <linux/moduleparam.h> | |
23 | #include <linux/pci.h> | |
24 | #include <linux/list.h> | |
1da177e4 LT |
25 | |
26 | #include "mbox_defs.h" | |
27 | #include "megaraid_ioctl.h" | |
28 | ||
29 | ||
0b4972d5 | 30 | #define LSI_COMMON_MOD_VERSION "2.20.2.7" |
1da177e4 | 31 | #define LSI_COMMON_MOD_EXT_VERSION \ |
0b4972d5 | 32 | "(Release Date: Sun Jul 16 00:01:03 EST 2006)" |
1da177e4 LT |
33 | |
34 | ||
35 | #define LSI_DBGLVL dbglevel | |
36 | ||
37 | // The smallest dma pool | |
38 | #define MRAID_MM_INIT_BUFF_SIZE 4096 | |
39 | ||
40 | /** | |
41 | * mimd_t : Old style ioctl packet structure (deprecated) | |
42 | * | |
43 | * @inlen : | |
44 | * @outlen : | |
45 | * @fca : | |
46 | * @opcode : | |
47 | * @subopcode : | |
48 | * @adapno : | |
49 | * @buffer : | |
50 | * @pad : | |
51 | * @length : | |
52 | * @mbox : | |
53 | * @pthru : | |
54 | * @data : | |
55 | * @pad : | |
56 | * | |
57 | * Note : This structure is DEPRECATED. New applications must use | |
58 | * : uioc_t structure instead. All new hba drivers use the new | |
59 | * : format. If we get this mimd packet, we will convert it into | |
60 | * : new uioc_t format and send it to the hba drivers. | |
61 | */ | |
62 | ||
63 | typedef struct mimd { | |
64 | ||
65 | uint32_t inlen; | |
66 | uint32_t outlen; | |
67 | ||
68 | union { | |
69 | uint8_t fca[16]; | |
70 | struct { | |
71 | uint8_t opcode; | |
72 | uint8_t subopcode; | |
73 | uint16_t adapno; | |
74 | #if BITS_PER_LONG == 32 | |
75 | uint8_t __user *buffer; | |
76 | uint8_t pad[4]; | |
77 | #endif | |
78 | #if BITS_PER_LONG == 64 | |
79 | uint8_t __user *buffer; | |
80 | #endif | |
81 | uint32_t length; | |
82 | } __attribute__ ((packed)) fcs; | |
83 | } __attribute__ ((packed)) ui; | |
84 | ||
85 | uint8_t mbox[18]; /* 16 bytes + 2 status bytes */ | |
86 | mraid_passthru_t pthru; | |
87 | ||
88 | #if BITS_PER_LONG == 32 | |
89 | char __user *data; /* buffer <= 4096 for 0x80 commands */ | |
90 | char pad[4]; | |
91 | #endif | |
92 | #if BITS_PER_LONG == 64 | |
93 | char __user *data; | |
94 | #endif | |
95 | ||
96 | } __attribute__ ((packed))mimd_t; | |
97 | ||
98 | #endif // MEGARAID_MM_H | |
99 | ||
100 | // vi: set ts=8 sw=8 tw=78: |