From owner-cvs-all@FreeBSD.ORG Wed Jan 26 13:44:48 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4965C16A4CE; Wed, 26 Jan 2005 13:44:48 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 314B043D31; Wed, 26 Jan 2005 13:44:48 +0000 (GMT) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0QDimJA043971; Wed, 26 Jan 2005 13:44:48 GMT (envelope-from yar@repoman.freebsd.org) Received: (from yar@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0QDimuk043970; Wed, 26 Jan 2005 13:44:48 GMT (envelope-from yar) Message-Id: <200501261344.j0QDimuk043970@repoman.freebsd.org> From: Yar Tikhiy Date: Wed, 26 Jan 2005 13:44:48 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/em if_em.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2005 13:44:48 -0000 yar 2005-01-26 13:44:48 UTC FreeBSD src repository Modified files: sys/dev/em if_em.c Log: Respect the current setting of IFCAP_VLAN_HWTAGGING on the interface when going to toggle VLAN support for internal reasons. If the IFCAP_VLAN_HWTAGGING bit is cleared, we should rely on the (re)init routine to turn VLAN support off and never touch the relevant hardware bits. This applies to other capability bits, too. The user obviously has a reason for clearing a capability bit, e.g., if his particular NIC is buggy and hangs if a certain hardware capability is turned on even for a fraction of a second. The flag adapter->em_insert_vlan_header still is set or reset irrespective of the IFCAP_VLAN_HWTAGGING setting, as before, in order to handle the case when a user sets promiscuous mode on an interface first and later turns its IFCAP_VLAN_HWTAGGING bit on. This change might look orthogonal to rev#1.85, but in fact it is not. It introduces bugfixes that hopefully will make implementing the general scheme mentioned in the commit message of rev#1.85 easier. Revision Changes Path 1.59 +18 -5 src/sys/dev/em/if_em.c