diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2010-02-26 17:01:12 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-28 13:42:31 -0500 |
commit | 58daa9ce96b847ed130453f5fdd63c579fb1f84f (patch) | |
tree | 3d2fb7cbb4882d691dc34745ad115897feb73cbc | |
parent | 41647e7a91338dba21773a16af7474ef95e0929e (diff) |
cciss: clarify command list padding calculation
cciss: clarify command list padding calculation
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r-- | drivers/block/cciss_cmd.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/block/cciss_cmd.h b/drivers/block/cciss_cmd.h index 25f97623bacf..515c9f03c201 100644 --- a/drivers/block/cciss_cmd.h +++ b/drivers/block/cciss_cmd.h | |||
@@ -168,9 +168,14 @@ typedef struct _SGDescriptor_struct { | |||
168 | #define CMD_MSG_STALE 0xff | 168 | #define CMD_MSG_STALE 0xff |
169 | 169 | ||
170 | /* This structure needs to be divisible by 8 for new | 170 | /* This structure needs to be divisible by 8 for new |
171 | * indexing method. | 171 | * indexing method. PAD_32 and PAD_64 can be adjusted |
172 | * independently as needed for 32-bit and 64-bits systems. | ||
172 | */ | 173 | */ |
173 | #define PADSIZE (sizeof(long) - 4) | 174 | #define IS_64_BIT ((sizeof(long) - 4)/4) |
175 | #define IS_32_BIT (!IS_64_BIT) | ||
176 | #define PAD_32 (0) | ||
177 | #define PAD_64 (4) | ||
178 | #define PADSIZE (IS_32_BIT * PAD_32 + IS_64_BIT * PAD_64) | ||
174 | typedef struct _CommandList_struct { | 179 | typedef struct _CommandList_struct { |
175 | CommandListHeader_struct Header; | 180 | CommandListHeader_struct Header; |
176 | RequestBlock_struct Request; | 181 | RequestBlock_struct Request; |