Subject: PR/32644 CVS commit: [netbsd-3] src/sys/dev/pci
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Matthias Scheler <tron@netbsd.org>
List: netbsd-bugs
Date: 04/21/2006 12:00:05
The following reply was made to PR kern/32644; it has been noted by GNATS.
From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/32644 CVS commit: [netbsd-3] src/sys/dev/pci
Date: Fri, 21 Apr 2006 11:57:36 +0000 (UTC)
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.