[U-Boot] [PATCH] smc911x driver frame alignment patch

Ben Warren biggerbadderben at gmail.com
Wed Apr 21 19:52:27 CEST 2010


Mike,

I know you use this driver a lot.  Please comment on this patch.

On 4/21/2010 12:56 AM, Valentin Yakovenkov wrote:
> Wrong alignment in smc911x driver when reading a frame from fifo.
> Neither smc911x chip nor U-Boot doesn't use IP-alignment, so we don't
> need to add anything here.
>
> Signed-off-by: Valentin Yakovenkov<yakovenkov at niistt.ru>
>
> diff -r 7dc8ff189175 a/drivers/net/smc911x.c
> --- a/drivers/net/smc911x.c	Mon Mar 29 11:08:55 2010 +0400
> +++ b/drivers/net/smc911x.c	Mon Apr 19 10:46:02 2010 +0400
> @@ -220,7 +220,7 @@
>
>   		smc911x_reg_write(dev, RX_CFG, 0);
>
> -		tmplen = (pktlen + 2+ 3) / 4;
> +		tmplen = (pktlen + 3) / 4;
>   		while (tmplen--)
>   			*data++ = pkt_data_pull(dev, RX_DATA_FIFO);
>
>
> --
>    WBR, Valentin
>    CJSC "NII STT", Russia, Smolensk
>    http://www.niistt.ru
>    

regards,
Ben


More information about the U-Boot mailing list