diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2010-02-26 23:01:12 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-28 19:42:31 +0100 |
commit | 58daa9ce96b847ed130453f5fdd63c579fb1f84f (patch) | |
tree | 3d2fb7cbb4882d691dc34745ad115897feb73cbc /drivers/block/cciss_cmd.h | |
parent | cfq-iosched: rethink seeky detection for SSDs (diff) | |
download | linux-58daa9ce96b847ed130453f5fdd63c579fb1f84f.tar.xz linux-58daa9ce96b847ed130453f5fdd63c579fb1f84f.zip |
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>
Diffstat (limited to 'drivers/block/cciss_cmd.h')
-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 { #define CMD_MSG_STALE 0xff /* This structure needs to be divisible by 8 for new - * indexing method. + * indexing method. PAD_32 and PAD_64 can be adjusted + * independently as needed for 32-bit and 64-bits systems. */ -#define PADSIZE (sizeof(long) - 4) +#define IS_64_BIT ((sizeof(long) - 4)/4) +#define IS_32_BIT (!IS_64_BIT) +#define PAD_32 (0) +#define PAD_64 (4) +#define PADSIZE (IS_32_BIT * PAD_32 + IS_64_BIT * PAD_64) typedef struct _CommandList_struct { CommandListHeader_struct Header; RequestBlock_struct Request; |