Subject: Re: PCI nics on big-endian CPUs [was Re: vge not working on bigendian, either (was Re: CVS commit: src/sys/dev/pci)]
To: Izumi Tsutsui <>
From: Jonathan Stone <>
List: tech-kern
Date: 11/30/2005 17:32:01
In message <>Izumi Tsutsui writes
>In article <>
> wrote:
>> Uh... if (dim) memory serves, the main difference between my port of
>> the FreeBSD-4 bge(4) and the one (Christos?) committed is that the
>> committed version worked on Sparcs. Sparcs are big-endian.
>> Does the cited change to if_bgereg break bge on sparc, or make it
>> work, or something completely different?
>I was told that the problem was introduced in if_bgereg.h rev 1.7.
>It has an unnecessary macro for BE machines, which the FreeBSD
>driver didn't have. The device always accesses DMA descriptors
>in uint32_t and swaps byteorder by itself, so no need to swap values
>if they are stored in uint32_t by the driver.
>(i.e. we should use uint32_t and shift ops for all 16bit DMA descs
> so that all #ifdef BYTE_ORDER statements can be removed.)

OK, I see. Thank you, for the clear, most polite explanation, and for
remedying an error which (if I have the attrivution correct) I introduced.