kern/105054: vge driver sends VLAN IDs in wrong endian.

Ruslan Ermilov ru at
Thu Nov 2 18:40:26 UTC 2006

The following reply was made to PR kern/105054; it has been noted by GNATS.

From: Ruslan Ermilov <ru at>
To: Yo Its Me Remember <yoitsmeremember at>
Cc: bug-followup at
Subject: Re: kern/105054: vge driver sends VLAN IDs in wrong endian.
Date: Thu, 2 Nov 2006 21:34:19 +0300

 On Thu, Nov 02, 2006 at 05:00:40PM +0000, Yo Its Me Remember wrote:
 > No, the input VLAN tags are fine, as I mentioned in the description.
 > Your patch changes them so that they're now in big endian instead
 > of little endian, causing another bug.  As far as casting to a
 > uint16_t instead of using htole16, I would think big endian systems
 > would still need to hand the card output tags in little endian.
 > Not really sure though since I don't have any big endian systems
 > to test it.
 > Either way, the second half of the patch will work just fine for
 > little endian systems, just leave the input tag ntohs() there.
 The datasheet is silent on this, and the VIA provided Linux driver
 only has partial support for hardware VLAN tagging (the output part).
 If what you say is true, that must be a "strange" chip design -- it
 expects the data in little-endian, but places it in big-endian.
 I'd have to find the hardware in question to confirm this...
 Ruslan Ermilov
 ru at
 FreeBSD committer

More information about the freebsd-bugs mailing list