[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100226220112.11979.91659.stgit@beardog.cce.hp.com>
Date: Fri, 26 Feb 2010 16:01:12 -0600
From: "Stephen M. Cameron" <scameron@...rdog.cce.hp.com>
To: axboe@...nel.dk, akpm@...ux-foundation.org, james.bottomley@...e.de
Cc: linux-kernel@...r.kernel.org, mikem@...rdog.cce.hp.com,
linux-scsi@...r.kernel.org, brace@...rdog.cce.hp.com
Subject: [PATCH 1/9] cciss: clarify command list padding calculation
From: Stephen M. Cameron <scameron@...rdog.cce.hp.com>
cciss: clarify command list padding calculation
Signed-off-by: Stephen M. Cameron <scameron@...rdog.cce.hp.com>
---
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 25f9762..515c9f0 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists