From gpr@nvnpp.vrn.ru  Thu May  5 08:11:15 2005
Return-Path: <gpr@nvnpp.vrn.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3C7AD16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  5 May 2005 08:11:15 +0000 (GMT)
Received: from relay.nvnpp.vrn.ru (relay.nvnpp.vrn.ru [195.98.93.66])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D0FA443D5A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  5 May 2005 08:11:14 +0000 (GMT)
	(envelope-from gpr@nvnpp.vrn.ru)
Received: from gpr by relay.nvnpp.vrn.ru with local (Exim 4.50 (FreeBSD))
	id 1DTbRx-0003Nn-3J
	for FreeBSD-gnats-submit@freebsd.org; Thu, 05 May 2005 12:11:13 +0400
Message-Id: <E1DTbRx-0003Nn-3J@relay.nvnpp.vrn.ru>
Date: Thu, 05 May 2005 12:11:13 +0400
From: Gennady Proskurin <gpr@nvnpp.vrn.ru>
Sender: Gennady Proskurin <gpr@relay.nvnpp.vrn.ru>
Reply-To: Gennady Proskurin <gpr@nvnpp.vrn.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: bge(4) doesn't work with vlans
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         80646
>Category:       kern
>Synopsis:       [patch] bge(4) doesn't work with vlans
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 05 08:20:00 GMT 2005
>Closed-Date:    Fri Sep 02 14:21:06 GMT 2005
>Last-Modified:  Fri Sep 02 14:21:06 GMT 2005
>Originator:     Gennady Proskurin
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD okt-gen.nvnpp 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Thu Apr 28 14:18:46 MSD 2005 gpr@okt-gen.nvnpp:/var/tmp/obj/usr/src/sys/OKTGEN i386

dmesg:
bge0: <Broadcom BCM5782 Gigabit Ethernet, ASIC rev. 0x3003> mem 0xf8400000-0xf840ffff irq 17 at device 2.0 on pci5
miibus0: <MII bus> on bge0
brgphy0: <BCM5705 10/100/1000baseTX PHY> on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto
bge0: Ethernet address: 00:30:6e:b1:e7:d3

pciconf -lv:
bge0@pci5:2:0:  class=0x020000 card=0x12bf103c chip=0x169614e4 rev=0x03 hdr=0x00
    vendor   = 'Broadcom Corporation'
    device   = 'BCM5782 Broadcom NetXtreme Gigabit Ethernet for hp'
    class    = network
    subclass = ethernet

>Description:
	Broadcom netcard described above doesn't work with
vlans if hardware vlans turned on in driver. It works fine
if vlans not used. Since bge(4) doesn't support turning
vlanhwtag off (via ifconfig), the only workarround is to
patch driver.
>How-To-Repeat:
	Try to use vlans on that hardware.
>Fix:

Workaround: turn off hardware vlan tagging in driver.

--- if_bge.c.orig	Thu May  5 11:57:01 2005
+++ if_bge.c	Thu May  5 11:57:16 2005
@@ -2393,7 +2393,7 @@
 	IFQ_SET_READY(&ifp->if_snd);
 	ifp->if_hwassist = BGE_CSUM_FEATURES;
 	/* NB: the code for RX csum offload is disabled for now */
-	ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_VLAN_HWTAGGING |
+	ifp->if_capabilities = IFCAP_TXCSUM |
 	    IFCAP_VLAN_MTU;
 	ifp->if_capenable = ifp->if_capabilities;
 
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: glebius 
State-Changed-When: Tue Aug 30 14:14:25 GMT 2005 
State-Changed-Why:  
The problem was not bge(4)-specific. 
Hardware VLAN tagging is fixed in HEAD. 


Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Tue Aug 30 14:14:25 GMT 2005 
Responsible-Changed-Why:  
My. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80646 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Fri Sep 2 14:20:54 GMT 2005 
State-Changed-Why:  
Fixed in RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80646 
>Unformatted:
