Subject: Re: vge not working on bigendian, either (was Re: CVS commit: src/sys/dev/pci)
To: None <riz@NetBSD.org>
From: Izumi Tsutsui <firstname.lastname@example.org>
Date: 12/01/2005 18:07:16
In article <438E51FF.5050501@NetBSD.org>
> The MAC address was fixed by the first patch, yes.
Thanks for confirmation.
> Your second patch
> (to if_vgereg.h) caused the machine to hang when vge0 was brought up.
Ah, I was confused and the patch against if_vgereg.h is completly wrong.
Such reordering is only needed if device itself handles byteswap.
> However, brad@openbsd sent me a private email saying vge(4) works on
> macppc in OpenBSD, so I derived the attached patch from there, and I can
> successfully ping over vge0 on macppc with it when combined with your
> patch to if_vge.c.
> --- if_vge.c 21 Nov 2005 20:25:15 -0000 1.7
> +++ if_vge.c 1 Dec 2005 01:12:21 -0000
> @@ -738,11 +707,11 @@
> - d->vge_sts = sz << 16;
> - d->vge_ctl = flags|(i << 28)|VGE_TD_LS_NORM;
> + d->vge_sts = htole32(sz << 16);
> + d->vge_ctl = htole32(flags|(i << 28)|VGE_TD_LS_NORM);
> if (sz > ETHERMTU + ETHER_HDR_LEN)
> - d->vge_ctl |= VGE_TDCTL_JUMBO;
> + d->vge_ctl |= htole32(VGE_TDCTL_JUMBO);
> static int
Looks correct (umm, I missed these members). Is it okay to commit them?