Subject: CVS commit: [netbsd-3] src/sys/dev/pci
To: None <source-changes@NetBSD.org>
From: Matthias Scheler <tron@netbsd.org>
List: source-changes
Date: 04/21/2006 11:57:36
Module Name: src
Committed By: tron
Date: Fri Apr 21 11:57:36 UTC 2006
Modified Files:
src/sys/dev/pci [netbsd-3]: if_sip.c
Log Message:
Pull up following revision(s) (requested by pavel in ticket #1279):
sys/dev/pci/if_sip.c: revision 1.107
VLAN tags were sent byte-swapped by the gsip driver, because the driver
forgets to convert them from the host to the network byte order. Use
bswap16 to convert them. (Not htons, because on a big-endian machine, they
are in the correct byte order initially, but then, they are byte-swapped
by a htole32 call when written to the transmit descriptor. So
byte-swapping is needed in this case too, to compensate for this htole32
call.)
For a similar reason, tags were seen byte-swapped when received on a
big-endian machine. Replace ntohs by bswap16 in the input path too.
(Again, it is needed to compensate for a le32toh call when the receive
descriptor is read.)
Fixes PR 32644.
Tested on 3.0/i386, 3.0/sgimips and current/alpha.
OK by martin@.
To generate a diff of this commit:
cvs rdiff -r1.101.2.1 -r1.101.2.2 src/sys/dev/pci/if_sip.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.