Subject: CVS commit: src/sys/dev/pci
To: None <source-changes@NetBSD.org>
From: Pavel Cahyna <pavel@netbsd.org>
List: source-changes
Date: 04/10/2006 16:37:22
Module Name:	src
Committed By:	pavel
Date:		Mon Apr 10 16:37:22 UTC 2006

Modified Files:
	src/sys/dev/pci: if_sip.c

Log Message:
In rev. 1.98, the ioctl method of the (g)sip drivers was optimized for
SIOCSIFFLAGS: it compares the new flags with the old flags and avoids
reset if there are only certain changes. This was done to fix PR 29126.

It does not take into account, though, that there is other state which
can change and SIOCSIFFLAGS is called to inform about it.  Namely,
if_capenable, ec_capenable and ec_nvlans. For all three, the _init
method must program the hardware specially. Not doing it resulted in:
- VLAN frames getting truncated
- hw checksumming not working
- outgoing VLAN frames not being tagged when they should
- incoming VLAN frames being treated as untagged.

Fix by keeping all the old state in the softc and initializing the
hardware if any of it changes.

Tested on gsip. Also tested by Nino Dehne and Martin J. Laubach
on sip, thanks.

Fixes PRs 32900 and 33216.

Approved by martin@ .


To generate a diff of this commit:
cvs rdiff -r1.105 -r1.106 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.