[U-Boot] [PATCH] arm:kirkwood See to it that sent data is 8-byte aligned

Simon Kagstrom simon.kagstrom at netinsight.net
Wed Aug 19 09:54:04 CEST 2009


On Tue, 18 Aug 2009 11:32:06 +0200
Simon Kagstrom <simon.kagstrom at netinsight.net> 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


More information about the U-Boot mailing list