Author: gallatin
Date: Thu Apr 28 14:42:42 2011
New Revision: 221168
URL: http://svn.freebsd.org/changeset/base/221168

Log:
  MFC r220385: Implement mxge_init()
  
    This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
    did not bring the interface into a RUNNING state, like it does on
    most (all?) other FreeBSD NIC drivers.
  
    Thanks to gnn for mentioning the bug, and yongari for pointing out that
    ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.

Modified:
  stable/8/sys/dev/mxge/if_mxge.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/mxge/if_mxge.c
==============================================================================
--- stable/8/sys/dev/mxge/if_mxge.c     Thu Apr 28 14:33:15 2011        
(r221167)
+++ stable/8/sys/dev/mxge/if_mxge.c     Thu Apr 28 14:42:42 2011        
(r221168)
@@ -3057,6 +3057,14 @@ mxge_intr(void *arg)
 static void
 mxge_init(void *arg)
 {
+       mxge_softc_t *sc = arg;
+       struct ifnet *ifp = sc->ifp;
+
+
+       mtx_lock(&sc->driver_mtx);
+       if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+               (void) mxge_open(sc);
+       mtx_unlock(&sc->driver_mtx);
 }
 
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to