Skip to content

Commit

Permalink
cciss: clarify command list padding calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Feb 28, 2010
1 parent 41647e7 commit 58daa9c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/block/cciss_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 58daa9c

Please sign in to comment.