From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound8-sin-R.bigfish.com (outbound-sin.frontbridge.com [207.46.51.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.bigfish.com", Issuer "*.bigfish.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 83D2FDE06A for ; Fri, 4 Apr 2008 02:43:27 +1100 (EST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C895A1.6005CB46" Subject: RE: Xilinx LLTEMAC driver issues Date: Thu, 3 Apr 2008 09:42:50 -0600 In-Reply-To: References: <20080329125416.B09261AD8051@mail119-sin.bigfish.com><000601c8931f$e1d549a0$a57fdce0$@se> <7e0dd21a0804020020s66a091ferfbbf4142adcd84ae@mail.gmail.com> <20080403003200.CB2BF1968046@mail103-sin.bigfish.com> From: "Xiaochang Duan" To: "MingLiu" , "John Bonesio" , "Johann Baudy" Message-Id: <20080403154253.286DE5A004D@mail128-sin.bigfish.com> Cc: John Linn , git , linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. ------_=_NextPart_001_01C895A1.6005CB46 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable According to C operator precedence = ((http://www.difranco.net/cop2220/op-prec.htm), the following patch = should not be needed as operator =A1=B0<<=A1=B1 has higher precedence = than operator =A1=B0|=A1=B1. =20 - XLlDma_mBdWrite((BdPtr), XLLDMA_BD_USR1_OFFSET, (Start) << 16 | = (Insert)) + XLlDma_mBdWrite((BdPtr), XLLDMA_BD_USR1_OFFSET, ((Start) << 16) |=20 + (Insert)) =20 Also FYI, the XLlDma_mBdWrite currently is defined in xlldma driver as: =20 #define XLlDma_mBdWrite(BaseAddress, Offset, Data) \ (*(u32*)((u32)(BaseAddress) + (u32)(Offset)) =3D (Data)) =20 So I don=A1=AFt understand why the patch could help. =20 Thanks,=20 -Xiaochang ________________________________ From: MingLiu [mailto:eemingliu@hotmail.com]=20 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 =20 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.=20 =20 One more question, does this mean that the problem is not on the = hardware timing, but the device driver?=20 =20 BR Ming ________________________________ Windows Live = Writer=A3=AC=D6=A7=B3=D6=C0=EB=CF=DF=D7=AB=D0=B4=B2=A9=BF=CD=C4=DA=C8=DD=A3= =AC=CB=E6=CA=B1=CB=E6=B5=D8=CF=EB=D0=B4=BE=CD=D0=B4=A1=A3 = =C1=A2=BC=B4=CA=B9=D3=C3=A3=A1 =20 ------_=_NextPart_001_01C895A1.6005CB46 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

According to C operator precedence = ((http://www.difranco.= net/cop2220/op-prec.htm), the following patch should not be needed as operator = =A1=B0<<=A1=B1 has higher precedence than operator =A1=B0|=A1=B1.

 

-    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)           &n= bsp;    \

      =       (*(u32*)((u32)(BaseAddress) + (u32)(Offset)) =3D (Data))

 

So I don=A1=AFt understand why the = patch could help.

 

Thanks, =

-Xiaochang<= /p>


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=A3=AC=D6=A7=B3=D6=C0=EB=CF=DF=D7=AB=D0=B4=B2=A9= =BF=CD=C4=DA=C8=DD=A3=AC=CB=E6=CA=B1=CB=E6=B5=D8=CF=EB=D0=B4=BE=CD=D0=B4=A1= =A3 =C1=A2=BC=B4=CA=B9=D3=C3=A3=A1=

------_=_NextPart_001_01C895A1.6005CB46--