From: Simon Kagstrom Date: Wed, 19 Aug 2009 09:54:04 +0200 Subject: [U-Boot] [PATCH] arm:kirkwood See to it that sent data is 8-byte aligned In-Reply-To: <20090818113206.0c88b730@marrow.netinsight.se> References: <20090818113206.0c88b730@marrow.netinsight.se> Message-ID: <20090819095404.261ad2d0@marrow.netinsight.se> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 18 Aug 2009 11:32:06 +0200 Simon Kagstrom wrote: > + /* Copy buffer if it's misaligned */ > if ((u32) dataptr & 0x07) { > - printf("Err..(%s) xmit dataptr not 64bit aligned\n", > - __FUNCTION__); > - return -1; > + static void *aligned_buf; > + > + if (!aligned_buf) > + aligned_buf = memalign(sizeof(u32), > + KWGBE_SEND_BUF_SIZE); The memalign requests the wrong alignment here. I'll send a new patch unless the consensus is to prefer the other variant ("[PATCH] net: See to it that sent data is aligned to the ethernet controllers wishes"). // Simon