Subject: Re: i82544EI ethernet driver
To: Kate Feng <>
From: Jason Thorpe <>
List: port-powerpc
Date: 11/16/2004 13:53:50
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

On Nov 15, 2004, at 11:28 AM, Kate Feng wrote:

> I am porting it to  a big-endian PowerPC.   Thus,
> 1) for data buffer,  I  think I  should add :
>   sc->sc_ctrl |= CTRL_BEM;
> prio to
>   /* Write the control registers. */
>   CSR_WRITE(WMREG_CTRL, sc->sc_ctrl);

No, you don't need to do this.  The data buffer should be treated as a 
stream of octets.  These "byte swap data buffer" options are almost 
universally useless.

> 2) for the descriptor,  I should keep the original
> codes  htole32/le32toh, and le16toh....

Yes, those handle the descriptors for you.

> Meanwhile, I should  do

No, this is already done by the shared PowerPC header files.

As Allen mentioned, this driver is already known to work on big-endian 
platforms, including the PowerPC.  You should not have to do anything 
to make it function properly.

         -- Jason R. Thorpe <>

content-type: application/pgp-signature; x-mac-type=70674453;
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

Version: GnuPG v1.2.3 (Darwin)