From 1b7d0d28ad82cbd5650c26ec8e370176b112e407 Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Fri, 26 Feb 2010 16:01:17 -0600 Subject: cciss: detect bad alignment of scsi commands at build time cciss: detect bad alignment of scsi commands at build time Incidentally fix some nearby c++ style comments. Signed-off-by: Stephen M. Cameron Signed-off-by: Jens Axboe --- drivers/block/cciss_cmd.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/block/cciss_cmd.h') diff --git a/drivers/block/cciss_cmd.h b/drivers/block/cciss_cmd.h index 515c9f03c20..e624ff959cb 100644 --- a/drivers/block/cciss_cmd.h +++ b/drivers/block/cciss_cmd.h @@ -167,10 +167,13 @@ typedef struct _SGDescriptor_struct { #define CMD_MSG_TIMEOUT 0x05 #define CMD_MSG_STALE 0xff -/* This structure needs to be divisible by 8 for new - * indexing method. PAD_32 and PAD_64 can be adjusted - * independently as needed for 32-bit and 64-bits systems. +/* This structure needs to be divisible by COMMANDLIST_ALIGNMENT + * because low bits of the address are used to to indicate that + * whether the tag contains an index or an address. PAD_32 and + * PAD_64 can be adjusted independently as needed for 32-bit + * and 64-bits systems. */ +#define COMMANDLIST_ALIGNMENT (8) #define IS_64_BIT ((sizeof(long) - 4)/4) #define IS_32_BIT (!IS_64_BIT) #define PAD_32 (0) -- cgit v1.2.3