[U-Boot] [PATCH v2 1/9] Fix IP alignement problem

Ben Warren biggerbadderben at gmail.com
Thu Jan 29 09:26:13 CET 2009


Gunnar Rangoy wrote:
> From: Olav Morken <olavmrk at gmail.com>
>
> This patch removes volatile from:
> volatile IP_t *ip = (IP_t *)xip;
>
> Due to a bug, avr32-gcc will assume that ip is aligned on a word boundary when
> using volatile, which causes an exception since xip isn't aligned on a word
> boundary.
>
> Signed-off-by: Gunnar Rangoy <gunnar at rangoy.com>
> Signed-off-by: Paul Driveklepp <pauldriveklepp at gmail.com>
> Signed-off-by: Olav Morken <olavmrk at gmail.com>
> ---
>  net/net.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/net.c b/net/net.c
> index 313d5d8..405ca6e 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -1685,7 +1685,7 @@ NetSetEther(volatile uchar * xet, uchar * addr, uint prot)
>  void
>  NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len)
>  {
> -	volatile IP_t *ip = (IP_t *)xip;
> +	IP_t *ip = (IP_t *)xip;
>  
>  	/*
>  	 *	If the data is an odd number of bytes, zero the
>   
Applied to net repo (fixed typo in title )

thanks,
Ben


More information about the U-Boot mailing list