From leres@ee.lbl.gov  Wed May 26 18:32:56 2004
Return-Path: <leres@ee.lbl.gov>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 437A816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 May 2004 18:32:56 -0700 (PDT)
Received: from fun.ee.lbl.gov (fun.ee.lbl.gov [131.243.1.81])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 17F6443D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 May 2004 18:32:56 -0700 (PDT)
	(envelope-from leres@ee.lbl.gov)
Received: from fun.ee.lbl.gov (localhost [127.0.0.1])
	by fun.ee.lbl.gov (8.12.11/8.12.11) with ESMTP id i4R1W8WN096861
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 May 2004 18:32:08 -0700 (PDT)
Received: from fun.ee.lbl.gov (leres@localhost)
	by fun.ee.lbl.gov (8.12.11/8.12.11/Submit) with ESMTP id i4R1W8Cd096858
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 26 May 2004 18:32:08 -0700 (PDT)
Message-Id: <200405270132.i4R1W8Cd096858@fun.ee.lbl.gov>
Date: Wed, 26 May 2004 18:32:08 -0700
From: Craig Leres <leres@ee.lbl.gov>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] dev/em/if_em.c isn't ctags compatible
X-Send-Pr-Version: 3.113

>Number:         67242
>Category:       kern
>Synopsis:       [em] [patch] dev/em/if_em.c isn't ctags compatible
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 26 18:40:21 PDT 2004
>Closed-Date:    Tue Apr 18 21:16:32 GMT 2006
>Last-Modified:  Tue Apr 18 21:16:32 GMT 2006
>Originator:     Craig Leres
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
Lawrence Berkeley National Laboratory
>Environment:
>Description:
	If you make tags in a kernel build tree, most of the routines
	in dev/em/if_em.c are not available as tags. This is due
	to mis-matched braces that occur due to ifdef's.

>How-To-Repeat:
	cd /sys/dev/em
	ctags if_em.c
	vi -t em_add_int_delay_sysctl
	(the tag -- the last routine in the module -- isn't found)

>Fix:
	The appended context diff (which is against FreeBSD-current)
	makes braces match across ifdef's.

==============================================================================
*** if_em.c.virgin	Wed May 26 18:20:58 2004
--- if_em.c	Wed May 26 18:21:37 2004
***************
*** 1281,1295 ****
          if (ifv != NULL) {
                  /* Set the vlan id */
                  current_tx_desc->upper.fields.special = htole16(ifv->ifv_tag);
  #else
          if (mtag != NULL) {
                  /* Set the vlan id */
                  current_tx_desc->upper.fields.special = htole16(VLAN_TAG_VALUE(mtag));
- #endif
  
                  /* Tell hardware to add tag */
                  current_tx_desc->lower.data |= htole32(E1000_TXD_CMD_VLE);
          }
  
          tx_buffer->m_head = m_head;
          tx_buffer->map = q.map;
--- 1281,1299 ----
          if (ifv != NULL) {
                  /* Set the vlan id */
                  current_tx_desc->upper.fields.special = htole16(ifv->ifv_tag);
+ 
+                 /* Tell hardware to add tag */
+                 current_tx_desc->lower.data |= htole32(E1000_TXD_CMD_VLE);
+         }
  #else
          if (mtag != NULL) {
                  /* Set the vlan id */
                  current_tx_desc->upper.fields.special = htole16(VLAN_TAG_VALUE(mtag));
  
                  /* Tell hardware to add tag */
                  current_tx_desc->lower.data |= htole32(E1000_TXD_CMD_VLE);
          }
+ #endif
  
          tx_buffer->m_head = m_head;
          tx_buffer->map = q.map;
***************
*** 1511,1520 ****
          }
          
  #if __FreeBSD_version < 500000
!         LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
  #else
!         TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
  #endif  
                  if (ifma->ifma_addr->sa_family != AF_LINK)
                          continue;
   
--- 1515,1525 ----
          }
          
  #if __FreeBSD_version < 500000
!         LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
  #else
!         TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
  #endif  
+ 	{
                  if (ifma->ifma_addr->sa_family != AF_LINK)
                          continue;
   
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Jun 1 21:13:58 PDT 2004 
Responsible-Changed-Why:  
Rescue this from the 'pending' category. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67242 
Responsible-Changed-From-To: freebsd-bugs->tackerman 
Responsible-Changed-By: wilko 
Responsible-Changed-When: Mon Jun 7 20:33:31 GMT 2004 
Responsible-Changed-Why:  
Tony takes care of the Intel drivers. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=67242 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Wed Apr 5 00:35:00 UTC 2006 
State-Changed-Why:  
Did this ever get incorporated? 


Responsible-Changed-From-To: tackerman->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Apr 5 00:35:00 UTC 2006 
Responsible-Changed-Why:  
Reset PR assigned to inactive committer. 

Hat:	gnats-admin 

http://www.freebsd.org/cgi/query-pr.cgi?pr=67242 
State-Changed-From-To: feedback->closed 
State-Changed-By: maxim 
State-Changed-When: Tue Apr 18 21:16:06 UTC 2006 
State-Changed-Why:  
Not an issue anymore. 

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