public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: "Xiaochang Duan" <xiaochang.duan@xilinx•com>
To: "MingLiu" <eemingliu@hotmail•com>,
	"John Bonesio" <jbonesio@xilinx•com>,
	"Johann Baudy" <johaahn@gmail•com>
Cc: John Linn <linnj@xilinx•com>, git <git@xilinx•com>,
	linuxppc-embedded@ozlabs•org
Subject: RE: Xilinx LLTEMAC driver issues
Date: Thu, 3 Apr 2008 09:42:50 -0600	[thread overview]
Message-ID: <20080403154253.286DE5A004D@mail128-sin.bigfish.com> (raw)
In-Reply-To: <BAY138-W45D7625ED50533D8D2680BB2F70@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 7774 bytes --]

  reply	other threads:[~2008-04-03 15:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080329125416.B09261AD8051@mail119-sin.bigfish.com>
2008-03-29 13:58 ` Xilinx LLTEMAC driver issues John Linn
2008-03-29 14:50   ` Magnus Hjorth
2008-03-30 17:02     ` Stephen Neuendorffer
2008-03-31  9:14     ` rza1
2008-03-31 11:10       ` Magnus Hjorth
2008-04-02  7:20         ` Johann Baudy
2008-04-03  0:31           ` John Bonesio
2008-04-03  8:28             ` MingLiu
2008-04-03 15:42               ` Xiaochang Duan [this message]
2008-04-03 16:39                 ` Johann Baudy
2008-04-03 17:41                   ` Xiaochang Duan
     [not found]           ` <BAY138-W323AC0BF7098709A16725DB2F60@phx.gbl>
2008-04-04  9:53             ` Johann Baudy
2008-04-04 10:11               ` MingLiu
2008-04-04 11:54                 ` Johann Baudy
2008-03-29 12:54 Magnus Hjorth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080403154253.286DE5A004D@mail128-sin.bigfish.com \
    --to=xiaochang.duan@xilinx$(echo .)com \
    --cc=eemingliu@hotmail$(echo .)com \
    --cc=git@xilinx$(echo .)com \
    --cc=jbonesio@xilinx$(echo .)com \
    --cc=johaahn@gmail$(echo .)com \
    --cc=linnj@xilinx$(echo .)com \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox