Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: i82544EI ethernet driver



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;

prio to

  /* Write the control registers. */
  CSR_WRITE(WMREG_CTRL, sc->sc_ctrl);


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,
Kate

>
>
> -allen
>
> --
>                   Use NetBSD!  http://www.netbsd.org/




Home | Main Index | Thread Index | Old Index