kern/81147: em0 reinitialization while adding aliases to interface

Ruslan Ermilov ru at freebsd.org
Tue May 17 12:10:06 GMT 2005


The following reply was made to PR kern/81147; it has been noted by GNATS.

From: Ruslan Ermilov <ru at freebsd.org>
To: Dmitry Sergienko <dmitry at trifle.net>
Cc: FreeBSD-gnats-submit at freebsd.org
Subject: Re: kern/81147: em0 reinitialization while adding aliases to interface
Date: Tue, 17 May 2005 15:06:56 +0300

 On Tue, May 17, 2005 at 12:55:57PM +0300, Dmitry Sergienko wrote:
 > Network card looses link while adding an alias to interface em0.
 > This affects only em0 - neither vlans with vlandev em0, nor fxp0.
 > Problem was detected on two different machines with the same netcards
 > 
 This simple patch works for me:
 
 %%%
 Index: if_em.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/dev/em/if_em.c,v
 retrieving revision 1.63
 diff -u -p -r1.63 if_em.c
 --- if_em.c	5 Apr 2005 07:06:47 -0000	1.63
 +++ if_em.c	14 Apr 2005 19:03:36 -0000
 @@ -832,12 +832,14 @@ em_init_locked(struct adapter * adapter)
          bcopy(adapter->interface_data.ac_enaddr, adapter->hw.mac_addr,
                ETHER_ADDR_LEN);
  
 +#if 0
  	/* Initialize the hardware */
  	if (em_hardware_init(adapter)) {
  		printf("em%d: Unable to initialize the hardware\n", 
  		       adapter->unit);
  		return;
  	}
 +#endif
  
  	if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING)
  		em_enable_vlans(adapter);
 %%%
 
 
 -- 
 Ruslan Ermilov
 ru at FreeBSD.org
 FreeBSD committer


More information about the freebsd-bugs mailing list