Subject: [PATCH 04/16] myri10ge: properly align scratch buffers

From: Brice Goglin <[email-masked]>
Date: Fri, 09 May 2008 02:17:37 +0200

Properly align scratch buffers when making boot commands.

Signed-off-by: Brice Goglin <[email-masked]>
Signed-off-by: Andrew Gallatin <[email-masked]>
---
 drivers/net/myri10ge/myri10ge.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-2.6.orig/drivers/net/myri10ge/myri10ge.c	2008-05-09 00:02:04.000000000 +0200
+++ linux-2.6/drivers/net/myri10ge/myri10ge.c	2008-05-09 00:03:32.000000000 +0200
@@ -443,7 +443,7 @@
 static void myri10ge_dummy_rdma(struct myri10ge_priv *mgp, int enable)
 {
 	char __iomem *submit;
-	__be32 buf[16];
+	__be32 buf[16] __attribute__ ((__aligned__(8)));
 	u32 dma_low, dma_high;
 	int i;
 
@@ -613,7 +613,7 @@
 static int myri10ge_load_firmware(struct myri10ge_priv *mgp)
 {
 	char __iomem *submit;
-	__be32 buf[16];
+	__be32 buf[16] __attribute__ ((__aligned__(8)));
 	u32 dma_low, dma_high, size;
 	int status, i;
 	struct myri10ge_cmd cmd;