Xilinx LLTEMAC driver issues

Xiaochang Duan xiaochang.duan at xilinx.com
Fri Apr 4 04:41:30 EST 2008


Thanks for the clarification. :)
-Xiaochang

-----Original Message-----
From: Johann Baudy [mailto:johaahn at gmail.com] 
Sent: Thursday, April 03, 2008 10:39 AM
To: Xiaochang Duan
Cc: MingLiu; John Bonesio; linuxppc-embedded at ozlabs.org; John Linn; git
Subject: Re: Xilinx LLTEMAC driver issues

The only part of the patch that really solves the checksum offload
calculation is into xenet_DmaSend_internal().
The rest is warning removal, comment update and developer friendly define :)

Best regards,
Johann


2008/4/3 Xiaochang Duan <xiaochang.duan at xilinx.com>:
>
>
>
>
> According to C operator precedence ((http://www.difranco.net/cop2220/op-prec.htm), the following patch should not be needed as operator "<<" has higher precedence than operator "|".
>
>
>
> -    XLlDma_mBdWrite((BdPtr), XLLDMA_BD_USR1_OFFSET, (Start) << 16 | (Insert))
>
>
> +    XLlDma_mBdWrite((BdPtr), XLLDMA_BD_USR1_OFFSET, ((Start) << 16) |
>
> + (Insert))
>
>
>
> Also FYI, the XLlDma_mBdWrite currently is defined in xlldma driver as:
>
>
>
> #define XLlDma_mBdWrite(BaseAddress, Offset, Data)                \
>
>             (*(u32*)((u32)(BaseAddress) + (u32)(Offset)) = (Data))
>
>
>
> So I don't understand why the patch could help.
>
>
>
> Thanks,
>
> -Xiaochang
>
> ________________________________

>
> From: MingLiu [mailto:eemingliu at hotmail.com]
> Sent: Thursday, April 03, 2008 2:29 AM
> To: John Bonesio; Johann Baudy
> Cc: linuxppc-embedded at ozlabs.org; John Linn; git
>
> Subject: RE: Xilinx LLTEMAC driver issues
>
>
>
>
>
>
> Dear all,
>
> > The change with the extra parenthesis (in the patch starting with line 133) seems unecessary. I looked at the XLlDma_mBdWrite macro and it appeared to have the correct use of parethesis in the implementation.
> > So, assuming there's nothing subtle that I missed, it's not needed. However, it does no harm either.
>
> However it really helps after I tried this patch. So there should be some difference after it is used.
>
> One more question, does this mean that the problem is not on the hardware timing, but the device driver?
>
> BR
> Ming
> ________________________________

>
> Windows Live Writer,支持离线撰写博客内容,随时随地想写就写。 立即使用!



-- 
Johann Baudy
johaahn at gmail.com



More information about the Linuxppc-embedded mailing list