Subject: Re: i82544EI ethernet driver
To: Allen Briggs <firstname.lastname@example.org>
From: Kate Feng <email@example.com>
Date: 11/15/2004 14:28:48
Allen Briggs wrote:
> On Mon, Nov 15, 2004 at 12:55:43PM -0500, Kate Feng wrote:
> > May I know what hardware platform was used to test the if_wm.c
> > file for the Intel 82544 ethernet controller ? Especially, I am
> > interested in confirming that the processor used for test
> > is big-endian. I understand PCI is little-endian.
> I believe that this has been tested on big-endian PowerPC and Sparc
> as well as little-endian ARM/XScale and x86. The NetBSD bus_space(9)
> and bus_dma(9) APIs are used in this driver and should allow it to
> operate in all NetBSD systems with PCI support. Do you have any
> specific issues with it?
I am porting it to a big-endian PowerPC. Thus,
1) for data buffer, I think I should add :
sc->sc_ctrl |= CTRL_BEM;
/* Write the control registers. */
2) for the descriptor, I should keep the original
codes htole32/le32toh, and le16toh....
Meanwhile, I should do
#define BYTE_ORDER BIG_ENDIAN
Is that right ?
Thanks in advance,
> Use NetBSD! http://www.netbsd.org/