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 <firstname.lastname@example.org>
From: Jonathan Stone <jonathan@Pescadero.dsg.stanford.edu>
Date: 11/30/2005 17:32:01
In message <051201082200.M0225881@mirage.ceres.dti.ne.jp>Izumi Tsutsui writes
>In article <E1EhYYw-0003Jqemail@example.com>
>> 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.