Subject: Re: i82544EI ethernet driver
To: Kate Feng <email@example.com>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 11/16/2004 13:53:50
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
> 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
> #define BYTE_ORDER BIG_ENDIAN
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 <email@example.com>
content-type: application/pgp-signature; x-mac-type=70674453;
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
-----END PGP SIGNATURE-----