Subject: RE: Xilinx LLTEMAC driver issues

From: "Xiaochang Duan" <[email-masked]>
Date: Thu, 3 Apr 2008 09:42:50 -0600

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:[email-masked]] 
Sent: Thursday, April 03, 2008 2:29 AM
To: John Bonesio; Johann Baudy
Cc: [email-masked]; 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，支持离线撰写博客内容，随时随地想写就写。 立即使用！ <http://get.live.cn/product/writer.html>